Hacker News new | past | comments | ask | show | jobs | submit login

> hold off evaluating the arguments until runtime or, perhaps, not at all (think short circuit booleans).

> infinite lists

Sounds like an early attempt at Haskell. Haskell is lazy by default so you can write your own "if" as a function and it will be just as short circuiting as the built in if. And infinite lists show up in basic Haskell tutorials.

However Haskell combines this laziness with immutability, which is an easier combination to reason about than laziness with mutable side effects.

Compiler technology for lazy languages is definitely impressive, but it's still the case that if you want to squeeze the last bit of performance out of Haskell code it does usually require manually forcing eager evaluation.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: