This: comparing something you buy once, with a license does not make a lot of sense. In SaaS, you get update, support, etc. For something critical, I'd rather get that than something that I buy once and may be buggued in the future.
- I put the types first in the file, sorted by importance
- then the public free functions
- then the impl blocks, sorted by importance, also. Usually, display impls and similar end up being at the end
- then the private free functions (helpers)
The idea is that I can see all the types in one glance, then I look at the rest.
What the actual fuck. It's a made up story I'm sure.
It's a toy example. In that case, the solution is to assign the expression to a variable to compute its result upfront.
There are still obvious things the BC cannot get. For example:
struct Foo;
impl Foo {
fn num(&mut self) -> usize { 0 }
fn index(&mut self, _i: usize) { }
}
let foo = Foo;
foo.index(foo.num()); //error
hairyballs
0 post score0 comment score
joined 3 years ago
The Elm compiler