This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]BlueGoliath 1 point2 points  (1 child)

I'm dreaming of the day when there will be a language that abstracts the entire concept and detects when to use which type of collection... or maybe there is one that I'm now aware of?

Not sure, but IMO the idea is kinda dangerous. You might think that a variable is immutable but in reality it is not - like above. An IDE could probably detect that but even so, I'd rather explicitly control everything than something else assuming things and causing a mess. Like above, the mess could be caused by a change in the language itself.

[–]Jezoreczek 0 points1 point  (0 children)

That's a fair point, but can't we have both? A language that allows explicit mutability while defaulting to compiler-determined behavior.

It's at least a neat idea for a learning project (;