|
|
|
|
|
by ReleaseCandidat
1016 days ago
|
|
I'd have preferred a `fun` (or `fn, if you insist on 2 characters) instead of the Haskell-esque double colon `::` in function definitions to make parsing them easier. And the semicolon after `case` is irritating for me too.
But `foo := bar` for a type-less `foo: TYPE = bar` is too much parser-friendly syntax and inconsistent with using a double colon `::` for function types and struct definitions. And inconsistent with using just the colon in `foo: TYPE`. How do nested for-loops work, if `it` names the current iterator? for particles {
// Inside for loops the "it" object is the iterator for the current object.
particle_left := view_left \* it.particle_size;
}
|
|
- It's the innermost iterator that takes priority
- You are encouraged to name your iterators if you do so (for particles { part -> part.velocity } )
- Compiler throws warnings if you shadowed names.