How I wish that Python had...
Declaration of variables, because I have wasted so much time with spelling mistakes (I have forbidden myself from typing the name twice, I have to copy and paste.
Declaration of type, as a beginner I see variables and I don't know what type they are. Yes, that can change but I'd rather know.
The ability to syntax check my code at the push of a button. If it's possible, I don't know how to do it.
August 7th, 2017 3:53pm
I think that I used it yesterday. There were numerous problems with my code, half of which were excessive spaces and new lines. But I see that there are IDEs with it integrated so I will give it another go.
August 7th, 2017 4:29pm
...visible block structure.
Number one son keeps asking why I don't do python. Me: too many years of FORTRAN with significant whitespace.
August 7th, 2017 6:23pm
After going from PHP to a strongly typed language like C#, it makes me really appreciate the error correction benefits of languages that make you declare your variables.
August 7th, 2017 7:02pm
I have long said that typing should be supported by all languages, even if only optionally, because of the benefits. Type and name checking are too cool to go to waste.
August 7th, 2017 7:38pm
And just the fact of having a variable dictionary (or one per scope) is a great benefit to organisation.
August 7th, 2017 7:40pm
+1 for all of this stuff. I like Python, mostly, because it's got a ton of stuff in its standard library and there's not much boilerplate for small programs. But once my programs get to around 500 lines, they tend to become a bit unmanageable. All of the Python stuff that's helpful when you're putting together a quick and dirty prototype/toy program becomes useless or a hindrance when you try to scale up.
Unit testing helps, but you're still building on a shaky foundation. (It's not like statically-typed languages prevent you from having unit tests, anyway.) If you want to be thorough about things, you also end up having to write a lot of checks for things that a statically-typed language simply doesn't allow you to do in the first place.
Overall, this sort of language just gives you more ways of writing wrong code, fewer ways of telling the computer how to check your code, and you never find out any of it until runtime. For a small program, you can manage - but for a large one, this tradeoff is stupid. Things I'm not good at: tracking the type of every last thing in my program and checking that I'm not doing the wrong thing anywhere in the fifty odd files. Things the computer is good at: DOING EXACTLY THAT. So why make me do it? This is crazy.
August 7th, 2017 8:58pm
Yeah, imagine you write a program that fails because of a syntax error. 2 years after you have written it. Good luck with that.
August 7th, 2017 10:25pm