One thing V gets right is not requiring a keyword (e.g. “let”) for initializing an immutable variable. This is such a common operation that it should be as compact and non-visual-noisy as possible (Huffman coding). (Personally I’d go for “=“ instead of “:=“ though, for ease of typing.)
back
1 comments
Then you'd have no way to differentiate between declaration and assignment, and have all the problems that brings. Hello, Python :)
I’m aware of the trade-offs. :) I’d rather use a digraph operator for mutating assignment, again with the Huffman coding argument. One design I’m thinking of is using “@” as the mutable qualifier (e.g. “@int” is a mutable int), and correspondingly use “@=” for mutating assignment. (The swirl in the “@” glyph is meant to allude to mutation, and it’s a character that visually stands out in code, as mutation should.)