Skip to content

Samarium 0.3.0

Compare
Choose a tag to compare
@trag1c trag1c released this 21 Sep 18:01
· 655 commits to master since this release

Added

  • ** (the yield statement)
  • Array support for string.format
  • Better error messages
  • datetime module by @Endercheif
  • Enums
  • iter.chunks
  • iter.flatten
  • iter.sorted
  • Iterators
  • Memory address lookup
  • Private variables
  • snake_case support
  • Substring support for iter.find_all

Changed

  • # for assert has been replaced by !!
  • @@ now returns the Unix timestamp
  • @@@ now returns the date and time array
  • Classes can now be used as entry points
  • Improved hashing speed
  • Improved iter module speed by making it use Iterators over Arrays
  • Moved from termcolor to Dahlia
  • Rewrote the transpiler
  • Slice objects are now iterable and can be used as ranges (about 3–7x faster than iter.range 🚀)
  • Slices now use .. instead of ** for the step delimiter (<<x..y**z>> would be <<x..y..z>>)
  • Class special method names were changed to snake_case
  • Standard Library function names were changed to snake_case
  • Standard Library constant names were changed to SCREAMING_SNAKE_CASE
  • to_string method doesn't need to be defined for the object to be printable (defaults to <ClassName@MemoryAddress>)

Fixed

  • Nested slicing

Removed

  • _ as a null token
  • iter.range (use slices)
  • iter.sort (use iter.sorted)