| ▲ | teo_zero a day ago | |||||||||||||||||||||||||||||||
I'd like to come up with some constructive comments, but I find everything so inconsistent and alien to me... For example, variable declarations use the pattern <colon> <type>, as in
But literals follow the opposite syntax, as in
The return type of a function is introduced by : in func definitions, but by -> in imported func declarations:
Other construct that I find far from my habits:
instead of the more obvious (for me):
Arguments are passed by ref, not by val. Good luck with recursion! | ||||||||||||||||||||||||||||||||
| ▲ | marckerbiquet 17 hours ago | parent | next [-] | |||||||||||||||||||||||||||||||
Author here. The language has still many inconsistencies but not these ones. Import functions is done the same way:
May be the doc is outdated.The multiple declaration is consistent with assignment:
The syntax
is unusual compared to many other languages because it just use a simple syntax:
The type is prefixed only to resolve literals:
It can be useful in generic functions:
But to create uninitialized variables I had to keep the syntax: | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
| ▲ | yxhuvud 21 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||
The parallel assignment just work mostly like it does in ruby so that doesn't look weird to me (except the need for 'var' in the first place). Agreed on the rest, though I don't understand what the problem would be with recursion. Is it using reference passing also for primitives like integers? | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
| ▲ | metadat a day ago | parent | prev [-] | |||||||||||||||||||||||||||||||
Agreed.. and what is going on with the `!` syntax? The docs are not exactly clear on the purpose in all cases. | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||