Re:Typed-Html: Type Checked JSX for Rust
by tannhaeuser on Monday November 19, 2018 @03:04AM
(#18484814)
I find it funny that JavaScript had (proposed) standardized first-party support for XML literals in the language (E4X), but nobody was using it because "XML sucks". Then shortly after it was scraped by Mozilla, React/JSX (requiring babel/node) became mainstream and praised for basically what E4X had done all the time. I guess to become mainstream these days, a lib needs to spin a drama around it such as "React vs Angular".
Re:Typed-Html: Type Checked JSX for Rust
by jonchang on Monday November 19, 2018 @08:14AM
(#18486153)
I would say that the problem with E4X was not just that "XML sucks", but that E4X was attempting to solve two related but orthogonal problems and the tradeoff of attempting to do both caused some serious ergonomic warts. Namely, blending "XML as a primitive" while also inventing a new query language for XML. I would also say that XHP was a more likely intermediate step between React/JSX and E4X, given that Facebook invented/popularized both.
This seems to happen quite a lot. I've heard similar criticism levelled at GraphQL (as a modern day SOAP). I wonder what the psychology behind this is. Perhaps they were ahead of their time, and top-down, not "community-driven"?
Re:Typed-Html: Type Checked JSX for Rust
by hopsoft on Monday November 19, 2018 @07:53AM
(#18486035)
Interesting point about grassroots vs top down. I think that definitely plays into the equation. Another big part of it is that developers seem to a unique class of workers that don’t seem learn much from those who preceded them. We love to reinvent things, in part due to the snowflake effect & NIH syndrome. The other reason I think the wheel keeps being reinvented in tech is due to the developer workforce essentially doubling every 5 years... also, the sad reality that ageism coupled with very few long term viable career tracks available for software writers pushes a lot of experience and wisdom out of the industry.
Re:Typed-Html: Type Checked JSX for Rust
by nathan_f77 on Monday November 19, 2018 @03:22AM
(#18484867)
That's a shame, I had never heard of Opa until I read your comment. It looks really good. I guess it's all about marketing, and having a big company behind it.
Re:Typed-Html: Type Checked JSX for Rust
by pritambaral on Monday November 19, 2018 @03:00AM
(#18484798)
How close does Opa bring the database to the JS/HTML? From what little I read, it seems Opa is primarily tied to MongoDB, and CouchDB to a lesser level.
We implemented a database abstraction layer called DbGen which generates the actual queries from a common ground.
The key idea is to traverse a tree datastructure which will map to database entities, for instance:
database my_db {
int /basic/i
float /basic/f
string /basic/s
stored /r
intmap(stored) /imap
}
Kind of an ORM but without objects (Opa is purely functional) and without relations when using NoSQL.But DbGen has support for several types of database including PostgreSQL: See for instance this blog http://www.josetteorama.com/to-sql-from-nosql/
Re:Typed-Html: Type Checked JSX for Rust
by christophilus on Monday November 19, 2018 @07:50AM
(#18486015)
I remember looking at OPA back when it first came out and thinking it was a cool idea. Did you ever end up building anything in production with it?
I'm very glad that this is happening, the whole project got started when I was struggling to write PHP/JS in the early 2000s and the itch was getting worse and worse.