5 ms·
.net core is pretty cool. they even adopted a similar api to express if I remember well. Yeah it's fast too. faster than node. typed etc. but C# is a complicat
by dzonga 3y ago
.net core is pretty cool. they even adopted a similar api to express if I remember well.
Yeah it's fast too. faster than node. typed etc. but C# is a complicated language. and it keeps adding features. the have awesome tooling in .net world etc.
but you know why javascript / node.js shines. JS is a simple language. of course lisps are simple i.e clojure. but only one other language comes close to the simplicity of javascript -- golang.
but is golang malleable as javascript ?
the only thing that might suck in the js world is tooling. but in terms of server things i.e consume json / transform json which is what informational based applications -- i.e the majority of the apps most of us work in. node.js is unmatched in terms of productivity
so yeah node.js gets you 80% of the results with 20% of the work.
- pier25 3y agoJS kinda sucks for anything complex though. That's the reason almost everyone has switched to TS and then you lose the malleability and simplicity of JS. At which point why not just use C#?
- dzonga 3y agoand why are you using TS to begin with ? and yes I agree if you're gonna jump on the typescript wagon, why not use C# etc. types are good ? yeah ... but to a limit. Tests make for better programs than types. Using values too instead of mutations etc. Rich Hickey - makes a good point in his the Value of Values talk. and another point -- someone is gonna mention about node.js libraries being abandoned etc -- I don't know which exactly -- but if you stay in the express ecosystem and create your own middleware instead of just importing everything willy nilly you will go far. and the major libraries for databases, redis and api stuff have been stable for a long time. Express is still version 4 and has been for a long time. Countless frameworks in the other language ecosystems have changed a lot since then .net, rails, django etc. new features -- deprecations etc. and you know what has stayed with the same simple API ? Express
- HumanOstrich 3y agoThat's because Express has been seriously neglected for the past 10 years. That's why it's still version 4. I think you still have to hack in basic support for async handlers. Performance is bad. Bad as in all the other frameworks use it as a baseline for their benchmarks lol.
- neonsunset 3y agoThe API adoption is in many ways the other way around - for example, a lot of JS frameworks are now mimicking HttpContext that ASP.NET and ASP.NET Core had for more than a decade. Ultimately, registering and routing endpoint is usually a smaller part of the project, but yes, the introduction of minimal API especially in combination with top-level statements is welcome Otherwise, JS is an immediate productivity loss as you cannot trivially refactor the code, a lot of features exist to mimic strong typing (or you just use TypeScript instead), it cannot be directly compared. You use JS when it makes sense, when you have to. Pure back-end is not that situation.