2 ms·
A lot of stupid arguments in your message, the biggest being : > Well, one problem is declarative programming has never been as expressive as imperative progra
by aikah 11y ago
A lot of stupid arguments in your message, the biggest being :
> Well, one problem is declarative programming has never been as expressive as imperative programming
Haskell is declarative, are you saying Haskell isn't expressive ?
> Flow control does not belong in markup
> In React you'd use JavaScript for this iteration
There is no flow control in HTML , but some frameworks use DSLs in the HTML. If you are saying frameworks shouldn't be using DSLs yet you praise React which uses JSX which contains a declarative DSL in form of XML markup ... your point is a big contradiction.
- insin 11y ago<div data-query="each(products)"> ... </div> The React (or Mithril, or Mercury, or other virtual DOM libraries - just change the function being called) equivalent would be: products.map(product => React.createElement('div', null, ... )) Which you can use JSX (again in any virtual DOM library, via Babel) to sugar as: products.map(product => <div> ... </div>) The flow control is outside the DSL, not part of it.
- reverius42 11y agoA DSL for logic inside of a declarative markup language is very different from a DSL for declarative markup inside a programming language.