Earlier quoted context omitted.
JSON is seldom JS now, as any language has had encoder/decoder built in for years.
Sure, but there is boilerplate and abstractions that are needed in a language like Java or Scala. In JavaScript, it's a first-class citizen of the language.
JavaScript is Good, Actually
81–90 of 369 posts
Re: JavaScript is Good, Actually
#82Earlier quoted context omitted.
It seems you're not talking about JSON (the serialization format) but rather about Javascript's object literal syntax that inspired JSON. They're really different things.
Perhaps, but probably not. ES6 recognises the distinction, and includes native functions for serialisation. That's first-class treatment if anything is.
First class treatment would be if the language had JSON-typed objects with functionality, e.g. something like
const myJson = j'{"key":"value"}';
const value = myJson['key'];
const newJson = myJson.set("otherkey", "newValue");
(using the j'' notation for a hypothetical json-typed value)But AFAIK it doesn't, not even in ES6.
Re: JavaScript is Good, Actually
#83This 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…
Does "world-class software developer" even mean anything other than a big ego?
Re: JavaScript is Good, Actually
#84Earlier quoted context omitted.
What about: - easy accessibility of higher order functions (AKA functions as a first class object from the get go) - graceful inclusion/addition of concurrency-handling functionality despite the language being single threaded (this might be much more to do with the context javascript was to be used in) I agree with your sentiments on the value of type systems and compile-time type checking, but so many languages are…
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…
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 supported that behaviour since the 80s.
My point was not that concurrent execution was somehow invented by javascript, that would be an asinine claim. My point was that javascript has done surprisingly well to introduce these concepts to it's users (perhaps out of necessity given the runtime environment it's in), whereas concurrent programming is considered an advanced concept in other languages and isn't taught till very late if not at all.
> 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 compile time even.
this depends on the dialect of lisp you're using. SBCL will certainly do basic type checking and even advanced if you make use of `declare`. I'm not sure what I implied that would make you think I am crediting javascript with inventing type systems (?). I know lisp is great -- that's why I mentioned it as a language people highly regard, but is not compile-time typechecked depending on the dialect you're using, but people wouldn't say that makes it a bad lanaguage.
It's like you read my comment and decided that I said javascript was the best language ever invented. My point was that it's made some choices with some good outcomes. Java as a language consciously chose not to have first class functions for the longest time (1.1 to 1.8 IIRC), yet people from Java will continuously bash JS as being the worst language they've ever seen.
Re: JavaScript is Good, Actually
#85Earlier quoted context omitted.
What about: - easy accessibility of higher order functions (AKA functions as a first class object from the get go) - graceful inclusion/addition of concurrency-handling functionality despite the language being single threaded (this might be much more to do with the context javascript was to be used in) I agree with your sentiments on the value of type systems and compile-time type checking, but so many languages are…
> 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.
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://libcello.org/
Re: JavaScript is Good, Actually
#86Earlier 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…
I'm wondering what would be an example of a great language? Because we know that there are only two kinds of languages: the ones people complain about and the ones nobody uses
Re: JavaScript is Good, Actually
#87Semantics 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…
Are you aware of ES6 Proxy? I may be mistaken, but almost every example of an issue that you have with the language seems to be resolvable using Proxy objects. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
>almost every example of an issue that you have with the language seems to be resolvable using Proxy objects. I don’t think that light threading, introspection, scoping, etc is resolvable with proxy objects. If it is, it would be nice to know how.
Re: JavaScript is Good, Actually
#88Earlier quoted context omitted.
Does "world-class software developer" even mean anything other than a big ego?
Given his github profile, I think we can give him credibility that he is pretty good. https://github.com/ashfurrow
Re: JavaScript is Good, Actually
#89Re: JavaScript is Good, Actually
#90My developer friends do have opinions on JavaScript that are in my view outdated, modern JavaScript is my favorite peogramming language due to the ease of expressivenesss and joy to write it. I started out with C, C++, Java, Objective-C and C# before ever seriously using JavaScript (other than tiny snippets of front end browser dom manipulation) and may be I’m just getting old but... I’d love to use JavaScript for ev…