summaryrefslogtreecommitdiff
path: root/CODE_OF_CONDUCT.md
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2019-02-06 07:26:28 +0100
committerEugen Wissner <belka@caraus.de>2019-02-06 07:26:28 +0100
commit0c8f1eb4ce729a3967b5fa905f5999ab439e186a (patch)
tree68253d6c9e0e0162f9305dd75308c4943bbf9003 /CODE_OF_CONDUCT.md
parentbf197a6554b94b2607bdbb8cd7fa0edf10145340 (diff)
downloadtanya-0c8f1eb4ce729a3967b5fa905f5999ab439e186a.tar.gz
Deprecate InputRange source for OutputRanges
An output range for E won't be automatically an output range for [E] anymore. The same, an output range for [E] won't be automatically an output range for E. Automatic E <-> [E] conversion seems to be a nice feature at first glance, but it causes much ambiguity. 1) If I want that my output range accepts only UTF-8 strings but not single characters (because it could be only part of a code point and look like broken UTF-8 without the remaining code units), I can't do it because an OutputRange(R, E) can't distinguish between char and string. 2) Here is an example from 2013: import std.range; import std.stdio; Appender!(const(char)[][]) app; put(app, "aasdf"); put(app, 'b'); writeln(app.data); This outputs: ["aasdf", "\0"]. Whether it is a common case or not, such code just shouldn't compile.
Diffstat (limited to 'CODE_OF_CONDUCT.md')
0 files changed, 0 insertions, 0 deletions