So, to print or not to print?
tn via Digitalmars-d
digitalmars-d at puremagic.com
Wed Apr 27 00:36:26 PDT 2016
On Tuesday, 26 April 2016 at 18:45:09 UTC, Andrei Alexandrescu
wrote:
> On 04/26/2016 02:29 PM, TheGag96 wrote:
>> On Tuesday, 26 April 2016 at 14:33:42 UTC, tn wrote:
>>> Maybe the name of the function should then be "writes" and/or
>>> "writesln" (instead of "print"), so that it can at least be
>>> found from
>>> the same place in the documentation as other related
>>> functions. The
>>> naming scheme would then also be consistent with the rest of
>>> the
>>> write/writef-family. (Here -s stands for "separated/spaced"
>>> just as -f
>>> stands for "formatted" etc.)
>>
>> I really like this idea. Much better than just "print", and
>> maybe even
>> better than "dump".
>
> Can't it be confused with a verb? -- Andrei
Maybe, but does it matter? I don't see any obvious but different
meaning for it.
Another option is writed/writedln, where d stands for
delimited/delimiter.
Of course, naming it after on "separated"/"delimited" kind of
suggests, that you could give it a separator/delimiter string as
a compile time or runtime parameter. Obviously, while being
analogous to writef and more flexible, a runtime parameter would
make the usage of the function more complicated in simple cases.
More information about the Digitalmars-d
mailing list