2 ms·
It's not pretty, but it makes sense so that you actually think about whether you need an array vs list vs ? instead of just going for whatever datastructure []
by always_good 9y ago
It's not pretty, but it makes sense so that you actually think about whether you need an array vs list vs ? instead of just going for whatever datastructure [] is going to give you because it's most convenient.
In practice, it's something I stopped caring about within the first hour.
Then again, mikeash's comment pitches a more interesting idea: [] as generic collection literal syntax that depends on inference / annotation to pick a concrete implementation. Best of both worlds. I'd just remove the Array default.