News for hackers. Stuff that matters.
Re:Weird Languages by LAC-Tech on Saturday August 28, 2021 @07:11AM (#28337183)
I'm a javascript fan. I think it's a good language and for the most part I enjoy programming in it.

However I am not going to argue that the median javascript user is as smart as the median ocaml user. 99% of people learn javascript because they have to. Most people learn ocaml because they are enthusiasts. They're interested in programming language concepts and becoming more effective.

Re:Weird Languages by tasuki on Saturday August 28, 2021 @09:41AM (#28337961)
Why do you think JavaScript is a good language?
Re:Weird Languages by Matthias1 on Saturday August 28, 2021 @10:08AM (#28338194)
I'm a big fan of Javascript. It runs everywhere, is easy to write, is brutally flexible.

I would never call it a "good" language. It is an abomination created by the dev teams at 4 different browser companies over the course of 20 years with no coordination between them.

Re:Weird Languages by runevault on Saturday August 28, 2021 @10:48AM (#28338504)
And the original version was banged out in a very short time period to create a feature. Then everyone else just piled onto it w/o consideration for the consequences.
Re:Weird Languages by SavantIdiot on Saturday August 28, 2021 @01:28PM (#28339796)
It is wildly flexible, aligned with how programming is taught, and infinitely documented.

It is the swiss army knife of programming. Even top-tier hackers use it as a primary tool. Check out Frida[1], it uses the Chrome v8 engine to inject parasitic tracing code written in JavaScript into any OS (incl. android & ios). There's no language that would have fit the bill like JS+v8.

[1] https://frida.re/

Re:Weird Languages by goatlover on Saturday August 28, 2021 @11:39PM (#28343877)
Isn’t V8 written in C++? There’s no reason Python can’t be as much a Swiss Army knife, except that it doesn’t run in the browser, which was just a historical matter that it was JS and not some other language. Tcl was proposed, and Sun tried to get Netscape to run Java natively.
Re:Weird Languages by SavantIdiot on Sunday August 29, 2021 @11:55AM (#28347736)
Thank god it wasn't TCL.
Re:Weird Languages by Mikeb85 on Saturday August 28, 2021 @01:40PM (#28339898)
JavaScript is basically a lispy core with Java or C esque syntax and a bunch of features from all other programming languages incorporated over 20 years. It's fast, flexible and easy to learn. Just look at all the things that have been built in JavaScript...
Re:Weird Languages by Scarbutt on Saturday August 28, 2021 @10:56AM (#28338549)
There is a useful and practical small diamond hidden in the big ball of mud.
Re:Weird Languages by dunefox on Saturday August 28, 2021 @11:41AM (#28338904)
Yeah, it's called Lisp.
Re:Weird Languages by dunefox on Saturday August 28, 2021 @02:46PM (#28340431)
For those who are downvoting me: Javascript was deliberately invented to be Scheme without the Lisp syntax... Jesus.
Re:Weird Languages by LAC-Tech on Saturday August 28, 2021 @06:52PM (#28342251)
Javascript would be amazing with s-expressions and hygienic macros. One of the biggest missed opportunities in our field.
Re:Weird Languages by goatlover on Sunday August 29, 2021 @12:04AM (#28344001)
Via the Self programming language. That’s where prototypes come from. Self messages were closures, so JS functions are first class. Smalltalk was considered to be in the spirit of Lisp, and Self replaced classes with prototypes. That or Brendan Eich was mixing several features from expressive languages.
Re:Weird Languages by LAC-Tech on Saturday August 28, 2021 @06:51PM (#28342240)
- Relatively expressive

- Relatively fast

- Enormous ecosystem - the "good parts" of which still have practically everything you need

- Top notch typechecker in the form of typescript