> [ ] You have reinvented PHP but worse
I'm trying to think of languages that would fit that bill. That almost sounds like a challenge.
> [ ] You have reinvented PHP but worse
I'm trying to think of languages that would fit that bill. That almost sounds like a challenge.
Also the "sweet spot" for Lua has some overlap with JavaScript but I don't think the "but worse" complaint is quite fair and I think Lua may actually pre-date JS.
But surely there are a bunch of HTML templating languages that would fit the category of "PHP but worse".
And it does
There were some differences from Netscape's implementation, but they're pretty minor compared to the dialectical differences between competing implementations of pretty much any other language.
When Netscape decided to standardize the language, they went to ECMA. Microsoft didn't have ECMA completely under their thumb, but did have some control.
Netscape wanted to fix some fundamental issues with JS, but MS had just spent a ton of money making their clone, so they insisted all those problematic bits stay right where they were.
So, JScript is to blame for most of the bad parts of Javascript and is therefore worthy of all the hate you could possible heap upon it.
PHP is like Javascript but worse.
Since React, Javascript is like PHP but worse.(But also, just don’t use document.write)
The fact that the meaning of the API is commonly misunderstood is not (necessarily) a fault of the API
Edit to add:
I think calling write on a loaded document should have been an exceptional case and you should have had to explicitly call something to unload, replace or clear it.
Of course, one could argue none of these are 'serious' programming languages.
---
[0]: https://en.wikipedia.org/wiki/Whitespace_(programming_langua...
:)
IMO this is the inherent difficulty with Javascript. I would prefer that you have the "source code" as two separate things: the hard details of the page and the code to manipulate behaviour.
This [1] current HN front page link would illustrate what I mean. You have a colour palette (hard details) and the behaviour (code to plot the colour palette). Of course this is a simplification, but it shows the way of thinking and the way of optimising use of code and space.
It just happens to be a popular architectural pattern at the moment to reimplement the DOM, HTML and CSS all in javascript and have one big mess of code.
ASP.NET MVC uses C#, (C)HTML and CSS for a total of three languages. WPF uses XAML and C# for a total of two. Android uses XML and Java for a total of two. I think Delphi only uses one, I vaguely remember the designer outputting plain Delphi instructions? I might be misremembering.
React is not exactly encouraging separation of concerns, and in some ways this was better in the times of JQuery. But I don't think this is directly related to the number of languages involved.
Separation of concerns doesn't imply separate languages. There might be some merit to the idea of a DSL for each concern? But if the end result of that experiment includes CSS, I would call the experiment a failure.
What are examples of MVC using only one language?
Smalltalk, but Smalltalk MVC is different from what MVC typically means nowadays.
FWIW, WPF uses MVVM, not MVC. The differences are as subtle and pedantic as they are important.
I've been doing web-related development since the late 90's, and I make a living as a UI Architect. Increasingly my clients are looking for my help to unfk their nightmarish, effectively unmaintainable legacy codebases -- which typically have followed this same cargo-cult "wisdom" to their detriment.
It can have both tremendous advantages and be a mess. Both can be, and are, true.
Not that I'm averse to "reinventing" HTML or CSS in the first place, although doing that in JS would be somewhat ironic.
Hint: they're JS APIs.
Any language that compiles to JavaScript.
https://flak.tedunangst.com/post/technical-debt-and-tacking-...
> lessons learned:
> Those who don’t learn from history are doomed to repeat it. Any day now, I suspect some fools are going to want to write web apps, but they won’t want to use raw javascript and they’ll create some ridiculous custom language to javascript compiler. I can only hope they have the good sense not to tell anybody about it.
What if I compile javascript... to javascript. So that I can have actually functioning javascript across the majority of fairly modern browsers, while using modern features.
All I'm saying is, honestly. I don't blame people for not writing straight javascript, when even if you do, you still need a build system in between if you want to support all browsers.