On Wed, Jun 24, 2015 at 11:28:46AM +0000, Jonathan M Davis via Digitalmars-d wrote: > On Wednesday, 24 June 2015 at 11:12:27 UTC, John Chapman wrote: > >On Wednesday, 24 June 2015 at 01:04:01 UTC, Adam D. Ruppe wrote: > >>The code breakage is minimal > > > >Won't this break isSomeString? Phobos uses this everywhere. > > It won't break isSomeString. isSomeString will continue to work the > same. What it will mean is that the result of toLower won't pass > isSomeString anymore, and if you pass it to a range-based function > which has an overload for strings, it won't match it and will be > treated the same as a range like FilterResult and not get the string > optimizations. If you want it to actually be a string, then you'll > need to use to!string on it (even std.array.array wouldn't work, since > that would convert it to dchar[], not string). > > So, that could be a reason why this isn't a great idea, but it once > again highlights why having autodecoding is a bad idea, and it shows > that as we increase how much we're doing with functions which return > lazy ranges, the cost of having autodecoding will only increase, > because we'll being dealing with strings directly less and less. [...]
Yet another nail in the coffin of autodecoding. I really wish we had toughed it out earlier and begun phasing it out. It's kinda late for that now... but maybe it might still be worth it? T -- I am Ohm of Borg. Resistance is voltage over current.
