Skip to content
Andrew edited this page Sep 3, 2013 · 11 revisions

Version 1.1

  • The for loop that works as both for and foreach loops:

      for a in 1..10 do
          print "a"
    
  • The pure modifier enables automatic memoization for a function

  • Unitialized variables: var x : int

  • The parser has been completely rewritten:

    • FSharp and FParsec dependencies removed
    • Huge speed-up
    • Improved error reporting
    • The entire parser is now a single tiny assembly
  • Various syntax improvements:

    • Function definitions became more clear with arguments in parens:

        fun add:int (x:int y:int) -> x + y
      
    • No braces around the single argument of a lambda:

        getPoints ()
            |> Where (p:Point -> p.X < 10)
            |> Select (p:Point -> fmt "{0}:{1}" p.X p.Y)
      
    • No braces for if, while and catch:

        try
            if a > 10 then
                fail "error"
            else
                while a < 10 do
                    println "a = {0}" a
                    a = a + 1
        catch e:Exception
            print "fail: {0}" e.Message
      

Version 1.0

Initial LENS compiler version.

Clone this wiki locally