Hacker News new | ask | show | jobs
by hartator 2548 days ago
I've read the article and part of the documentation and I still don't have an idea what's the added value?

Looking at the code doesn't seem specially appealing:

  export default UICell.with(
  UICenterRow.with(
    UILabel.withText(bindf("${foo}, world!")),
    UIPrimaryButton.with({
      label: "Do something",
      onClick: "doSomething()"
    })
  )
  )
5 comments

I don't think it's in good taste to use a reserved word like "with" in the API either. And it feels like it's being used in places where a plain function call would suffice (you call a function "with" params).
When I saw this example I knew that this isn't for me. Super verbose and the arguments in favor of OOP are shallow at best.
Looks heavily inspired by Apple-designed frameworks, which I've never been a fan of.

Also, is it really as strongly typed as claimed, when the onclick binding in this example is stringly typed? That's a nonstarter for me.

I don't know if it's because I've been reading and writing HTML for 20 years... but this looks very difficult to parse. I have to pay much more attention to what's going on.
This code also seems like it generates inline event handles which make it much harder to deploy good CSP.