Syntax for arrays?
DynamicSquid

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

You are viewing a single comment. View All
MocaCDeveloper

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!

DynamicSquid

@MocaCDeveloper Yeah true I guess. But wdym for your second paragraph? Because the functionality for both built in syntax and predefined functions are the same.

MocaCDeveloper

@DynamicSquid

Oh I am just saying like lets say you have neither..then you'll end up like C.

Ye I know predefined and built-in are the same. But the built-in syntax looks better(if I am looking at it correctly)..

MocaCDeveloper

@DynamicSquid

A c like language with built-in methods will make any developer fall in love: Fast compatibility and extreme efficiency!

DynamicSquid

@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

DynamicSquid

@MocaCDeveloper Oh, I want this language to be interpreted, but I think that once I get this to a good point, then I'll definitely make another compiled language.

MocaCDeveloper

@DynamicSquid

Oh so you’re totally shifting the concept of the language?

MocaCDeveloper

@DynamicSquid

It's compiled?

DynamicSquid

@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

@DynamicSquid

Night seems like it is going to be a unique dynamic language!

It is going to have some syntax that of a statically typed language, right? Like:

Like that? Where you define the types of functions and variables?

DynamicSquid

@MocaCDeveloper Nope, they'll all be inferred automatically.

Variables use the set keyword:

And functions use the def keyword:

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

MocaCDeveloper

@DynamicSquid

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

:D

DynamicSquid
realTronsi
MocaCDeveloper
realTronsi

@MocaCDeveloper alphabet soup?

MocaCDeveloper

@realTronsi

alphabet went bye bye after I got done with it

realTronsi

@MocaCDeveloper NO u ditch the sheep

MocaCDeveloper

@realTronsi

ok stair sis what we doinn

realTronsi

@MocaCDeveloper thought code 26 || suggest ?

MocaCDeveloper
realTronsi

@MocaCDeveloper me thot we do A26 ??

MocaCDeveloper

@realTronsi

I am so confused..what???

MocaCDeveloper

@realTronsi

ye we are lol I am just not gonna get on right now until my next class starts. The teacher usually gives busy work the first 10 minutes of class

realTronsi

@MocaCDeveloper ok sounds good I'll work on it

DynamicSquid

@realTronsi

ok stair sis what we doinn

you guys are siblings?

realTronsi

@DynamicSquid inside joke, ignore lol

MocaCDeveloper

@realTronsi

Ok. I bet you'll manage to receive 200 seg faults

MocaCDeveloper

@DynamicSquid

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

:D

realTronsi

@MocaCDeveloper bet I'll receive more

MocaCDeveloper

@realTronsi

I bet so too

DynamicSquid

@MocaCDeveloper I see... lol xD

MocaCDeveloper

@DynamicSquid

..you see nothing ¯\(°_o)/¯

realTronsi

@MocaCDeveloper

MocaCDeveloper

@realTronsi

Uhm I think you're a bit too ahead of yourself..

realTronsi

@MocaCDeveloper why :(( d can just be for data, kinda like .data in assembly, $ is for cross referencing registers, and @ can be the global register kinda like the main function

fuzzyastrocat

@DynamicSquid It's doable, but very difficult (which is why no language that I know of, outside Eros and Night, do it)

realTronsi
realTronsi

@MocaCDeveloper do u have work agian

MocaCDeveloper

@realTronsi

I will be able to code in a minute

realTronsi
MocaCDeveloper
realTronsi

@MocaCDeveloper too late I fell asleep waiting

MocaCDeveloper

@realTronsi

Sorry :/