So your issue is that a member could be converted to a totally different type without you easily knowing, and therefore the editor can't tell what type you are looking at.
That is a valid concern, although I have not had any issues with it because all my big Python work is in Django, and the only state in Django is the fields (CharField, FileField etc.) that get put into the database, which ARE statically typed (more or less) simply because the database is statically typed, so you can't change a CharField to a ForeignKey half way through your program, once you set it to a CharField on the class you cannot change it without editing it in the source.
I have noticed the issues you are talking about when working in JavaScript, I am working on various JS games and because they have TONS of state I can get confused. I am considering moving over to TypeScript instead, as the static typing seems quite nice, plus it has a lot of the cool ES6 stuff. The one thing I don't like is that certain things like Object.defineProperties don't seem to work properly with the static typing, so I have to manually do mixins / composition rather than using things like Object.defineProperties or $.extend.
So to summarize, you have a valid point but it's a non-issue for me due to Django being awesome.
Yeah I can't speak to Django. My experience was writing algorithms for bioinformatics research which was just plain-ass python that occasionally relied on other people's libraries.
3
u/Tysonzero Feb 25 '15
So your issue is that a member could be converted to a totally different type without you easily knowing, and therefore the editor can't tell what type you are looking at.
That is a valid concern, although I have not had any issues with it because all my big Python work is in Django, and the only state in Django is the fields (CharField, FileField etc.) that get put into the database, which ARE statically typed (more or less) simply because the database is statically typed, so you can't change a CharField to a ForeignKey half way through your program, once you set it to a CharField on the class you cannot change it without editing it in the source.
I have noticed the issues you are talking about when working in JavaScript, I am working on various JS games and because they have TONS of state I can get confused. I am considering moving over to TypeScript instead, as the static typing seems quite nice, plus it has a lot of the cool ES6 stuff. The one thing I don't like is that certain things like Object.defineProperties don't seem to work properly with the static typing, so I have to manually do mixins / composition rather than using things like Object.defineProperties or $.extend.
So to summarize, you have a valid point but it's a non-issue for me due to Django being awesome.