Skip to content

Version 0.12.0

Compare
Choose a tag to compare
@Technologicat Technologicat released this 09 Jan 14:40
· 2492 commits to master since this release

"Metamagical engineering" edition:

What does "metamagical" mean? To me, it means "going one level beyond magic". There is an ambiguity here: on the one hand, the word might mean "ultramagical" - magic of a higher order - yet on the other hand, the magical thing about magic is that what lies behind it is always nonmagical. That's metamagic for you!
--Douglas R. Hofstadter, On Self-Referential Sentences (essay, 1981)

New:

  • Alternative, haskelly let syntax let[((x, 2), (y, 3)) in x + y] and let[x + y, where((x, 2), (y, 3))]
    • Supported by all let forms: let, letseq, letrec, let_syntax, abbrev
  • When making just one binding, can now omit outer parentheses in let: let(x, 1)[...], let[(x, 1) in ...], let[..., where(x, 1)]
  • unpythonic.misc.Box: the classic rackety single-item mutable container
  • Many small improvements to documentation

Breaking changes:

  • New, perhaps more natural call_cc[] syntax for continuations, replaces earlier with bind[...]
    • Conditional continuation capture with call_cc[f() if p else None]
    • cc parameter now added implicitly, no need to declare explicitly unless actually needed (reduces visual noise in client code)
  • Local variables in a do are now declared using macro-expr syntax local[x << 42], looks more macropythonic
  • Silly (lambda) suffix removed from names of named lambdas (to detect them in client code, it's enough that isinstance(f, types.LambdaType))