My two cents
ecstatic.coder
ecstatic.coder at gmail.com
Wed Oct 25 16:07:21 UTC 2017
On Tuesday, 24 October 2017 at 08:06:55 UTC, Atila Neves wrote:
> On Tuesday, 24 October 2017 at 07:17:08 UTC, Satoshi wrote:
>> On Monday, 23 October 2017 at 21:42:03 UTC, Atila Neves wrote:
>>> On Monday, 23 October 2017 at 21:14:18 UTC, bauss wrote:
>>>> On Monday, 23 October 2017 at 12:48:33 UTC, Atila Neves
>>>> wrote:
>>>>> On Monday, 23 October 2017 at 09:13:45 UTC, Satoshi wrote:
>>>>>> On Wednesday, 18 October 2017 at 08:56:21 UTC, Satoshi
>>>>>> wrote:
>>>>>>> [...]
>>>>>>
>>>>>> Whats about this one?
>>>>>>
>>>>>> auto foo = 42;
>>>>>> auto bar = "bar";
>>>>>> writeln(`Foo is {foo} and bar is {bar}`);
>>>>>
>>>>> writeln("Foo is ", foo, "and bar is ", bar");
>>>>>
>>>>> Two more characters.
>>>>>
>>>>> Atila
>>>>
>>>> Okay, but what about now?
>>>>
>>>> void sendAMessage(string message)
>>>> {
>>>> ....
>>>> }
>>>
>>> sendAMessage(text(...));
>>>
>>> Atila
>>
>> boilerplate...
>
> True, but in my opinion not enough to justify complicating the
> language. One could also always do:
>
> import std.conv: t = text;
> sendAMessage(t("Foo is ", foo, " and bar is ", bar"));
>
> If it were me I'd just make `sendAMessage` take a variadic
> template and call text internally.
>
> Atila
I agree. D MUST remain as simple as possible.
For instance I'm against forcing D programmers to use annotations
which won't be implicit anymore.
Keep D's syntax as simple and concise as it is now, don't make it
more complicated.
And if you add synctactic sugar constructs to make it even more
concise, first make sure that this won't make D more complicated
to learn and to use...
More information about the Digitalmars-d
mailing list