3 ms·
Ask HN: Language/framework suggestions for next web project
Hey HN, I've been growing more and more disgruntled with dotnet core for various reasons, so I'm looking to branch out into other languages for my next web project. I've got a lot of experience with C#, F#, TypeScript and JavaScript. I love F# and functional programming, so I'm hoping to find another language that supports at least pattern matching and pipe operators. However I've also got a lot of experience with object-oriented programming so I wouldn't say no to something like that either.
My main requirement is that the language has good tooling that works on Windows, specifically WSL (native Bash on Windows) and VSCode, though it will be deployed to an Ubuntu server in the end. I prefer static type-checking and immutability. I don't have any hard performance requirements or anything like that, I'm just going to be building small web app projects.
I've done a little bit of research and I'm interested in looking at Haskell, Go and Kotlin. I'd love to hear suggestions from other devs here on languages/frameworks I should look at next. Bonus points for a language that has some kind of language-to-javascript transpiler like F# does with Fable.
Anyway, Merry Christmas and Happy Holidays!
- auslegung 9y agoElm sounds exactly what you want. Compiles to JavaScript, functional programming, designed for webapps, makes sense to use Haskell on the backend with Elm on the frontend.
- 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.
- twobyfour 9y agoFor some reason, the mention of pattern matching made me think of Perl. Not that Perl is something I'd suggest anyone learn these days for career advancement purposes; but if you want to twist your brain in new directions it might be worth a try.