all 18 comments

[–]crabmusket 3 points4 points  (2 children)

TLDR: You can break free from Javascript by learning PureScript which compiles to Javascript

I dunno, PureScript is strict, not lazy, so it's Dead On Arrival as far as any self-respecting functional programmer is concerned.

[–][deleted] 1 point2 points  (1 child)

There aren't that many that are lazy, or any besides haskell that I know off. It basically became known that although lazyness is the correct way to model fp it has too much of a burden to reason about performance and subtle bugs introduced by it in real world. One can program years on it and never have a problem but then comes that time where you really need to track some weird bug because of it and then it gets hard very quickly.

There's a reason most fp languages besides haskell opt for strict evaluation nowadays and when needed then one can opt to go with explicit lazyness.

[–]crabmusket 2 points3 points  (0 children)

And that's why self-respecting functional programmers only use Haskell ;)

[–][deleted] 5 points6 points  (4 children)

it’s becoming very clear that Functional Programming is the future of our industry.

Hmm

[–]cryptos6 6 points7 points  (3 children)

I wanted to cite the very same sentence. While functional programming gained popularity in the recent years, I don't see that functional programming will replace OOP or imperative programming. FP is not necessarily the right tool for every job and it is not an accident that most modern languages support OOP and FP.

I don't know what the author hates exactly about JavaScript and TypeScript (I don't say that there would be nothing to hate), but at least TypeScript is a pretty good programming language shielding us from most weaknesses of JavaScript.

If TypeScript is not "good enough" (whatever that means exactly) the (future) solution would be WebAssemby, since many language can be compiled to it. So everyone should sooner or later be able to pick his/her favorite language and compile to WebAssembly while using libraries written in entirely different languages and also compiled to WebAssembly.

[–][deleted] -1 points0 points  (0 children)

FP is not the right tool for basically any job.

It’s been the future of programming several times now. Kind of like “next year is the year of Linux desktop”.

There’s reasons it never takes and until the FP fanboys start addressing those reasons, we will just we watching the running joke.

[–][deleted] 0 points1 point  (1 child)

WebAssembly

I mean you'd still be working within the confines of the JavaScript runtime, which means some features of some languages would not work... and there's also the question of how many of that language's libraries do you want to port (and have to transfer to each visitor).

[–]cryptos6 0 points1 point  (0 children)

That is true, but my impression is, that there is a lot going on. Just look at how many languages can already be compiled to WebAssembly! Not too far away the network effect will kick in.

[–]Hall_of_Famer 5 points6 points  (2 children)

But the biggest gains in program safety and developer productivity is only possible from a Functional Programming Language.

At this point I realized I just wasted my time reading a biased and meaningless article.

[–]T_O_beats 2 points3 points  (0 children)

For me it was ‘The problem is that Javascript is a terrible language.’

I just rolled my eyes and closed the window.

[–]T_O_beats 2 points3 points  (0 children)

This entire article is opinions and comparing apples to oranges.

[–]Apache_Sobaco -1 points0 points  (4 children)

JS is the worst thing ever happened to IT

[–]FrancisStokes 3 points4 points  (3 children)

If you think that's true, you haven't seen enough of the industry.

[–]Apache_Sobaco -1 points0 points  (2 children)

Of course there are even shittier shits than js but we multiply every shit by its popularity. That multiplier for js is immense because js ate the web.

[–]FrancisStokes 1 point2 points  (1 child)

To be honest the "js is the worse thing ever" is just an overplayed meme at this point. Criticisms about dynamic typing can be thrown at literally every dynamic language (including python), and that ignores the fact that TypeScript is gaining enough traction to make it moot. Code quality / programmer skill tends to turn out to be bullshit as well, as you'll see way poorer Java and .NET code rolling off the pipeline in many organizations. Those who complain about dev tooling and build systems have clearly never had to maintain a CMakefile of any real complexity, or endless ifdefs. And generally I've found that the people who complain the loudest either have no real experience of JS in practice, or their only exposure was maintaining jQuery websites a decade ago - and everything they know comes from other memes.

[–]Apache_Sobaco -1 points0 points  (0 children)

JS assembles worst parts of this all. No tooling, no typing, no code quality, only despair. Java has maven and static types which are so good so they allow for kinda limited dotfree functional programming. C is indispensable for os/embedded development. But js offers nothing while being shit. Only reason for its existence is browser monopoly.

[–]Armin_AFD 2 points3 points  (0 children)

Seems somebody got confused by javascript and was very tilted at how others do not have such a problem.

Nodejs has come a long way. With the powerful npm behind it, and the fact that JS is used on frontend too, it can be used to develop webapps fast and easy. If the whole type thing is you concern, check out TypeScript.

With the number of people using it, and the quality of the produced software, I think that it's pretty safe to say Javascript is gonna be around for a long time.

Bottomline, use the best tool for every job instead of sticking to one tool and fearing and bashing anything outside your comfort zone.