DEV Community

Discussion on: Creating a new programming language

Collapse
 
bsara profile image
Brandon Sarà

That's pretty cool!

As a feature suggestion (to be honest, I'm not likely to use the language, but I think what you're doing is still really cool), some of the most useful features that I've seen in a language nowadays are: Non-Nullable types, optional chaining, and nullish coalescing. I think that some form of these features would make any language leaps and bounds better than it would be otherwise.

Collapse
 
mcsh profile image
Sajjad Heydari

Thanks for the suggestions! I already have plans for implementing these, do you have any syntax in mind?

Collapse
 
bsara profile image
Brandon Sarà • Edited

Kotlin has nullable types, but their's are non-nullable by default. I personally am not a fan of the default, and I personally don't agree with their reasoning for it. So, I would suggest a "bang" in your type declaration for non-nullables (a: int! = 42). I love the question mark syntax usually used for optional chaining (blah?.blee?[42]?.blue?()). For nullish coalescing, I think that either the Elvis operator (?:) or a double question mark (??) are both intuitive and easy to use.