Nice things I'm not adding because minimalism - xarvh/squarepants GitHub Wiki

This is a list of stuff that I really like but I will not add to Squarepants because the complexity it adds is not worth the readability or writability gain.

Module unpacking

{ someFunction, someValue, SomeType, 'someConstructor } = SomeModule

Pattern matching

Match guards

https://doc.rust-lang.org/book/ch18-03-pattern-syntax.html#extra-conditionals-with-match-guards

Match text

try someText as
   "someText $someVariableToExtract someOtherText": doSomethingWith someVariableToExtract

Single pattern matching

match value as 'someConstructor x _ y

as a shorthand to

try value as
    'someConstructor x _ y: 'just { x, y }
    _: 'nothing