h("div", {}, [
h("p", {}, "this is easy"),
...list.map((l) => h("li", {}, l),
])
With this you automatically get loops, variable interpolation etc without having to invent a compiler and new syntax. Can someone help me understand?Deleted Comment
I'll hang onto my 13 Mini for as long as I can, hopefully they will update the SE to basically be the new Mini.
can you explain this a bit more? it seems to me that test coverage and typing solve different problems.
There are certainly new compelling projects like Sorbet to add type checking, and the ecosystem itself is very mature, it's just that the average codebase is not going to live up the experience you might have with a brand new one.
It just becomes so easy to incrementally add functionality here.
---
Quick syntax reference for anyone reading:
- Pipelines apply the previous result as the first argument of the next function
- The `/1` after a function name indicates the arity, since Elixir supports multiple dispatch
- `&fun/1` expands to `fn arg -> fun(arg) end`
- `&fun(&1, "something")` expands to `fn arg -> fun(arg, "something") end`