Hacker News new | ask | show | jobs
by supercasio 2247 days ago
Congratulations, looks like a really nice language.

One nitpick: I think "val" looks too much like "var" and this will make it harder do differentiate them by code skimming. I suggest changing "val" to something like "const", or "fix", or "imm"...

3 comments

I find it interesting how there's so many ways now of describing mutable vs immutable.

Rust: let vs let mut Swift: let vs var Js: const vs let Silk: val vs var

I honestly get confused now. I started a new job working in go and I keep writing let everywhere

The only one of those, that does not indicate by name to me, that it is about mutability, is the on of Swift. I guess you could argue, that in math, when someone says "let x be 2", then x is constant. In the context of programming though, I am more familiar with the var and let in JS, which is not at all about mutability.
Anecdote: Kotlin uses val/var, but IntelliJ (the de-facto standard editor for Kotlin) will underline all mutable variables.
If you don't mutate them after initialisation.
Never had this problem with Scala...