←back to thread

498 points azhenley | 2 comments | | HN request time: 0.486s | source
Show context
hyperhello ◴[] No.45767863[source]
> I wish it was the default, and mutable was a keyword.

I wish the IDE would simply provide a small clue, visible but graphically unobtrusive, that it was mutated.

In fact, I end up wishing this about almost every language feature that passes my mind. For example, I don't need to choose whether I can or can't append to a list; just make it unappendable if you can prove I don't append. I don't care if it's a map, list, set, listOf, array, vector, arrayOf, Array.of(), etc unless it's going to get in my way because I have ten CPU cores and I'll optimize the loop when I need to.

replies(8): >>45768027 #>>45768166 #>>45768207 #>>45768240 #>>45768356 #>>45769342 #>>45769717 #>>45770340 #
1. considerdevs ◴[] No.45770340[source]
Could Pylint help? It has atleast check for variable redefinition: https://pylint.pycqa.org/en/latest/user_guide/messages/refac...
replies(1): >>45778212 #
2. spidersouris ◴[] No.45778212[source]
For type only though.