On 30/01/2014, at 11:22 AM, srean wrote: > I love the scope of extra optimization that it brings, but correctness now > stands on a very shaky ground. If there was compiler support, I would have > eagerly (no pun intended) embraced it.
Ocaml is no different. Plenty of people like it. It's a functional language with eager evaluation of arguments in an indeterminate order, which also has references to mutable record fields and mutable abstract data structures. There's no help from Ocaml on this. You have to know what you're doing if you dare to use a Hashtable because they're mutable. In fact someone once complained that for a record in Ocaml if you write this: { one = e1; two = e2; three = e3 } you get BIG surprise! The field are evaluated three two one! Yet somehow people manage. There's no help in C++ either, except a much worse type system. If you want a high performance well typed language Felix isn't bad. Ocaml has better typing. Haskell is even better on semantics but don't expect to be able to predict performance. Take your pick. There are some diagnostics which could be added to the compiler. And there are new way to do things which may help. One I am looking at is: var x = 1; observer f () => x; An observer is a function which depends on mutable state. It doesn't modify any state. Sometimes this is called accessor f() => x; Simply being able to DOCUMENT your intent here would be a big help, even without any checks done by the compiler. the biggest problem with this is trivial .. I can't think of a good "name" for it. Both observer and accessor are too long. Generator got shortened to "gen" so I could use "obs" or "acc" or something. -- john skaller skal...@users.sourceforge.net http://felix-lang.org ------------------------------------------------------------------------------ WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language