Re: [rust-dev] Virtual fn is a bad idea

2014-03-11 Thread Haoyi Li
FWIW, C# requires that you mark overridable functions *virtual*, the opposite of Java where you need to mark un-overridable functions *final*. The Scala community is coming to the same conclusion that unrestricted overriding is pretty dangerous. It's similar to monkey patching, with all the

Re: [rust-dev] let mut - var

2014-01-29 Thread Haoyi Li
Sorry to parachute in to the conversation (long time lurker) but just to add to the statistics, the Scala standard library and compiler has 11875:54575 ratio of mutable (var) vs immutable (val) declarations, so it seems to match pretty well with the numbers you guys are seeing in the rust

Re: [rust-dev] Abandoning segmented stacks in Rust

2013-11-05 Thread Haoyi Li
C# Async/Await is distinct from segmented stacks because they store the enclosed variables as heap objects rather than on the stack; that means it goes through the same malloc/garbage collector as any other heap objects you create. It's purely a compiler fiction to let you write code that 'looks'