I don't get the Js hate. I have meaningful experience working in many languages (C++,Js,Ts,C# to name the biggest by LOC written). I've shipped nontrivial software in all of these.
I think Js is.. okay? I can name some strengths and weaknesses,both of the language itself and the culture/ecosystem, but I certainly don't hate it.
Javascript is actually a great language. Its garbage-collected closures made it easy to do GUI programming.
The C/C++ world where browsers came from didn't have this (closures). So it is actually a miracle we got a language as (relatively) great as Javascript.
It was a missed opportunity for a mature language like Scheme which had at the time all the good parts, none of the bad parts and the only issue was slightly unfamiliar syntax.
I like Scheme syntax but someone coming from a C-syntax background can easily understand this in the first look:
const add = (a, b) => a + b;
And may need to read this a couple of times because of the lone "+" and the parentheses:
(define (add a b) (+ a b))
... and this is the simplest of examples. It's not slightly unfamiliar syntax. Perhaps Rust is slightly unfamiliar syntax, if we mean really just the syntax - as in, you can tell where the functions start and end.
You could also say that Scheme has very little syntax, for example, no distinction between statements and expressions, no operator precedence, and nearly zero reserved punctuation. So I'd argue that it needs more adaptation because it is less.
I was banished from golang communities when I said that a language should deviate from already established standards only when it has a good reason to do so. I remember it being quite ironic that golang took pride in not overloading names, and then... overloaded the English word "go". It's really unreadable unless you specifically study golang.
I could go on very long how much I hate golang for its stupid syntax alone, even before we dive deeper into its broken features.
Regarding Scheme itself, functional languages never gain traction because both humans and machines think imperatively. Yes, functional languages are a beauty for someone who understands them well, and in some specific use cases, but I still remember that as a student I finished my project, I just needed to add a few prints... oh fuck I need to rewrite the entire thing just to add "print". Never touched functional programming again, except for functional elements in imperative languages.
I have plenty of issues with how much of a giant leap backward in expressiveness golang represents, but your entire contribution was to troll the golang communities about the language's name. You deserved the ban.
I expressed myself wrongly. At the time I tried to make a sensible argument, and kept the sillyness to myself. Now I don't care, because I stopped having professional contact with it long ago.
Each to their own I guess, by personally I really don't like closures (at least ones that as per their namesake, close over objects with nontrivial lifetimes).
I think it was the right call by the C++ people to explicitly list what objects are captured and how, even if the syntax's not the best.
RAII is a fact of life unfortunately, not just in C++ or Rust, but if you talk over some high level protocol over the internet you go TCP socket->HTTP connection->your stream protocol; and have to do the exact reverse.
Closures break RAII hard.
Incidentally, you don't even need closures for nice looking UI code. Immediate mode GUIs like Dear Imgui or Clay allow for super-simple looking code in basic C
> I think it was the right call by the C++ people to explicitly list what objects are captured and how
Having recently worked a lot with Rust, which does this implicitly - I find the explicit notation entirely unnecessary. There's only one choice - are captures moved into closure or passed by reference? - and everything else is inferred. It does lead to some verbose cloning when there are many refcounting pointers at play, but other than that it works flawlessly; I've never been in a situation I couldn't do something I wanted to.
I'm confused by the point about RAII. Why are you saying that closures break it? Personally, I found that closures complement RAII very well - the closure owns its resources, and when it goes out of scope they're all cleaned up automatically. Or do you mean situations where resources outlive the closures? This is no different than any other object that needs a reference to something that lives longer.
Clay's algorithm actually does many passes, that doesn't mean it invokes the UI function multiple times. You are allowed to retain state during computation.
Jetpack Compose splits this into measure and layout passes, and running either pass twice crashes the UI. They can do this because they are faking immediate-mode on top of a retained-mode layout tree, sort of like React.
In the last few decades the hype around GC kind of faded because GC is literally a complex solution designed to fix only one single class of leaks - memory leaks - which often makes other kinds of leaks (mutex, file descriptors, handles, ..) actually harder to handle unless the language is carefully designed around them. Just look at Java's `try()` or `with` in Python, etc, which are afterthoughts added later. RAII may be rudimental but it can potentially fix all classes of leaks by introducing deterministic lifetimes and scopes which aren't tied with the resource itself. There are other solutions for this? yes of course, but the success of Rust which is literally built over a stronger, deterministic form of RAII kind of makes debatable whether a better system is needed at all. Especially since LLMs are excellent at Rust and kind of make opting for "weird" languages moot. And I say this as a person which _loves_ niche languages and language design.
Nowadays you can probably vibe/slopcode whatever you need with just a bit of Rust, Python/shell scripts as glue and maybe Javascript if it's a webapp (but we'll likely replace that with WASM soon I'm afraid)
Rust, unfortunately, lets you express lower bounds on lifetimes but not upper bounds. There is no way in Rust to express “this object must be released by that point in the program,” a guarantee which is extremely useful.
It kinda does that, by using borrows. If A borrows B, then the upper bound of A's lifetime is the borrow of B. You can control the lifetime of the borrow by creating a new mutable reference to B at a particular point (works regardless of whether the original borrow was mutable or immutable).
It is perhaps one of the greates languages, and honestly it is more or less a Perl for the web for those who have the eyes to see it. It is the only reason I'm not sad about Perl. But it WAS is more correct, as JS was abominated in many possible ways. But it was also written on the wall perhaps 5-6 years ago when Rust started to target wasm, that the days of JS are numbered. Now with LLMs we should see a very steep decline of it.
It’s become okay in the past few years after two decades of absolutely Herculean effort of the whole industry and some particularly dedicated individuals.
The foundation is still abysmal, but it doesn’t hurt because you don’t have to look at it anymore or you can use modern facilities instead. Note the striking similarity to what LLMs give you, it’s the same thing on a higher level.
I don't disagree on this; I transitioned from a backend heavy role rendering ASP.NET Razor templates to the bold new world of SPAs in the mid to late 2010s, and some things were genuinely baffling like What do you mean the compiler(bundler) generates invalid code?What do you mean the bundler is unfixably broken, and I should use a different one?Oh, that's unfixable as well?
That framework churn, leftpad, etc. stuff I think is something the JS community will gladly memoryhole. Thankfully, I was rightly repelled by that mess, and fled back to backend, and returned only when things calmed down.
Btw, the pre-SPA era of jQuery is an interesting paradigm, while writing modern TS feels like writing basically any other language.
The pre-SPA jQuery era was kind of incredible. We were doing such crazy stuff, just seeing what would stick. That was an exciting time. What are the limits of what the browser offers us? How far can we push this poor little language? Some genuinely great things shook out of that mess. It was a lot of fun. A great time to be learning. It showed that a lot was possible with limited tooling, platform limitations, a poorly-designed language and runtime, and some enthusiasm.
though on second consideration, there was something that was AWFUL about JS in that era - the total confusion about the state of the art. I was getting constantly bombarded with articles about how JS is the future of engineering, how the biggest companies have already transitioned to this or that framework and that is the future.
When learning something new, there's a transitionary era, where you just don't get it, but assume the experts do, and eventually you will as well.
That is unless you're talking about something like quantum mechanics, where not getting it is the sign that you're not smart enough.
And I didn't get it, and I constantly assumed I was two tutorials away from eureka. But no. I suspected that maybe the people dispensing wisdom and confidently decrying how their stuff is better might have been wrong, I thought it was just hubris and hunkered down, and eventually gave up, assuming I can't keep up with the state of the art anymore.
The turning point came when I encountered a bundler bug in a fairly reputable library, and delved into its source - I expected to find some reasonable compiler stuff in there - tokenizing, parsing etc. etc. but what I found was a bunch of regexes and string replacements.
At that point I had evidence that to at least some degree, the patients were running the madhouse, and while VB6 might be deeply unsexy, I highly doubt it's compiler ever featured gems like this (PHPs might have)
This is exactly how many feel about LLM-assisted coding though.
Every couple months a new model comes out and wows everyone, and suddenly everyone is somehow getting an even greater productivity boost. We were already at 10x in GPT 3.5 days, we must be up to something like 50x now, I guess.
Except somehow, every day these models still write the same awful code, make the same mistakes, and apologize profusely when you call them out on the dumbest of errors. I saw Claude delete the project’s README by accident the other day and happily commit the change. Is this the ASI we’ve been waiting for?
But no, I’m just holding it wrong. Just one more model bro, one more data center. A different harness, perhaps. Just don’t look at the code, bro.
Only thing I’m getting out of this whole situation is that I should probably move into people management, too. The corporate IC culture is soulcrushing, though I guess it’s always been that way.
>Except somehow, every day these models still write the same awful code, make the same mistakes, and apologize profusely when you call them out on the dumbest of errors.
I don't see how that can be as true for you as it was during gpt3.5 days. It may still happen, but there's no way someone is shipping a full translation of ps5/xbox shaders in the days/weeks we've seen those projects complete in the same timeframe during the 3.5 days. At least not without vastly more tokens/compute/spend.
The same could be said of humans "Except somehow I still see my direct reports forgetting semi-colons, forgetting to merge, merging to the wrong branch, deleting critical files, submitting with obvious typos...".
And yet here we are succesfully maintaining both more and more complicated software than we were doing 5 years ago.
It's the same solution in both cases, from what I've seen. You need solid definitions, architecture, testing, benchmarks, etc to measure your agents against regardless of their natural/synthetic origin. If some are having success managing synthetic agents, then there must be some method by which they are doing so in just the same way that there must be some method to a human succesfully managing human agents.
You can't prompt your average (or really even field leading) humans with "build a saas try hard make no mistakes" and expect to check in next quarter to find success every time, after all.
> We were already at 10x in GPT 3.5 days, we must be up to something like 50x now, I guess.
>
> Except somehow, every day these models still write the same awful code, make the same mistakes, and apologize profusely when you call them out on the dumbest of errors.
Well, neither claim is accurate as far as I can see.
We were not at 10x in GPT 3.5 days AND models do not write the same awful code.
I agree. But I am disappointed that none of the initiatives to put another language in the browser came to fruition (except WASM). Something like Ruby would have been nice.
Not even WASM, because the tooling still sucks, and if you need a GC, JavaScript is still better than dealing with WASM GC, a MVP that only suits languages with the same GC semantics as JavaScript.
I think WASM managed to fall between two stools - it couldn't decide whether it wanted to be a high performance runtime analogous to NaCL that allowed you to run code at native speeds, or a generic bytecode language that other languages can target (analogous to Java or .NET bytecode), while having the same access as JS.
It mananged neither - the runtime is both slower to load, run and is significantly more complex than NaCL ever was, while suffering from lots of limitations, meanwhile WASM code exists separated from the JS runtime. It's high level features like garbage collection, aren't really usable by language runtimes.
Imo the best thing would be, if you could compile Ruby to a generic bytecode, which has extended features to support dynamic objects. .NET kinda managed this back then, and there were things like IronRuby, which supported a decent subset of real Ruby code, but wasn't really popular afair.
> the runtime is both slower to load, run and is significantly more complex than NaCL ever was, while suffering from lots of limitations, meanwhile WASM code exists separated from the JS runtime. It's high level features like garbage collection, aren't really usable by language runtimes.
Basically everything in this sentence is false. Wasm runtimes are simpler than NaCl, which required an entire LLVM. They start faster, with lazy compilation, interpreters, parallel concurrent compilation, and dynamic tier up. It has fewer limitations than NaCl--it supports SIMD, can access all JS and browser APIs, and didn't require rearchitecting the browser. It's not separated from the JS runtime--all the browser engines use the same compilation, GC, and runtime infrastructure. The high-level features like GC that you mention not being usable from language runtimes are being used by Scala, Kotlin, and OCaml, with more coming.
I shipped the first versions of Wasm in Chrome, and it's true startup wasn't great. Initially, we compiled all Wasm with the top tier before starting. V8 doesn't do that anymore, nor do any other runtimes. Startup is better, topline performance is better, and integration with JS is better.
And did I mention that Wasm also runs in lots of other places?
The crippling problem with WASM is that all data must be serialized prior to calling a JS library. You can't just call the API directly. It causes massive overhead and performance problems, making a data-intense "pure" WASM application very slow.
Edit: The problem is very evident if you need to graph 1000s of points. Calling fetch (js-space API) has to translate data to something your WASM language can handle, then after parsing it in WASM there's overhead either for serializing the data into something the JS graphing library can handle, or overhead for passing raw HTML through js-space.
I agree: I'm shipping a product built in WASM, and the performance issues and lack of direct browser API access are real limiting factors. Even I wonder if transpiling to JavaScript would be better overall than WASM.
The ugly truth is that it’s difficult to have 40 engineers share 100 cores without fucking things up and process per core languages like Ruby and JavaScript just don’t even try to share processors, beyond a bit of multitasking.
Getting people not to use global shared state is a struggle in any language, it’s just that it’s the primary one in JavaScript. But it’s not really global so it at least stops certain designs from making it off the whiteboard.
When I got out of school I was really good at concurrency. Probably a side effect of taking a distributed computing class.
But over and over again people broke my code, and over time I started making more and more grug brained systems and even declining PRs from engineers that tried to do things that I used to think were fine. If you have code only three engineers understand properly it needs to be locked away behind an API where others are discouraged from touching and don’t need to step through for every bug they work on. The latter is particularly tricky to pull off. The alternative is use a less sophisticated solution.
I think you can become a pretty good programmer even in a year or two, if you start as a teen, have a lot of passion for it, and know what you want to learn.
I think people both are stuck in the 2000s image of JS, and conflate the language with the ecosystem a lot, as well as with using it where other tech stacks would be so much saner. The latter two things give JS a worse rep than it deserves imo. Although to be fair, if you write JS for work the ecosystem is almost unavoidable, so hating JS for that is somewhat deserved.
Personally, ever since ES5 I really started to enjoy writing javascript, and by now practically all the warts feel quite easy to avoid. I can't say if that's personal mastery or language improvements, probably bit of both.
I still hate the ecosystem though, and always disliked it more than I ever disliked the insane var scoping rules or whatever from twenty years ago.
I am certainly stuck in the 2000s image of JS, because that is when I got so sick of web tech that I routed my career away from having anything to do with it. No regrets there.
It's been fun, recently, to discover that agents can deal with all the javascript for me, so I can whip up little visualizers, explorers, interactive reports, etc, to share with my coworkers. Much more fun than plain text and graphs.
JS is not the worst language but I would not say it has elegant and consistent design like some other languages do. Not every languages has the list of quirks as long as JS: https://github.com/denysdovhan/wtfjs (but C/C++ have much more foot-guns).
The quirks are almost all to do with the old type coercion features that js has. If you enable linting to ban these features then you remove almost all these quirks and you're left with a modern and mostly clean and consistent language.
…no. Prototype inheritance, bundles/mjs module hell, bizarre for-in iteration syntax, features missing from the stdlib … there’s a lot more wrong with the language than the broken type coercion system.
You don't have to use prototype inheritance though. Bundles and modules can be horrible to work with, but is more of an ecosystem problem. There is no problem with the iteration syntax, you can learn it once and never worry about it again. The stdlib is decent, I find it more pleasant to work with than some other popular languages.
These things are not used in modern js (lint rules for syntax) or they are completely solved by modern runtimes (modules/bundles solved by node 26 & vite).
I mean, you can hate a language compared to another language, but to the point of making you hate programming? To me, if you do, you probably don't really like programming in the first place. Especially considering that Javascript is a conventional language with variables, conditions, loops, functions, etc... the kind that should be mostly transparent to an experienced programmer.
It would be like a woodworker saying that pine made him hate woodworking, sure, you may prefer to work with oak, but pine is still wood.
This is silly. In ruby I can put down my thoughts 4x faster than if was writing JS. The syntax is more readable. etc. Each to their own but can't stand looking at JS nevermind all it's weird quirks we still have to live with.
Your analogy with woodworking is deeply flawed as well. Woodworkers do actually strongly prefer certain types of wood.
See ruby to me is such a mess of a language. It does not jive with the way I think at all. It takes me 4x longer to write something in Ruby vs Python, Javascript or Swift.
> To me, if you do, you probably don't really like programming in the first place.
This is exactly the opposite of the truth.
Programmers don't program because they like variables, conditions, loops and functions. In fact some of the best languages ever created don't have most of those things. Apparently your experience of programming doesn't extend very far given your idea of programming seems to go only as far as those basic concrete concepts.
There is such thing as neatness, elegance and beauty, especially in programming and mathematics. As in other fields it's the people with the least taste and appreciation of that who are the haters, like yourself, because they don't understand the issue at hand.
> There is such thing as neatness, elegance and beauty, especially in programming and mathematics.
I don’t even think of programs as code. Instead, it’s a sequence of actions on data. Kinda like open the file, search for the lines that contains this pattern, split it like this, sum the first item,… Expressing those in a programming language is fairly mechanical with slight adjustment according to the paradigm. But there is some effort spent there and the syntax can make it unpleasant.
Reading a program is a whole other matter. The easier a syntax make it to get the idea of a program, the better it is. I don’t like Rust because it’s full of compiler annotations and I don’t like some idiomatic techniques in other languages because they obstruct reading.
But you can express elegance and beauty in any language!
For this, I don't think there are many people, if any who embody these concepts more than Don Knuth. And you know what language he chose for "The Art of Computer Programming" books? Assembly! He has also used Pascal, and C, neither are considered particularly elegant, but it doesn't matter, because the elegance is in the algorithms, not the language. In fact, one of the thing he is best known for, literate programming, could be seen as a testament on how little programming languages matter, by burying it within his prose.
Yeah you won’t get it if you haven’t bashed your head trying to claw your way out from the depths of callback hell. Or any of the dozens of quirks in the language, compounded the hundred different environments it could run in, each with their own special edge cases. Gary Bernhardt, the person mentioned in TFA has another fun talk worth watching called “Wat”.
Eventually with a lot of lipstick on the pig, like async / await, it has become much more tolerable.
I have done all of those things but instead of resorting to hate and relying on syntactic sugar I instead learned about the inner workings of the language. I'd recommend it.
Depending on what you mean by “inner workings”, I’m somewhat familiar, though my opinion is based on the experience of using it in anger, especially given so many other languages offered such a better experience. What aspects do you find worth learning about?
My biggest gripe is that it's single-threaded so it's pretty much useless if you're going to try to write any non-trivial application in it.
People work around this generally by just running lots and lots of processes, but multi-processing as the only solution to parallelism feels like stepping back into the dark ages.
I've learned to like JavaScript, but only after I worked with a few different C++ codebases.
I think after a while, you realize that atrocities will be committed in every possible programming language and to prevent those you need culture over syntax.
But honestly, the thing that I like most about JavaScript is the ease to ship. I'd rather have more people use the thing I wrote than trying to convince people to install what I wrote.
> So, yes, it would be great if fixing your browser involved actions
that were not semantically equivalent to voodoo. But, on the
bright side, things could always be worse. For example, it
would definitely be horrible if your browser’s scripting lan-
guage combined the prototype-based inheritance of Self, a
quasi-functional aspect borrowed from LISP, a structured
syntax adapted from C, and an aggressively asynchronous
I/O model that requires elaborate callback chains that span
multiple generations of hard-working Americans. OH NO I’VE
JUST DESCRIBED JAVASCRIPT. What an unpleasant turn
of events! People were begging for a combination of Self, LISP,
and C in the same way that the denizens of Middle Earth were
begging Saruman to breed Orcs and men to make Uruk-hai.
Orcs and men were doing a fine job of struggling in their sepa-
rate communities—creating a new race with the drawbacks of
both is not a good way to win popularity contests.
I have a hard time forgiving JS for normalizing the practice of blindly running whatever some remote server sent you after only validating that that server isn't lying about its name. It's like of your neighbor never locks their doors and now the neighborhood has robbery problem that would just never have gotten off the ground if they had.
The web would be such a nicer place if browsers were built to respect the user's preferences about which content they trust separately from which software they trust.
I'm aware that with some care you can build a wide variety of things with JS. You don't have to import the insane trust model that's part of its origin story. But I can't shake the feeling that the whole space is a slippery slope towards accidentally making bad assumptions that lead to your user being mistreated by a third party.
That's quite different than restricting the execution of code that you've decided to trust. Control over a given domain name, a given server, or a given http response payload, is perpetually up for grabs in ways that just don't apply to software packages whose contents are identified by cryptographic hash.
The attack surface for code served over the web at runtime is unnecessarily large, even if you've allow-listed the originating domain name. Also, it puts too much power in the hands of whoever controls that name, and power corrupts. People who are trustworthy today, will start selling their users out tomorrow.
I've worked professionally with half a dozen languages, and learned half a dozen more for fun, and I actually have a soft spot for JS.
I think Ruby is the one I never loved, and I actually don't enjoy writing it. I don't hate it, though.
Once you understand the prototype chain, some quirks, and get a grasp on the standard library/primitives, I think JS is actually quite capable and powerful. With TypeScript layered on top, I love using it. It's one of my favourite tools, up there with Rust, C#, and Go.
I even like JS more than Python, come to think of it. But I like Python a lot more than Ruby.
Part of it comes from the fact that it feels like people who are less serious about software end up dictating the languages/libraries that everyone else has to put up with simply because they're the majority, not because the language is technically superior. Worse is better, and all that.
Again: feels like. There are plenty of serious people doing work in JS, and plenty of non-serious people in other languages.
I don't think it's "feels like", it actually is that way. Yes, there are serious people doing work in JS, and yes, there are foolish people doing work in other languages. But the modal person who reaches for JS on every task is a lazy person who never actually learned how to program all that well, and uses JS because it's all they kind of know.
There are truly no redeeming qualities about JS in my eyes. It’s poorly designed in every single way I can imagine. If I had to design JS as a language today, I’d make none of the same decisions.
It’s slow, it’s hard to read and write, it often produces buggy code because of the infinite edge cases in the type system, and it’s footgunny to the max. At least it’s memory safe. If C++ was memory safe, I’d legitimately say it’s a more sane and less footgunny language. Which is really saying something, because C++ sucks ass.
Sometimes I program in JS enough that I almost start to gaslight myself into thinking it’s sane. But then I program in C#, Java, go, even PHP and I remember… no wait, JS is actually insane. How do we even write reliable software in JS? The answer is we don’t, all the software is buggy as hell but it’s fine because it’s memory safe.
There’s a different set of perennial mistakes that you have to watch for in code reviews all the time. The things that people either refuse to learn or lean into helplessness.
What I don’t have to do often in JavaScript code reviews is lecture someone on concurrency bugs. But there are I am sure other things that I find equally annoying.
But I moved from a job with a JavaScript frontend and a Java backend to a job with only a JavaScript frontend (opaque service API because reasons and asshole) to a JavaScript backend system where I rarely touched the frontend and the lesson I learned the hard way is that I can do JavaScript about 30 hours a week and beyond that I get really fucking tired of dealing with JavaScript with no breaks to touch something else.
So I volunteered to work on shell scripts, our Docker and Terraform work (terraform was awful but I think our OPs team did something with abstraction layers to make it that awful, so I am not making a blanket statement about terraform at this time) as often as they came up.
Same. I actually very much enjoy JS compared to most other languages. It's always been cool to hate on JS.
A lot of juniors see JS hate as a way to make themselves appear more experienced. If you say you hate JS, it's a kind of flex because it implies that you've tried multiple languages and concluded that JS is the inferior one because it imposes fewer guardrails than the others and has a few nasty gotchas (which they all have, if you're being honest).
C's gotchas are pretty nasty if you ask me; mess up a pointer reference or forget to check a buffer's size and you've given an attacker root access. That's as nasty as it gets.
Even a hyped language like Rust has issues in terms of build time, gaps in concurrency safety (e.g. lock issues/complexity), async (function coloring) complexity, panics as a DoS attack surface.
Sometimes a language provides some kind of safety but simultaneously incentivizes anti-patterns and runaway complexity. Actually this point highlights what I like about JavaScript; although it isn't the most safety-conscious language (though at least it does a pretty good job protecting from remote code executions via buffer overflows), it is succinct and the lack of guardrails incentivizes people to keep function interfaces simple which encourages high cohesion and loose coupling. JS punishes you big time for not designing your architecture carefully. I also like this about Python. Python code, in practice, is quite succinct and pleasant to read.
TypeScript's type safety is nice in theory and great in the hands of an experienced architecturally-minded engineer, but it also allows sloppy coders produce overly complex but functioning spaghetti code. An ugly TypeScript codebase can go much further than an ugly JavaScript codebase, but the day of reckoning is often worse with TypeScript as it requires more heavy-handed, less localized, refactorings; even its flaws can create the illusion that TypeScript is useful because it does a great job at pointing out where the different spaghetti stands aren't making contact in the right way but it does nothing in terms of alerting you that "this project is a tangled mess of spaghetti code.'
I think Js is.. okay? I can name some strengths and weaknesses,both of the language itself and the culture/ecosystem, but I certainly don't hate it.
Replies (20)
The C/C++ world where browsers came from didn't have this (closures). So it is actually a miracle we got a language as (relatively) great as Javascript.
Replies (7)
Replies (2)
const add = (a, b) => a + b;
And may need to read this a couple of times because of the lone "+" and the parentheses:
(define (add a b) (+ a b))
... and this is the simplest of examples. It's not slightly unfamiliar syntax. Perhaps Rust is slightly unfamiliar syntax, if we mean really just the syntax - as in, you can tell where the functions start and end.
You could also say that Scheme has very little syntax, for example, no distinction between statements and expressions, no operator precedence, and nearly zero reserved punctuation. So I'd argue that it needs more adaptation because it is less.
Replies (1)
I was banished from golang communities when I said that a language should deviate from already established standards only when it has a good reason to do so. I remember it being quite ironic that golang took pride in not overloading names, and then... overloaded the English word "go". It's really unreadable unless you specifically study golang.
I could go on very long how much I hate golang for its stupid syntax alone, even before we dive deeper into its broken features.
Regarding Scheme itself, functional languages never gain traction because both humans and machines think imperatively. Yes, functional languages are a beauty for someone who understands them well, and in some specific use cases, but I still remember that as a student I finished my project, I just needed to add a few prints... oh fuck I need to rewrite the entire thing just to add "print". Never touched functional programming again, except for functional elements in imperative languages.
Replies (1)
Replies (1)
A feature existed since 1960s...
Replies (1)
Replies (1)
I think it was the right call by the C++ people to explicitly list what objects are captured and how, even if the syntax's not the best.
RAII is a fact of life unfortunately, not just in C++ or Rust, but if you talk over some high level protocol over the internet you go TCP socket->HTTP connection->your stream protocol; and have to do the exact reverse.
Closures break RAII hard.
Incidentally, you don't even need closures for nice looking UI code. Immediate mode GUIs like Dear Imgui or Clay allow for super-simple looking code in basic C
Replies (4)
Having recently worked a lot with Rust, which does this implicitly - I find the explicit notation entirely unnecessary. There's only one choice - are captures moved into closure or passed by reference? - and everything else is inferred. It does lead to some verbose cloning when there are many refcounting pointers at play, but other than that it works flawlessly; I've never been in a situation I couldn't do something I wanted to.
I'm confused by the point about RAII. Why are you saying that closures break it? Personally, I found that closures complement RAII very well - the closure owns its resources, and when it goes out of scope they're all cleaned up automatically. Or do you mean situations where resources outlive the closures? This is no different than any other object that needs a reference to something that lives longer.
Layout computation is always awkward in immediate guis. You have to do an extra pass or throw away a frame.
Replies (2)
Here's a cool explainer video:
https://www.youtube.com/watch?v=by9lQvpvMIc
Naturally it works better in FP and LP languages without concept of global variables, where resources could escape the closure.
Replies (1)
Replies (1)
In any case, you have two ways to do something similar, kind of.
Naturally there are multiple variations thereof, on how to handle errors, or which way to parameterise how to close resources.Then we have the C# inspired way,
And if open_resouce doesn't support using declaration, an helper builder function can be used to wrap it in such a type.Yes it isn't as automatic as pure RAII, but it gets close enough for most practical purposes.
Continue this thread (2 replies) →
Nowadays you can probably vibe/slopcode whatever you need with just a bit of Rust, Python/shell scripts as glue and maybe Javascript if it's a webapp (but we'll likely replace that with WASM soon I'm afraid)
Replies (1)
Replies (1)
Continue this thread (1 replies) →
Replies (1)
Replies (1)
The foundation is still abysmal, but it doesn’t hurt because you don’t have to look at it anymore or you can use modern facilities instead. Note the striking similarity to what LLMs give you, it’s the same thing on a higher level.
Replies (4)
That framework churn, leftpad, etc. stuff I think is something the JS community will gladly memoryhole. Thankfully, I was rightly repelled by that mess, and fled back to backend, and returned only when things calmed down.
Btw, the pre-SPA era of jQuery is an interesting paradigm, while writing modern TS feels like writing basically any other language.
Replies (1)
When learning something new, there's a transitionary era, where you just don't get it, but assume the experts do, and eventually you will as well.
That is unless you're talking about something like quantum mechanics, where not getting it is the sign that you're not smart enough.
And I didn't get it, and I constantly assumed I was two tutorials away from eureka. But no. I suspected that maybe the people dispensing wisdom and confidently decrying how their stuff is better might have been wrong, I thought it was just hubris and hunkered down, and eventually gave up, assuming I can't keep up with the state of the art anymore.
The turning point came when I encountered a bundler bug in a fairly reputable library, and delved into its source - I expected to find some reasonable compiler stuff in there - tokenizing, parsing etc. etc. but what I found was a bunch of regexes and string replacements.
At that point I had evidence that to at least some degree, the patients were running the madhouse, and while VB6 might be deeply unsexy, I highly doubt it's compiler ever featured gems like this (PHPs might have)
Replies (1)
Every couple months a new model comes out and wows everyone, and suddenly everyone is somehow getting an even greater productivity boost. We were already at 10x in GPT 3.5 days, we must be up to something like 50x now, I guess.
Except somehow, every day these models still write the same awful code, make the same mistakes, and apologize profusely when you call them out on the dumbest of errors. I saw Claude delete the project’s README by accident the other day and happily commit the change. Is this the ASI we’ve been waiting for?
But no, I’m just holding it wrong. Just one more model bro, one more data center. A different harness, perhaps. Just don’t look at the code, bro.
Only thing I’m getting out of this whole situation is that I should probably move into people management, too. The corporate IC culture is soulcrushing, though I guess it’s always been that way.
Replies (2)
I don't see how that can be as true for you as it was during gpt3.5 days. It may still happen, but there's no way someone is shipping a full translation of ps5/xbox shaders in the days/weeks we've seen those projects complete in the same timeframe during the 3.5 days. At least not without vastly more tokens/compute/spend.
The same could be said of humans "Except somehow I still see my direct reports forgetting semi-colons, forgetting to merge, merging to the wrong branch, deleting critical files, submitting with obvious typos...".
And yet here we are succesfully maintaining both more and more complicated software than we were doing 5 years ago.
It's the same solution in both cases, from what I've seen. You need solid definitions, architecture, testing, benchmarks, etc to measure your agents against regardless of their natural/synthetic origin. If some are having success managing synthetic agents, then there must be some method by which they are doing so in just the same way that there must be some method to a human succesfully managing human agents.
You can't prompt your average (or really even field leading) humans with "build a saas try hard make no mistakes" and expect to check in next quarter to find success every time, after all.
Replies (1)
I like the specific choice of words in that sentence, isn't that telling? Not "more useful" software, not "better" software.
"Gee, I want my software to be more complicated" -- said no user ever.
Continue this thread (1 replies) →
Well, neither claim is accurate as far as I can see.
We were not at 10x in GPT 3.5 days AND models do not write the same awful code.
Replies (2)
It mananged neither - the runtime is both slower to load, run and is significantly more complex than NaCL ever was, while suffering from lots of limitations, meanwhile WASM code exists separated from the JS runtime. It's high level features like garbage collection, aren't really usable by language runtimes.
Imo the best thing would be, if you could compile Ruby to a generic bytecode, which has extended features to support dynamic objects. .NET kinda managed this back then, and there were things like IronRuby, which supported a decent subset of real Ruby code, but wasn't really popular afair.
Replies (2)
Basically everything in this sentence is false. Wasm runtimes are simpler than NaCl, which required an entire LLVM. They start faster, with lazy compilation, interpreters, parallel concurrent compilation, and dynamic tier up. It has fewer limitations than NaCl--it supports SIMD, can access all JS and browser APIs, and didn't require rearchitecting the browser. It's not separated from the JS runtime--all the browser engines use the same compilation, GC, and runtime infrastructure. The high-level features like GC that you mention not being usable from language runtimes are being used by Scala, Kotlin, and OCaml, with more coming.
I shipped the first versions of Wasm in Chrome, and it's true startup wasn't great. Initially, we compiled all Wasm with the top tier before starting. V8 doesn't do that anymore, nor do any other runtimes. Startup is better, topline performance is better, and integration with JS is better.
And did I mention that Wasm also runs in lots of other places?
Replies (1)
That's highly misleading.
The crippling problem with WASM is that all data must be serialized prior to calling a JS library. You can't just call the API directly. It causes massive overhead and performance problems, making a data-intense "pure" WASM application very slow.
Edit: The problem is very evident if you need to graph 1000s of points. Calling fetch (js-space API) has to translate data to something your WASM language can handle, then after parsing it in WASM there's overhead either for serializing the data into something the JS graphing library can handle, or overhead for passing raw HTML through js-space.
Continue this thread (1 replies) →
Getting people not to use global shared state is a struggle in any language, it’s just that it’s the primary one in JavaScript. But it’s not really global so it at least stops certain designs from making it off the whiteboard.
When I got out of school I was really good at concurrency. Probably a side effect of taking a distributed computing class.
But over and over again people broke my code, and over time I started making more and more grug brained systems and even declining PRs from engineers that tried to do things that I used to think were fine. If you have code only three engineers understand properly it needs to be locked away behind an API where others are discouraged from touching and don’t need to step through for every bug they work on. The latter is particularly tricky to pull off. The alternative is use a less sophisticated solution.
Replies (1)
Personally, ever since ES5 I really started to enjoy writing javascript, and by now practically all the warts feel quite easy to avoid. I can't say if that's personal mastery or language improvements, probably bit of both.
I still hate the ecosystem though, and always disliked it more than I ever disliked the insane var scoping rules or whatever from twenty years ago.
Replies (1)
It's been fun, recently, to discover that agents can deal with all the javascript for me, so I can whip up little visualizers, explorers, interactive reports, etc, to share with my coworkers. Much more fun than plain text and graphs.
Replies (1)
Replies (1)
Replies (2)
JS in 2026 just works.
I mean, you can hate a language compared to another language, but to the point of making you hate programming? To me, if you do, you probably don't really like programming in the first place. Especially considering that Javascript is a conventional language with variables, conditions, loops, functions, etc... the kind that should be mostly transparent to an experienced programmer.
It would be like a woodworker saying that pine made him hate woodworking, sure, you may prefer to work with oak, but pine is still wood.
Replies (3)
> It would be like a woodworker saying that pine made him hate woodworking, sure, you may prefer to work with oak, but pine is still wood.
It would be like woodworker getting dull tools to work and wood being rotten
Your analogy with woodworking is deeply flawed as well. Woodworkers do actually strongly prefer certain types of wood.
Replies (1)
This is exactly the opposite of the truth.
Programmers don't program because they like variables, conditions, loops and functions. In fact some of the best languages ever created don't have most of those things. Apparently your experience of programming doesn't extend very far given your idea of programming seems to go only as far as those basic concrete concepts.
There is such thing as neatness, elegance and beauty, especially in programming and mathematics. As in other fields it's the people with the least taste and appreciation of that who are the haters, like yourself, because they don't understand the issue at hand.
Replies (2)
I don’t even think of programs as code. Instead, it’s a sequence of actions on data. Kinda like open the file, search for the lines that contains this pattern, split it like this, sum the first item,… Expressing those in a programming language is fairly mechanical with slight adjustment according to the paradigm. But there is some effort spent there and the syntax can make it unpleasant.
Reading a program is a whole other matter. The easier a syntax make it to get the idea of a program, the better it is. I don’t like Rust because it’s full of compiler annotations and I don’t like some idiomatic techniques in other languages because they obstruct reading.
But I wouldn’t go to hate in both occasions.
For this, I don't think there are many people, if any who embody these concepts more than Don Knuth. And you know what language he chose for "The Art of Computer Programming" books? Assembly! He has also used Pascal, and C, neither are considered particularly elegant, but it doesn't matter, because the elegance is in the algorithms, not the language. In fact, one of the thing he is best known for, literate programming, could be seen as a testament on how little programming languages matter, by burying it within his prose.
Eventually with a lot of lipstick on the pig, like async / await, it has become much more tolerable.
Replies (1)
Replies (1)
I wrote software in js and then moved to ts and sometimes have to go back to js. It’s fine to me.
Ignorance is bliss I guess.
Replies (1)
People work around this generally by just running lots and lots of processes, but multi-processing as the only solution to parallelism feels like stepping back into the dark ages.
I think after a while, you realize that atrocities will be committed in every possible programming language and to prevent those you need culture over syntax.
But honestly, the thing that I like most about JavaScript is the ease to ship. I'd rather have more people use the thing I wrote than trying to convince people to install what I wrote.
- James Mickens
Replies (1)
this is why people dislike javascript.
The web would be such a nicer place if browsers were built to respect the user's preferences about which content they trust separately from which software they trust.
I'm aware that with some care you can build a wide variety of things with JS. You don't have to import the insane trust model that's part of its origin story. But I can't shake the feeling that the whole space is a slippery slope towards accidentally making bad assumptions that lead to your user being mistreated by a third party.
Replies (1)
Replies (1)
The attack surface for code served over the web at runtime is unnecessarily large, even if you've allow-listed the originating domain name. Also, it puts too much power in the hands of whoever controls that name, and power corrupts. People who are trustworthy today, will start selling their users out tomorrow.
I think Ruby is the one I never loved, and I actually don't enjoy writing it. I don't hate it, though.
Once you understand the prototype chain, some quirks, and get a grasp on the standard library/primitives, I think JS is actually quite capable and powerful. With TypeScript layered on top, I love using it. It's one of my favourite tools, up there with Rust, C#, and Go.
I even like JS more than Python, come to think of it. But I like Python a lot more than Ruby.
https://youtu.be/D5xh0ZIEUOE
(ok, ok, I really just wanted an excuse to post James Mickens)
Part of it comes from the fact that it feels like people who are less serious about software end up dictating the languages/libraries that everyone else has to put up with simply because they're the majority, not because the language is technically superior. Worse is better, and all that.
Again: feels like. There are plenty of serious people doing work in JS, and plenty of non-serious people in other languages.
Replies (1)
It’s slow, it’s hard to read and write, it often produces buggy code because of the infinite edge cases in the type system, and it’s footgunny to the max. At least it’s memory safe. If C++ was memory safe, I’d legitimately say it’s a more sane and less footgunny language. Which is really saying something, because C++ sucks ass.
Sometimes I program in JS enough that I almost start to gaslight myself into thinking it’s sane. But then I program in C#, Java, go, even PHP and I remember… no wait, JS is actually insane. How do we even write reliable software in JS? The answer is we don’t, all the software is buggy as hell but it’s fine because it’s memory safe.
What I don’t have to do often in JavaScript code reviews is lecture someone on concurrency bugs. But there are I am sure other things that I find equally annoying.
But I moved from a job with a JavaScript frontend and a Java backend to a job with only a JavaScript frontend (opaque service API because reasons and asshole) to a JavaScript backend system where I rarely touched the frontend and the lesson I learned the hard way is that I can do JavaScript about 30 hours a week and beyond that I get really fucking tired of dealing with JavaScript with no breaks to touch something else.
So I volunteered to work on shell scripts, our Docker and Terraform work (terraform was awful but I think our OPs team did something with abstraction layers to make it that awful, so I am not making a blanket statement about terraform at this time) as often as they came up.
A lot of juniors see JS hate as a way to make themselves appear more experienced. If you say you hate JS, it's a kind of flex because it implies that you've tried multiple languages and concluded that JS is the inferior one because it imposes fewer guardrails than the others and has a few nasty gotchas (which they all have, if you're being honest).
C's gotchas are pretty nasty if you ask me; mess up a pointer reference or forget to check a buffer's size and you've given an attacker root access. That's as nasty as it gets.
Even a hyped language like Rust has issues in terms of build time, gaps in concurrency safety (e.g. lock issues/complexity), async (function coloring) complexity, panics as a DoS attack surface.
Sometimes a language provides some kind of safety but simultaneously incentivizes anti-patterns and runaway complexity. Actually this point highlights what I like about JavaScript; although it isn't the most safety-conscious language (though at least it does a pretty good job protecting from remote code executions via buffer overflows), it is succinct and the lack of guardrails incentivizes people to keep function interfaces simple which encourages high cohesion and loose coupling. JS punishes you big time for not designing your architecture carefully. I also like this about Python. Python code, in practice, is quite succinct and pleasant to read.
TypeScript's type safety is nice in theory and great in the hands of an experienced architecturally-minded engineer, but it also allows sloppy coders produce overly complex but functioning spaghetti code. An ugly TypeScript codebase can go much further than an ugly JavaScript codebase, but the day of reckoning is often worse with TypeScript as it requires more heavy-handed, less localized, refactorings; even its flaws can create the illusion that TypeScript is useful because it does a great job at pointing out where the different spaghetti stands aren't making contact in the right way but it does nothing in terms of alerting you that "this project is a tangled mess of spaghetti code.'