Comment

Comment by aitchnyu

Whoa, a creative (in a good way IMO) use of __ getitem__() dunder method to depict attributes and children. No action at a distance using with blocks, static and strongly typing instead of stringly typing, no need to extend Python, composable from fragments.

Have you tried to "bring up front" if and for? For example

> if_(cond, tag1(), tag2()) # without eagerly execute both branches

Instead of

> tag1() if cond else tag2()

And

for_(cars, lambda car: car_details(car)) # while still being type checked

Instead of

> [car_details(car) for car in cars]

parent aitchnyu 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton