←back to thread

310 points brylie | 2 comments | | HN request time: 0s | source
Show context
peternilson ◴[] No.43512862[source]
Django still lacks typing support. Does Plain improve on this at all? I didn't see typing mentioned in the docs..
replies(3): >>43512910 #>>43512916 #>>43513078 #
sroerick ◴[] No.43512910[source]
If you want strong typing in a web framework, why wouldn’t you just use a language with strong typing?
replies(4): >>43512968 #>>43513290 #>>43513554 #>>43516333 #
rtpg ◴[] No.43512968[source]
Because people want strong typing, but also want other things. It's possible to want multiple things, and bemoan that whwat you use is still missing things you want.

Concretely, Django is way more usable than basically any web framework from the "strongly typed" space, especially for "dumb" CRUD stuff. And you're not hit with making decisions about how to do a bunch of things (though you can swap out mostly any part of Django for something else if you want to).

replies(3): >>43512999 #>>43513038 #>>43513750 #
1. sroerick ◴[] No.43512999[source]
That makes sense! My personal feeling is that a web framework is not the right place in the stack to introduce typing.

There’s also probably an argument to be made that part of the reason for Django’s “batteries included” success and wide adoption is in part because it is built on an untyped language.

I get wanting both, though.

In my own work, I find most of the benefit of static types to be ensuring correctness at compile time, so I just don’t expect that in Python. I also have just not lost that many cycles to type errors. But I know some have strong preferences here.

replies(1): >>43513971 #
2. 9dev ◴[] No.43513971[source]
The main benefit in the developer workflow is autocompletion and feature discovery in the IDE. Having to guess which methods and properties an object exposes, or jump to the documentation every time, is really frustrating. Compare that to e.g. Typescript, which excels in this area.