4 ms·
> I prefer static type-checking and immutability. Building large software centered around web requests and responses make immutability and type checking more o
by git-pull 9y ago
> I prefer static type-checking and immutability.
Building large software centered around web requests and responses make immutability and type checking more of a hindrance than a help. Stuff needs to be tweaked and changed, and in many frameworks there are request and response objects that are inherently mutable from the ground up. As a feature, not a bug (e.g. request middleware, template context middleware, so on).
There's kind of a pipeline going on with the request/response process. So in my experience doesn't fit well with the typesafe / immutable nature of web apps. Type safety always feels like it's effective, but I've found it's only piece of mind sometimes.
That said, if it's something you insist on, I hear great things about golang. Web apps I played with compiled as fast as it takes a Django web server to start.
Test coverage in duck typed languages goes pretty far. And I understand the cognitive dissonance early on. But these web-specific languages are really handy if you're just doing a website.
This is just my opinion, but I think something more like PHP, Ruby, and Python gives you more velocity and better tooling. Even on Windows. If you use the Python Support for Visual Studio plugin, there's even a template for Django: https://docs.microsoft.com/en-us/visualstudio/python/template-django https://docs.microsoft.com/en-us/visualstudio/python/templat...
Even though Python has stuff like mypy (type safety annotations), I don't think they're worth it for web apps. It's hard to meet the case unless you have >25k lines of code. And it's harder than it looks to get that big with a duck-typed language with solid frameworks.
The other benefit with Python is it's a generalist language that's pretty popular outside of web development.
Oh, and one more thing: No compile times. It's nice to have a nearly instantaneous feedback loop when you're working on a website.