> Even JavaScript has better support for functional-style programming.
Which shouldn't be that surprising considering originally Netscape were going to port Scheme to their browser before choosing to create a new scripting language with "Java-like syntax" (you can argue amongst yourselves just how Java-like the syntax really is).
Probably no better off as I cannot see many frontend developers taking to Scheme like they had with Javascript. So we'd still have eventually ended up with something nasty just to appease the lowest common denominator. Here's a horrible thought: maybe VBScript would have become the de facto standard instead?
You have to bare in mind that we - on HN - are inside a niche bubble and thus the kind of developers that read HN are very different to the kind of developers in many of the web shops outside of the big tech hubs like Silicon Valley and London. There are a hell of a lot of frontend devs who do still like to keep Javascript at arms length and a lot of "web developers" who are basically just Wordpress themers. I know this for a fact because I've worked with a great many of them before moving closer to London. These people are obviously still competent at what they do since not ever website nor development job requires "superstars" and the web framework - for all it's faults - offers a low enough barrier to entry that anyone can throw a page together. Including even those who don't do dev for a living. In fact one of the reasons the web took off was because of how easy it was for anyone to throw together a homepage.
Had Scheme been Netscapes scripting language instead of Javascript then I could easily see many of the less dedicated developers and hobbyists getting frustrated at S-expressions and such like. I mean I love functional programming but even I cannot deny that the learning curve is steeper and S-expressions are less readable (at least to an untrained eye) than Javascript is.
So my point was if Javascript didn't exist then I suspect there would be enough demand to either dumbdown / bastardise Scheme, or implement another scripting language which was more hobbyist friendly (also hence the VBScript quip).
A scripting language isn't necessary if you just want to throw a page together. It's only really necessary for today's web-as-an-application-platform model. If the front-end language were Scheme we would simply see fewer (but in all likelihood, better) web apps.
That's a massive oversimplification and you know it.
+ Just because something isnt "necessary" it doesn't mean it doesn't add value. The problem is just sites that make JS a requirement rather than an optional feature enhancement.
+ Youre talking about stuff from a too recent perspective.
Eg Before CSS came into its own, JS was the only reliable way to do mouse over effects (which can add a lot to usability even on regular web pages)
+ Just because JS is abused on current news sites, blogs and other sites that are really just static pages, it doesn't mean that Scheme wouldn't have been abused in the same way.
+ You also wouldn't see fewer developers writing frontend code. They would just use a transpiler (like we see with TypeScript et al) except instead of compiling from a stricter language (in TypeScripts case) it would transpile from a lazier language into a stricter one.
+ Or instead of the previous point (though more likely as well as) you'd still have a non-scheme language in the browser. Possibly even VBScript. Or maybe something derived from Perl. But I guess at least we wouldn't have a language monopoly on browser scripting languages.
Honestly though, I hate JavaScript just as much as you do. But let's not get carried away with our exaggerations :)
Which shouldn't be that surprising considering originally Netscape were going to port Scheme to their browser before choosing to create a new scripting language with "Java-like syntax" (you can argue amongst yourselves just how Java-like the syntax really is).