Skip to content

Juniper 4.0.0

Choose a tag to compare

@calebh calebh released this 30 Nov 23:31
· 13 commits to master since this release

New features:

  • New syntax for sequences, lambdas, match expressions, templates and more.
  • Upgrade the Juniper compiler to use .NET8.
  • Binary for OSX-ARM64 added.
  • Syntax should now be stable now that the language is mostly feature complete.
  • Add inout parameters, removing remaining need for ref cells.
  • stdlib updates, particularly around inout parameters.
  • Bug fixes for pattern matching on integers and reals.
  • smartpointer constructor is now a stdlib function.
  • rawpointer renamed to ptr, pointer renamed to rcptr.
  • Function arguments can now be set to mut.
  • Fixed bugs relating to reference counting garbage collection
  • Removed parens from syntax for loops.
  • Added assignment operation operators (ie: +=, -=, /=, ...)
  • to keyword in for loops now changed to ..
  • downto keyword in for loops removed.
  • Record fields inside record expressions are now assigned with := instead of =
  • Record fields are now separated by commas.
  • Added support for if statements without else branches (these if statements return unit)
  • Colors added to compiler error messages
  • mutable keyword changed to mut
  • Lambdas now use fat arrow syntax, no need for end keyword
  • You can now mutate fields stored in a ref with a right arrow (->)
  • Added support for wildcards in type expressions via an underscore (_)
  • Various compiler output bugfixes.
  • Constructing an array is now done with stdlib (see Prelude:array) instead of built in array keyword.
  • Added sizeof operator.
  • The closure in function types is now optional in many cases, it desugars to use a type wildcard.
  • Tuple types are now written in paren enclosed comma separated list, instead of asterisk separated lists. ie, we now use (a, b, c) and not a * b * c.
  • In a template you now denote an type level integer argument via ": int". This replaces the semicolon separated list.
  • A for range loop is now inclusive, exclusive [a, b) instead of [a, b].
  • Added prune-unreachable flag to the compiler for ignoring dead code.
  • Cases in match expressions no longer need to be separated with commas.
  • Added suffix for double literals "d"