DarkUranium
Joined 11 years ago
Joined 11 years ago
Think Apple's AutoLayout and similar, but in CSS. I don't recall why it went nowhere (though I do remember the reasons were more political than technical), but imagine CSS without all of the float/flexbox/grid/subgrid/etc crap, but just: `#table-a[width] == #table-b[width];` and so on. And no need for hacks involving deep `<div>` trees just to get the HTML to cooperate with CSS --- it breaks the whole "HTML is for content, CSS is for styling" premise anyway, when HTML needs to adapt structurally to CSS.
The proposal even had `@import` and `@media` (the latter named `@precondition`) all the way in 1999!
There were some attempts at revivals (e.g. [3]), but they kind of went nowhere. Personally, I'm strongly considering using it for my own (non-web-related) UI library. CSS' base syntax is okayish (the way you define classes, reference elements, etc), and the basic rules like colors or text-related things have warts, but are ultimately okay --- but anything to do with layout is an absolute mess.
[1]: https://web.archive.org/web/20140911231410/http://www.cs.was... [2]: https://web.archive.org/web/20140911231410/http://gridstyles... [3]: https://web.archive.org/web/20140907130017/http://gridstyles...
The rest of that page needed JS (it included a collaborative editor, CRDT-based --- can't avoid JS when you need it for the core thing), but since doing tabs without JS was trivial, I figured "why not".
I'm also extending it with support for Discord/Matrix/etc-esque communities (in a 100% standard-client-compatible way).
That and not respecting the consumer is more profitable in the short term (only!), which means more marketing money, buying out other brands, lobbying to increase the barrier for entry, et cetera.
It always converges to a two-party system eventually, the US just speedran the process.
It kind of started with vectors as the very first feature (I was sick & tired of libraries reinventing their own `Point`/`VectorN` in incompatible ways).
Yes, I realize many (most?) legal systems are actually hybrid, but they do tend to err pretty strongly into one direction or another.
I feel like the more dynamic and/or weakly-typed the language is, the more important it is to have a separate concat operator.
The worst ones being weakly-typed and dynamic. Consider `'5' + '10'` in JavaScript vs `'5' - '10'`. I also very much dislike Python's `+` for concat, but at least it's more strongly typed.
PHP, Lua, and Erlang are three examples of dynamically-typed languages with separate concat operators (`.`, `..`, `++`; respectively), and they all are better for it.
That said, even statically-typed languages benefit greatly from it. Maybe if C++ had a concat operator, it'd never end up abusing `<<` for writing to a stream (yes, there's no opposite for reading, but maybe they wouldn't end up doing that in this case).
For example, D uses `~` in infix for concat. Even UnrealScript, a 1990s game-engine-specific language (which tend to be a mess in general) did this right (it uses `$` or `@` --- with `a @ b` being equivalent to `a $ " " $ b`, IIRC).
Yes, you can't tell at a glance if `+` really still does what it should, but I find that problem no different from a library mis-naming a function and/or said function having strange side-effects.
`+` should do addition, period. No, not even concatenation if possible (I do find the lack of a separate concatenation operator to be a language flaw --- that said, I understand the use of `+` for concat in libraries targeting languages that offer no alternative).
I think the abuse (especially in C++ ... seriously, allowing overloading of the comma operator? --- and <iostream> working via bit-shifting streams by ${some_string} bits) gave everyone a bad taste and they kind of threw out the baby with the bathwater.
Plus making a webapp with accessibility in mind, and I'd like to be aware of footguns.