Skip to content

release-0.6

Compare
Choose a tag to compare
@skx skx released this 27 Sep 05:47
· 270 commits to master since this release

This release updates our parser and run-time to allow object-based method-calls.

Our primitive types (int, float, string, array, & map) have been updated to add some simple methods which may be invoked upon them. For example you can reverse a string like so:

let a = "Steve";
puts( a.reverse() );

Currently methods are implemented upon objects only in Go, it might be that in the future it will be possible to declare object-based methods natively.

This release changes compatibility with previous ones, because it denys the use of "." in method-names. In the past it would have been legal to declare a function with a period in the name, but now it is not - because we want to identify method-invokation instead.

So this used to work, but is now illegal:

  function foo.bar() { puts("Hello!\n" ); }

Finally this release fixes an omission where string-equality testing was not supported. It is now possible to compare two strings, as you would expect:

  let a = "Steve";
  let b = "Ste" + "ve";

  if ( a == b ) { puts( "We can compare strings, yay!\n" ); }