Re:Show HN: Silk, a simple systems programming language
by conradludgate on Monday April 20, 2020 @05:49PM
(#22929025)
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
Re:Show HN: Silk, a simple systems programming language
by zelphirkalt on Tuesday April 21, 2020 @03:28AM
(#22932805)
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.
Re:Show HN: Silk, a simple systems programming language
by half-kh-hacker on Monday April 20, 2020 @11:59PM
(#22931716)
Anecdote: Kotlin uses val/var, but IntelliJ (the de-facto standard editor for Kotlin) will underline all mutable variables.
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"...