August 24, 2017 Re: Interpolated strings | ||||
---|---|---|---|---|
| ||||
Posted in reply to Suliman | On Thursday, 24 August 2017 at 11:07:16 UTC, Suliman wrote:
> All modern languages like Dart and C# have string interpolation. Sharp example:
>
> Console.WriteLine($"Hello {args[0]}!");
>
> Who can summary is there any objective reasons why it's not realized in D?
No one has submitted a DIP for that feature and no one has tried to implement it. You could be the first one :P
|
August 24, 2017 Re: Interpolated strings | ||||
---|---|---|---|---|
| ||||
Posted in reply to Suliman | On Thursday, 24 August 2017 at 11:07:16 UTC, Suliman wrote: > All modern languages like Dart and C# have string interpolation. Sharp example: > > Console.WriteLine($"Hello {args[0]}!"); > > Who can summary is there any objective reasons why it's not realized in D? As Raymond Chen once said[1], because no one implemented it. That certainly is part of the answer. If you want other "objective" reasons, there basically are none. It's technically possible to implement, but D devs haven't found it necessary or to their liking. Plenty of reasons for not implementing it have been given in this thread. You may disagree, in which case I encourage you to write a DIP and implement it. -- Biotronic [1] https://blogs.technet.microsoft.com/seanearp/2007/04/12/why-doesnt-this-feature-exist/ |
August 25, 2017 Re: Interpolated strings | ||||
---|---|---|---|---|
| ||||
Posted in reply to Suliman | On Thursday, 24 August 2017 at 11:07:16 UTC, Suliman wrote:
> All modern languages like Dart and C# have string interpolation. Sharp example:
>
> Console.WriteLine($"Hello {args[0]}!");
>
> Who can summary is there any objective reasons why it's not realized in D?
Maybe you ought to read this entire thread?
|
August 25, 2017 Re: Interpolated strings | ||||
---|---|---|---|---|
| ||||
Posted in reply to Petar Kirov [ZombineDev] | On Thursday, 24 August 2017 at 11:57:59 UTC, Petar Kirov [ZombineDev] wrote: > On Thursday, 24 August 2017 at 11:07:16 UTC, Suliman wrote: >> All modern languages like Dart and C# have string interpolation. Sharp example: >> >> Console.WriteLine($"Hello {args[0]}!"); >> >> Who can summary is there any objective reasons why it's not realized in D? > > No one has submitted a DIP for that feature and no one has tried to implement it. You could be the first one :P FYI there has been an attempt: https://github.com/dlang/dmd/pull/6703 But I think this is more an issue of how the language should allow it then on the implementation itself. |
Copyright © 1999-2021 by the D Language Foundation