-
Notifications
You must be signed in to change notification settings - Fork 11
What's new?
Andrew edited this page Apr 17, 2014
·
11 revisions
-
The parser has been completely rewritten:
-
FSharpandFParsecdependencies removed - Huge speed-up
- Improved error reporting
- The entire compiler is now a single assembly of 270 kb.
-
-
The
forloop that works as bothforandforeachloops:for a in 1..10 do print "a" -
The
puremodifier enables automatic memoization for a function -
Unitialized variables:
var x : int -
Multiline object initializers
var x = new [ "hello there" fmt "{0}, {1} and {2}" 1 true 2.5 ] -
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,whileandcatch: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
-
- Constant expressions are evaluated at compile time
- Several bugfixes
Initial LENS compiler version.