TodePond / DreamBerd

perfect programming language
https://dreamberd.computer
Other
11.22k stars 344 forks source link

Suggestion: remove "else" #126

Open stohrendorf opened 1 year ago

stohrendorf commented 1 year ago

The else keyword is usually useless for the following reasons:

This relates to #122, and simplifies the language, so newbies can learn something about computer science.

Mixer001 commented 1 year ago

We can already do delete else! at the beginning of a file. However, to achieve a consensus and save time, that line could be added by compiler by default. If someone wants to use else anyways, a new directive ;delete else might come at handy.

stohrendorf commented 1 year ago

Interesting idea. I like ;delete instead of undelete or restore or recycle or whatever keyword, although personally I would prefer -delete.

jessiejs commented 1 year ago

Instead of ;delete else, we have add (new todepond.dreamberd.lang.syntax.features.FeatureSingletonFactoryManager()).factory().getElse().create(). Please note that in all code after 1 + 1 would be invalid syntax, instead you would do add(1,1)

jessiejs commented 1 year ago

But don't worry you can still delete add.