Live data from Hacker News

JavaScript is Good, Actually

ashfurrow.com

121–130 of 369 posts

Re: JavaScript is Good, Actually

#121
> equality in JavaScript is a bit bizarre

That flux capacitor diagram is super interesting but I think it is missing a point. The bizarre equality happens due to truthy and falsy evaluation, which is a very practical concept that saves you a lot of time when you actually want to get shit done.

Re: JavaScript is Good, Actually

#122
post #63

Earlier quoted context omitted.

> easy accessibility of higher order functions (AKA functions as a first class object from the get go) C and Assembly are probably the only languages left where this isn't the case. And even C has the blocks extension on Apple platforms, although I would take the "easy" part out of it given the lifetime semantics.

This wasn't true in Java until 1.8 and the addition of Functional interfaces though. I wasn't trying to name any languages in particular but that was one. I've seen java developers struggle with the concept of futures/promises while for web developers it was covered in Javascript 102 and they've been using them day in and day out for years. This was the benefit i meant. Also, I wonder if anyone actually uses http://l…

We are in 2018, Java 8 was released in 2014.

Before we used anonymous classes for the same effect.

Also plenty of developers on the Java platform are polyglot.

Re: JavaScript is Good, Actually

#123
post #39

Semantics and configurability is what what makes a language great. JS doesn’t have function environments, i.e. every unlexical lookup goes to global/window and that cannot be redirected. It doesn’t have green threads (at least). There are generators, but one cannot just yield without marking all the functions generators too (async/await in modern terms). Stack traces are lost when generators throw(). JS has no good i…

Imo, all people saying that some language or tech is good enough seriously lack imagination. Things could be so much better.

Re: JavaScript is Good, Actually

#124
post #55

Earlier quoted context omitted.

I think that much of these criticism relate to the implementation, and the runtime (i.e. browser) rather than the language itself. As a scripting language for a browser environment it's pretty good. Modern variants have lots of lovely language features and tools like babel mean you can use a lot of these new features without sacrificing backward compatibility. The threadless/nonblocking model is "interesting" but in…

There are a lot of valid criticisms against JavaScript. This is a fact. It's not a great language (clearly demonstrated by the discussion about it being good or not) but it's not terrible. I doubt anyone calls JS terrible on its own merits. There is a lot of hate against the runtime (edit: I mean the browser, not JS VMs or interpreters). The runtime enforces JS and the runtime itself is enforced everywhere. There is…

The difference between the hostility to php and the hostility to js is that there are many alternatives to php whereas, right now, if you want code to execute in the browser or on many different platforms, you don't have a choice. So where I would normally tell people who boo php to use whatever language they prefer, and get over it, that's not possible with js.

Re: JavaScript is Good, Actually

#125
post #93
post #35

This is a lot of lines for not saying much. I was expecting much more from a "world-class software developer"(see About section) :) Saying that the community is more advanced in the JavaScript ecosystem than it is in the iOS world is a nonsense to me. Don't we have more JS developers than iOS developers ? Moreover, saying that JS syntax is really good with tools like TypeScript is another nonsense. You can also write…

That's interesting because I also picked up on that: "I am a world-class software developer living in New York’s East Village" and I just thought, hmm, here's this guy with ~5 years of ~professional dev(mainly with iOS) and he self qualifies himself as world class. Looking at his bio, I see he's worked for 3 companies doing quite ordinary things. I would love to know what gave him the confidence/ignorance to describe…

Millennial-ism

Re: JavaScript is Good, Actually

#126
post #53

Earlier quoted context omitted.

1. We've had higher order functions since 1960s, it's not a new discovery that is singular to JS, that award goes to LISP and Scheme. 2. Concurrent execution has also been introduced in the 1960s (Dijkstra 1965), Ada and Erlang supported that behaviour since the 80s. 3. LISP has a type system and basically any LISP runtime will yell at you for comparing strings with numbers just like that. SBCL can do this check at c…

> 1. We've had higher order functions since 1960s, it's not a new discovery that is singular to JS, that award goes to LISP and Scheme. My point wasn't that javascript invented higher order functions, it was that making them first class isn't something all languages have chosen to do, and is clearly a good choice. > 2. Concurrent execution has also been introduced in the 1960s (Dijkstra 1965), Ada and Erlang supporte…

> people from Java Java will continuously bash JS as being the worst language they've ever seen.

Rightfully so.

What positive things can we say about a programming language where this is valid code?

[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!!)

Just a snippet, more fun can be had at http://www.jsfuck.com/

Or the community tradition of writing one liners as npm packages?

Re: JavaScript is Good, Actually

#127

Oh man, I hate these articles as they bring out the trolls. Javascript is a great language because it allows you to develop incredibly fast (scripting language) for a platform that runs everywhere (the web). It used to be far simpler, but IMHO, insecurity because of all of the FUD that this sort of article prescribes, has meant that the language has bloated to incorporate all sorts of syntax improvements and new patt…

My mobile devices and ChromeOS adoption of Linux and Android native apps prove otherwise.

Re: JavaScript is Good, Actually

#128
post #68

I am primarily a C++ dev and had to use JS for web development. Having no previous scripting experience, I was gobsmacked at the ease and freedom it offered, especially wrt string processing. You need to have been a monolingual C++ dev to appreciate what I said. I don't hesitate to say I like JS. These days I try creating any small experimental programs I need in JS and run them in FF instead of starting the whole bu…

Why not use node so you can avoid the browser and the extension?

Re: JavaScript is Good, Actually

#129
post #31

To me JavaScript is very similar to VBA. Based on its own merits it’s a pretty average language with lots of design flaws. But it has a monopoly for what it does (browser/cross platform vs ms office scripting) and most of its users never really got a chance to solve the same problems with a better language. And like VBA, it is probably the only language known to the bulk of it user base (semi-amateur web designers vs…

>Based on its own merits it’s a pretty average language with lots of design flaws. I don't really judge a language based on the number of design flaws. That is like judging a computer based only on its specs. >and most of its users never really got a chance to solve the same problems with a better language. I don't really think there is such a thing as "better languages". Also your statement is probably true, and was…

> Web Assembly is not supposed to remove javascript, it is supposed to be used in addition to it when you need high performance. If people try to promote it as a way to not have to use javascript, it will just result in a more fragmented client-side programming situation, where libraries are not available for particular languages, etc.

I guess you have been missing the news what is being done in Go, Java, .NET, Rust, Unity and everyone else regarding WebAssembly.

We will have the revenge of plugins, like it or not.

The only way out is if the browser vendors backtrack and remove WebAssembly support.

Re: JavaScript is Good, Actually

#130

Oh man, I hate these articles as they bring out the trolls. Javascript is a great language because it allows you to develop incredibly fast (scripting language) for a platform that runs everywhere (the web). It used to be far simpler, but IMHO, insecurity because of all of the FUD that this sort of article prescribes, has meant that the language has bloated to incorporate all sorts of syntax improvements and new patt…

>It's not a systems programming language, so all the comparisons against typed, compiled languages are moot.

No they are not 'moot'. At least not if you're building applications with 100k+ LOC. For dinky websites and small projects I'm with you.

>Introducing transpiling as a mandatory pattern for JS development was a mistake.

Again, what are you building? A dinky website, or a large application that you'll have to maintain for the next 10 years?

Post reply on HN