Friday November 5, 2021; 1:19 AM EDT
- (3 min read)#
- Instead of sending the boring work email I've been drafting for the past few hours, I'm going to rant about programming languages because I like it here and apparently I have opinions. I guarantee none of them are new insights but I'll get to try describing them myself. In addition, it's been years since I wrote a bunch of browser and server JavaScript, so all my opinions are based on out of date information and therefore completely worthless.#
- First, though, I want to clarify something because I want zero confusion about this: I'm kind of sorry now that I've been calling Dave Winer's scripting language Drumkit. #
- First, Dave has not contacted me about this. (Nobody else has, either.) Second, it's incredibly arrogant of me to sit here calling Drummer's scripting language by a name I picked, and I really, really hope it is clear that Dave did not choose the name I've been using, and when he picks a name, I will use that name. I just couldn't keep calling it "drummerscript or whatever". #
- It's JavaScript, right? Well, sure OK. But JavaScript comes with some baggage. When you look at most JavaScript code, it looks rational. It looks readable. But what you can do with JavaScript is a complete fucking nightmare of possibilities. #
- You think I'm talking about how like everything is always a fucking DOM tree with a goddamn window document model. Well, yes, that shit is fucked up. #
- Most programming languages come with a standard library. JavaScript has no standard library, but it does let you organize your code any fucking way you want. And everybody does. That makes it awesome for pulling code from elsewhere into your project. #
- It's not even a virtual machine, those are awesome. JavaScript comes with an entire runtime of assumptions, which is where you get all the async callback whatever crap from. But that's not even the worst part. (But it's bad, seriously bad, this is why Dave put so much effort into excising callbacks from the scripting language for Drummer.)#
- No, I'm talking about deeper than that. What do I totally need from my programming language? A complete almost mapping between, say, functions, prototypes, objects, lists, properties, arrays, nulls, nils, unfuckingdefined and every other godforsaken way of doing shit you can think of. But every single one is just slightly incompatible with all the rest so your code is absolutely littered with checks for undefined and special cases and some asshole who thought they were being clever or just didn't understand by copy-pasting from the spamblog that invariably explains the most stupidest, convoluted way to use some random fucking language feature, because Random Fucking Language Features? JavaScript Has You Covered. In Shit.#
- So, I don't really need any of that in the language I use to tell Drummer what to do.#
- Nor do I need callbacks, or function prototypes, or dynamic live bindings that work almost every time, or god knows what else.#
- You know what I will need, I will need this one thing that I just declared I didn't, and I am going to regret this humiliation forever. Irony hunts me everywhere.#
- I know JavaScript is a modern marvel, and the things you can do with it in terms of getting performance out of modern hardware are amazing, it's a central point around which a lot of technology revolves, and when you want the power of LISP with the maintainability of FORTH, it should be your first choice.#
- I just wish we'd all settled on a more focused subset of the language. We could have stripped out 80 percent of the weird shit and had something just as powerful and flexible for real world problems. This is why Drummer's scripting language appeals to me.#
- #
- Update: Here's another post about JavaScript.#