ceylon/ceylon-spec — Issue #173: Relax ordering constraints
Author: FroMage
Created: 2012-02-09 20:43:38+00:00
State: open
Labels: high priority, improvement

The restrictions on ordering of methods/classes are too strict: I can't even write the classic odd/even!

```
Boolean odd(Integer i){
return even(i-1);
}
Boolean even(Integer i){
if(i == 0){
return true;
}
return odd(i-1);
}
```

I find myself moving my code a lot just to make it compile: I have a field that can only be initialised by a function, so it has to be after the function, but that function needs an inner class, which also needs to be before that, but hey wait, that inner class needs access to another function which also needs to be moved up. Waaaaaaa, and now the order is machine-readable, but human-throwable :(