4 ms·
>I think JavaScript is a suboptimal programming language because it has too many features, and on top of that they tacked on yet more features recently. No, th
by coldtea 11y ago
>I think JavaScript is a suboptimal programming language because it has too many features, and on top of that they tacked on yet more features recently.
No, that's not what makes a programming language "suboptimal".
(In fact following this logic to the inverse would make something like Brainfuck the optimal language).
It's not the number of features that makes a language problematic (of which Javascript, even ES7, doesn't have more than Python or Ruby do, and those are considered quite OK languages).
It's suitability to the task (e.g. you wouldn't want to use Fortran for text processing), how well the features play together (you don't want conflicting behaviors and edge cases a la C++), expressibility, aesthetics, coherence (and of course, tooling, speed, ubiquitness, etc).
>I wouldn't call CSS lousy either
But CSS is lousy. It was overdesigned in parts nobody cares about, underdesigned where it would matter, an ad-hoc model for styling, and even mis-named, as it not only styles, it also layouts. And in that area it has been horrible, failing for decades to provide the most basic blocks to build layouts, and having people use hacks like "floats" to do so.
- Udo 11y ago> (In fact following this logic to the inverse would make something like Brainfuck the optimal language). You can reduce any argument to an absurd extreme. It's fair and fine to disagree with every single opinion I express, but I don't recognize your impression of that particular point as something I wrote. My point was, and I'm sorry if I failed to get this across, that in my opinion there are bad parts in JS which could have been stripped away, making it better for an admittedly arbitrary as-defined-by-Udo's-mood-today value of "better". Every single thing about this discussion, including the original article, is a matter of opinion. I agree with much of what you said about CSS and the need for a language to fit a purpose, and I don't want you to get the impression that I'm trying to say everything about HTML/CSS/JS is awesome.
- coldtea 11y ago>You can reduce any argument to an absurd extreme. It's fair and fine to disagree with every single opinion I express, but I don't recognize your impression of that particular point as something I wrote. You're right on this. On my end though, I accept the other extreme of what I said: a language can have the most features any other language has times two, and still be great. That is, number of features is not really relevant as to whether a language is good or not. People seem to think for example "oh, adding this and that would make Java too complicated and too hard to learn etc". At the same time nobody complaints against C# who has twice the number of features or even more. In fact most people find programming in C# is a joy compared to Java.
- sowhatquestion 11y ago>[CSS] has been horrible, failing for decades to provide the most basic blocks to build layouts, and having people use hacks like "floats" to do so. Co-sign every word of this. When I first started developing I hated JavaScript, but in the end it's fine if you have jQuery and some other libraries handy. CSS, however, is a cryptic alien language--translating layout ideas into it requires multiple PhD's.
- guscost 11y ago> But CSS is lousy. I'm conflicted about this. On the one hand I can certainly agree that CSS tends to cause as many problems as it solves, at least where it affects my everyday work building web applications. But I can't say with confidence that this is an inherent flaw in the language, and not just the consequence of having to rely on the one CSS expert in the department, or my own limited knowledge of CSS and web UX/UI when he is not available. I will say (with confidence) that using Bootstrap has been a great experience, and I can't imagine going back to plain CSS layouts without it.
- coldtea 11y ago>But I can't say with confidence that this is an inherent flaw in the language, and not just the consequence of having to rely on the one CSS expert in the department, or my own limited knowledge of CSS and web UX/UI when he is not available. Well, after 15 years of working with CSS, I can tell you that no, it's not a result of your limited knowledge. CSS does suck as a layout language. Flexboxes at least solves this somewhat (at least when they become widely available).