4 ms·
I love Django, and I love Python. But I wanted to share my least favorite thing about Django, the thing that will cause me to leave it after so many years: It
by unoti 11y ago
I love Django, and I love Python. But I wanted to share my least favorite thing about Django, the thing that will cause me to leave it after so many years:
It's in Python. Lack of static compilation makes it difficult to detect certain kinds of basic issues until later. Implementing realtime features (websockets, async things) is a less natural fit in Python than other languages. Lack of good concurrency is a more serious issue for me these days as I do a lot of work with game backends. I realize I could use Iron Python or something to get around this, but that doesn't solve the other issues here. The amount of horsepower that I get per megabyte of RAM used in Python vs other languages is also pretty sad. Other compiled languages now are available that stand up to high concurrency loads better on the same hardware for the type of work I do.
For years I've stuck with Django because the admin system and other features let me make fast progress with new projects quickly. I spent a good amount of time with Node and with Go, but lately I'm excited about Elixir and Phoenix, and it looks like that's going to be my go-to toolset for the next few years.
- dguaraglia 11y agoI feel your pain. I've recently been working on a Java codebase and as 'ugh' as that is, having some sort of type system that you can rely on at compile time helps a lot. Of course, there's the added boilerplate when writing tests that almost takes away from the gains... and the 5 minute time to bring up the server, but that's a completely different issue.
- unoti 11y agoThat is exactly what's so exciting about Elixir to me. It's homiconic, like LISP, so being able to execute code at compile time can have a game-changing impact on reducing boilerplate. And in addiction to that, it's functional, so I can get the awesome benefits of immutable programming, but without the dizzying complexity of, for example, Scala's type system. And it's based on the Erlang VM, so I get the benefits of battle-hardened concurrency and IO underpinnings. Previously I stayed away from things like Go and Node/Express, because I felt like it wasn't as easy for the type of work I do as Django, and was missing key things like the admin interface. But when I looked at what's in the Phoenix framework[1] and read the source, it started to feel like I'm witnessing the dawn of the next Ruby on Rails revolution. http://www.phoenixframework.org/ http://www.phoenixframework.org/
- merb 11y agohm I switched mainly to Java/Scala cause of the testing bits. I mean I have a really fast H2 InMemory database that is way closer to prod than any SQLite solution + ORM. Next of DI.. I could just create a new Module/Dependency for my tests. However I'm still lacking expertise in the testing bits.. Still looking for good books.. About specs / mockito, integration tests etc..
- rattray 11y agoI feel you too. I have found SublimeCodeIntel to be quite helpful even without static typing, fwiw. And I've heard even better things about PyCharm. But I also wrote almost the same thing in my feedback - Python's lack of static typing is a major bummer. Have you tried Python 3? (I know there are valid reasons not to). But it has function annotations, which are enforceable through tools like typeannotations[0] or mypy[1], and much better support for concurrency with asyncio, and async/await/yield from/etc. Note - I haven't tried these features, I'm curious for the opinions of those who have. [0] - https://github.com/ceronman/typeannotations https://github.com/ceronman/typeannotations [1] - http://mypy-lang.org/ http://mypy-lang.org/