3 ms·
Looks like Nim uses let and var to declare immutable and mutable variables. I prefer this to var and val in Scala That’s also how Swift does it too. Throw in
by melling 6y ago
Looks like Nim uses let and var to declare immutable and mutable variables. I prefer this to var and val in Scala
That’s also how Swift does it too.
Throw in type inference and statically typed languages look much nicer.
Swift uses C style braces, while Nim seems to use white space like Python.
- yakkomajuri 6y agoDidn't know about Swift using both, will add that.
- karmakaze 6y agoI wish languages used let to mean a lazily evaluated named expression. Then you can define all your terms that can depend on other lets and only the ones needed in the executed code path get executed once.