top | item 38709028

(no title)

3dGrabber | 2 years ago

Why would you insist to write the function name both before AND after the call?

<DoStuff> args </DoStuff>

vs

DoStuff(args)

discuss

order

iamsaitam|2 years ago

Is this the main argument? I think the simplest answer is boundaries. Taking into account how much nesting is involved in writing HTML, it's a clear benefit having a named boundary vs a closing parenthesis.

3dGrabber|2 years ago

> Taking into account how much nesting is involved in writing HTML

which is another one of its flaws.

pastacacioepepe|2 years ago

More like:

<DoStuff args={...} />

3dGrabber|2 years ago

Please no

The {...} syntax is a non-standard extension to XML/HTML I think MS came first up with back in the day for XAML (WPF).

It's a hack to "fix" a shortcoming of the base language.

It does not compose, i.e. :

<DoStuff args={<DoMoreStuff args={...} />} />

does not work.