News for hackers. Stuff that matters.
Re:SwiftWebUI by realharo on Monday July 01, 2019 @08:14AM (#20324512)
So how is it different from React and JSX?
Re:SwiftWebUI by maxaf on Monday July 01, 2019 @08:28AM (#20324585)
JSX is an external DSL implemented in and interoperable with JavaScript.

SwiftUI is an internal DSL implemented in Swift and thus allowing the full power of Swift’s rich type system to tag along.

See https://martinfowler.com/books/dsl.html for more discourse on the difference between internal and external DSLs.

Re:SwiftWebUI by realharo on Monday July 01, 2019 @08:47AM (#20324702)
You can use TypeScript with JSX and you get all the checking (required properties, types of values, types of children, etc.) and everything.

In fact, "TSX" is an official built-in part of TypeScript.