I'm fascinated to see Steve Losh demonstrating a 'gather' macro in Common Lisp, removing boilerplate for an accumulator: https://stevelosh.com/blog/2018/05/fun-with-macros-gathering/
Most use of yield in Python seems to be focused on gathering rather than lazy evaluation, but I never had a name for the concept!
miniblog.
Related Posts
I'm still experimenting with UIs for live (sandboxed) evaluation of tests. I've realised that you really want to highlight the failing assertion, not just the failing test.
Feedback welcome :)
It's odd how lazy evaluation is generally seen as a niche design choice, yet the vast majority of languages treat `foo() || bar()` as short-circuiting.
Implementing type checking as another interpreter, with short, accessible examples: