This kind of rant, culminating in a hackneyed "created in a week" insult, usually comes from backend developers who jumped into frontend work thinking it was a silly little thing that could be mastered in under an hour, discovered that it was a whole separate field, and still failed to adjust their priors. This time it comes from a "former Delphi product manager" turned clickbait writer. I just hope that my visit wit…
I love JS. Well, that's not true. I love it, and then I hate it, and then I love it again. And I am not sure how to respond. It has warts. I have seen a staggering amount of flavors / styles of JS. It is a really expressive language. But that is kind of a cope. You will figure out how to express your wildest ideas. But you will struggle to read others code. Multithreading is...weird to say the least. Are people spinn…
Just Say No to JavaScript
31–40 of 86 posts
Re: Just Say No to JavaScript
#32Earlier quoted context omitted.
At that point sir you would have no job. Your job is logic safety
My job is to produce more value than I cost. Otherwise you're going to get laid off anyways.
Re: Just Say No to JavaScript
#33Earlier quoted context omitted.
> it's because it needs a compilation step, and I don't want that Why? The seconds it takes to compile even a large project are paid back a million fold everytime it catches a mistake you'd have missed or your IDE out you used the wrong type. It's probably not listed in the article because it's a nonsensical argument.
>catches a mistake you'd have missed or your IDE out you used the wrong type. Do people really have this issue? My errors are never type related and when they are the console tells me immediately and the exactly line to fix. What I need is a StupidScript to save me from the stupidity of my logic errors… Like for example I’m working on a custom game engine for a web game I’m making, I’m having issues with the rewards…
Once you have written down the shape of the data flowing through your program in a way that a compiler can check you'll be able to reason about the whole program better and you might find issues much faster.
I think that types can directly help a lot with logic errors as well: one of the things people say most often when discussing typed programming language is that you can make illegal states unrepresentable, which means that you can encode logic into the type system itself.
Re: Just Say No to JavaScript
#34Earlier quoted context omitted.
> it's because it needs a compilation step, and I don't want that Why? The seconds it takes to compile even a large project are paid back a million fold everytime it catches a mistake you'd have missed or your IDE out you used the wrong type. It's probably not listed in the article because it's a nonsensical argument.
>catches a mistake you'd have missed or your IDE out you used the wrong type. Do people really have this issue? My errors are never type related and when they are the console tells me immediately and the exactly line to fix. What I need is a StupidScript to save me from the stupidity of my logic errors… Like for example I’m working on a custom game engine for a web game I’m making, I’m having issues with the rewards…
Over the years I feel like I have read this comment at least ten times from different commenters (and the second time this month) and I cannot really fathom it. I consider myself a pretty good developer, and I have type errors many times a day. It is perhaps the most common error I encounter, and thankfully one of of easiest to fix with static typing.
By far the biggest recent productivity gain I have made using types is by generating the types along with client code for APIs via a swagger doc. I cannot overstate the value in seeing the types update when the backend devs have changed the API, and getting a compiler error when it doesn’t match with your code. By having the types the next developer after me is going to be spending far less time getting up to speed with the codebase.
I started programming with static types early in my career so perhaps I have become wired to lean heavily on the type system.
Re: Just Say No to JavaScript
#35Re: Just Say No to JavaScript
#36It is not at all "say no to JS". It's "use my preferred flavour of JS instead."
I want to return to the pre-JS internet and especially the pre-JS Web.
Say no to Javascript at all in any variant. Also say no to PHP. Nothing of lasting value to humanity would be lost if both of them went away completely, forever.
Re: Just Say No to JavaScript
#37Re: Just Say No to JavaScript
#38I don't get the "type checking is the solution for the problems of the world". A lot of good things were/are written without type checking. Most of the problems I see in production have nothing to do with the wrong type being used or some forgotten required parameter. Also, typescript is just javascript with a mustache. It's the same thing
Re: Just Say No to JavaScript
#39I like opinion columns and would love to see more about software development, but this one feels like it's going for the lowest of hanging fruit. Anyone who cares about JavaScript either way will already have an opinion and won't be won over by a humorous take.
I do like the author's style though, so don't interpret this as crapping on his work. Looking at the "More from this author", it seems this is his genuine style, and I found some of his other pieces to be good reads. More please.
Re: Just Say No to JavaScript
#40The author seems to ignore the fact that type hints are a thing even with plain JS. Serious question: does the author "just say no to Python" as well? If lack of explicit typing is the issue, then his rant would apply to most scripting languages and to single out JS seems odd to me...
JS is in a different spot where to benefit from type checking you have to add a build step or reconfigure your build tool, switch files to another extension, add some "type stubs" dependencies, and make significant changes to the codebase to benefit from type checking.
I think if Node and the browsers started allowing type hints in their parsers you'd see much less resistance to TypeScript.
Other scripting languages are probably not popular enough to matter as much as JS does.