Skip to content

v0.3.11 - Generics, Polymorphism, RAII, Copy & Move

Compare
Choose a tag to compare
@aldrinmathew aldrinmathew released this 30 Sep 10:29
26d09ba
  • Compile-time polymorphism via generic core types and generic functions
  • Runtime polymorphism via mix types, aka Discriminated Unions / Tagged Unions / Sum Types
  • With the addition of constructors and destructors, RAII is officially supported
  • Added support for copy and move constructors & assignment operators. Currenly there is support for manual move
  • Automatic copy & move are work in progress
  • Type definitions are supported. Type definitions and mix types currenly cannot be templated.
  • Choice types are added. These are equivalent to enum classes in C++
  • Local aliases are supported. This enables the user to bind a value to a name and reuse it in that scope, without reassigning it. Currently this is used inside loops. This is an experimental feature
  • Loops can be tagged with a label and then break and continue can use that tag to manage the control flow of that specific loop
  • Pattern matching support for mix & choice types. Expressions are allowed as cases for choice types. Complete expression support is work in progress.
  • Heap allocation and memory management via heap'get, heap'grow and heap'put