Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
When I say the JS project I worked on is twice the size, I mean it has twice as many features (and probably needs to be broken up a bit). It probably has fewer lines of code.
-
xroad23188yI don't think the argument is that statically typed languages and have bad code. I think the idea is that they are less likely to produce code that is bad
-
debug2478yWell, the problem here does not seem to be with typing but rather going willy-nilly with side-effects. If only Haskell style purity were the norm, a lot of these would be gone.
-
debug2478yThe problem with these kinds of languages is you can't go purely functional even if you were fully disciplined to. How will you get monads and such if you don't have proper typing like HKT and nicer parametricity?
-
zzguy6028yYes! Sometimes I feel like I'm going crazy thinking this, its good to hear another out there. What are these terrible bugs they're talking about? Did I miss the fucking memo or something? Do they concat strings to ints all the time or something? Most bugs I've encountered are from inconsistent state flying around shittily-named, over-engineered, misspelled, objects that are following an irrelevant design pattern, supporting a feature that nobody gives two shits about! How does static typing address that shit?
-
@debug well, obviously you don't, which is a shame because Haskell's type system is one I really like. But you can still use immutable data, write pure functions and combine them with HoFs so the code is intelligible and maintainable.
I was really putting the boot in to C# and Java, which have been used to write so many lines of fucking terrible, buggy, confused, side-effect laden code that I can't believe they still have such a grip on corporate development. -
@zzguy Exactly! Perfectly put. Like, about once a year I have to fix a bug that makes me think, "oh right; c#-style typing would actually have caught that" - is that worth the extra cognitive workload of constantly appeasing the type system?
Related Rants
-
tahnik63So I need to create a nice new web app. Let's look at some cool JS frameworks that I can work with. *5 mins l...
-
robson40Does anyone else suddenly lose the ability to type properly as soon as someone is watching/pairing?
-
ahmedam23What only relying on JavaScript for HTML form input validation looks like
Pet peeve: the claim that static typing prevents errors.
Today I worked on a C# project that's a mess of nulls, side-effects, inferences, and race conditions. Then I went back to a JS project that's twice the size but written in a clean, well-tested, FP style and currently has fewer than 10 issues logged.
Look, I get that there are upsides to static typing, and I'm open to introducing typescript or flow for our JS code.
I just can't stand the faux-concern from the static typing dingleberries when they are the ones who produce these horrendous lumps of unmaintainable shit, and the JS/Python/Ruby/etc people are over here quietly reinventing functional programming and code modularity.
undefined
js
fp
typing
peeve