On Wednesday, 24 September 2014 at 04:46:01 UTC, Sean Kelly wrote:
Yes, the inference is very nice. And I do see the use for each attribute. It's just... when I look at a function and there's a line of attributes before the function declaration that have nothing to do with what the function actually does but rather with how it's implemented, it's just syntactic noise. It's information for the compiler, not me as a user. I hope we'll eventually get to the point where everything is inferred and the attributes disappear entirely.

What is the problem with complete automatic inference?
Wouldn't it be possible to deduce the flags in the bottom up direction of a function call hierarchy? I guess it is possible for the compiler to see the right choice of flags for a function, which doesn't call other functions. E.g. make it @safe if possible, @nogc if possible and so on. Then it should process function after function until all functions are done.

Thomas

Reply via email to