On Tuesday, 16 September 2014 at 06:27:59 UTC, Klaus wrote:

is just a horrible way of shortcuting the static typing. You write this thinking that i "has to be..." and then you complain latter because the cast does not work. D is a strongly typed lang. in your example you use "auto" because your brain doesnt give you what the type of i has to be, which is an error. D is not a scripting lang. You made a wrong usage of "auto".

Admittedly this came about as a result of some poor design on my part, but I don't get what you're saying about auto. I thought auto was supposed to relieve the cognitive load of manual type identification. Without it, std.algorithm would be a pain to use. My brain doesn't intuitively tell me that std.algorithm.filter returns a FilterResult, but I can use it effectively with auto.

Reply via email to