Syntax for arrays?
I'm a little confuzzled on what my syntax for my language should be. Mainly when it comes to arrays.
I don't know if I want predefined functions, or built in syntax. Like this:
The built in syntax definitely looks shorter, but it doesn't really look clean when you're working with an r-value array:
I personally prefer the built in functions for r-value arrays, but the built in syntax for variables.
So which one should I chose? I can't do both
I'd say built in tbh. It is just so much easier and will become less of a hassle on behalf of the people using your language.
You don't wanna be like C where you need to literally create your own concept of arrays.
Also, Good job on your language. You should attempt to convert it into a compiled language over time! It sure would be a cool compiled language!
@MocaCDeveloper Oh, it's not C like at all! I think I forgot to update you on this, but for version 4 (coming soon), Night's going to be dynamically typed. It's also going to be really similar to Python, but it will have compile time checks making it safer.
So basically Python but it's safe
@MocaCDeveloper Oh, I meant that this language would interpreted, but I'll make another language and that language will be compiled, so I'll have two languages, one interpreted (this one), and one compiled.
And yeah, I'm shifting the concept of the language. I think that now with my language being interpreted and dynamically typed I'll stick to that. I kind of want to make something like Python, but like I said a major difference is the safety.
@MocaCDeveloper Nope, they'll all be inferred automatically.
Variables use the
And functions use the
It's going to be hard to implement type checking for function parameters at compile time, but I think that's doable (I think)
Edit: Oh whoops forgot, there's no semicolons
Ye I've attempted to do it 3 times lol and I gave up. I'm sure you'll be able to do just fine though. You have a better attention span than me!
Also, stop copying my idea BRO. Me and @realTronsi were creating a language one time and we were going to use the set keyword as a variable declaration like seriously bro stop copying us lol
Lol no me and @realTronsi literally just run together on repl and do a whole bunch of coding projects together.
I seriously don't know where this friendship started between me and him but uhh ye we just tend to work together allot and manage to just talk to each other on literally everyones post lol
Also, stair sis is a inside joke. Don't ask how we came up with it lol