Re: [Felix-language] Semantics change?

2013-07-05 Thread john skaller
Ok, I implemented this. The default kind for procedures and generators is now "var". However I'm still a bit confused: fun cond (c:bool) (t:int) (var f:int) => if c then t else f; fun div (var x:int, var y:int) => cond (y==0) (-1) (x/y) ; proc check() { var z = 0; var o = 1; println$ o

[Felix-language] Semantics change?

2013-07-04 Thread john skaller
in light of recent bugs and discussion I'm thinking about changing the default evaluation strategy for *procedure* arguments to eager. This may make procedures less efficient. If the argument accesses something the procedure modifies, the semantics may be indeterminate. The problem is that "in p

[Felix-language] Semantics

2012-08-17 Thread john skaller
There are a lot more things which might horrify you if only you knew .. :) Here's one that bit me: Felix optimises away unused variables. So if you do this: proc f() { var x = { printn$ "Hello"; return 1; } (); } f(); you might expect from the eager evalua

[Felix-language] Semantics change (maybe)

2012-07-20 Thread john skaller
I'm currently toying with a semantics change so T = T^1 This seems "obvious", but what it means this: In OO languages we say "everything is an object". In applicative functional languages "everything is a value". In categorical functional languages "everything is a function". In any san

[Felix-language] semantics

2012-05-09 Thread john skaller
I'm still struggling to lock down Felix semantics. As stuff like try/catch shows, certain code has to be stackless, and other code doesn't. It's hard to know what's what due to the optimiser. Current "inline" makes a difference: non-flat code can be flattened by inlining. You can only do supervis