It's even worse than it appears.
Wednesday July 8, 2020; 9:16 AM EDT
  • I read a tweet yesterday that showed what the author thought was a cool feature, labels in JavaScript. Labels are 1/2 of goto statements, which we know are harmful to readability and maintainability. #
  • I'm pretty sure when I try to grok someone's code that uses this feature, it'll be hard to figure out how it works.#
  • I've been developing software for a long time. The functionality for users is always at the top of my mind. Getting software rock solid and ideally not requiring any maintenence, that's what I'm aiming for. #
  • I'm never thinking about how I can use some new cool feature in the language. I want my code to be as boring and predictable as possible. To look exactly like what it does. Sometimes I get there. #
  • I'm using software that I wrote 30 years ago right now, as I write this. That's pretty good for standing the test of time. #
  • Anyway, I'm thinking the right thing to do for JavaScript is to define a profile, a subset of the language, which if you stick to it, will enhance maintainability and readability, and therefore is more likely to work. #
  • An example, right now I can think of three syntaxes for defining a function. The profile would allow one. #
    • function hello () {return ("hello")}#
    • const hello = function () {return ("hello")}#
    • const hello = () => {return ("hello")}#
  • I would like to see all example code stick to the profile. Of course once there was one such profile, there would be N. But at least simplifying the language would be up for discussion.#
  • What would I call my profile? #
  • Something like Really Simple JavaScript. 😄#

© 1994-2020 Dave Winer.

Last update: Wednesday July 8, 2020; 1:38 PM EDT.

You know those obnoxious sites that pop up dialogs when they think you're about to leave, asking you to subscribe to their email newsletter? Well that won't do for Scripting News readers who are a discerning lot, very loyal, but that wouldn't last long if I did rude stuff like that. So here I am at the bottom of the page quietly encouraging you to sign up for the nightly email. It's got everything from the previous day on Scripting, plus the contents of the linkblog and who knows what else we'll get in there. People really love it. I wish I had done it sooner. And every email has an unsub link so if you want to get out, you can, easily -- no questions asked, and no follow-ups. Go ahead and do it, you won't be sorry! :-)