December 05, 2019
On Wednesday, 4 December 2019 at 22:37:24 UTC, Walter Bright wrote:
> The only real cost identified is poor support for syntax highlighting in some text editors. On the other hand, heredocs are a common language feature, and other methods of doing it are so clumsy people rarely have the stomach to do it.

If those other literals are bad. For python it's the opposite: given triple quoted strings people can't stand delimited strings and use triple quoted strings predominantly instead of delimited strings, see it in action: https://github.com/django/django/blob/master/django/core/signing.py - it's the first random python code I found on github.
December 05, 2019
On Thursday, 5 December 2019 at 18:07:08 UTC, Kagamin wrote:
> If those other literals are bad. For python it's the opposite: given triple quoted strings people can't stand delimited strings and use triple quoted strings predominantly instead of delimited strings, see it in action: https://github.com/django/django/blob/master/django/core/signing.py - it's the first random python code I found on github.

Yes, that usage you link to was for docs-strings though (more like comments), but I use Python triple quoted strings all the time. I have never really run into a situation where there was a clash with """, actually. Looks like a too simple solution, but works very well in practice.

Another point is that here-documents may be important in WebAssembly for embedding "files".

December 05, 2019
On Thursday, 5 December 2019 at 18:07:08 UTC, Kagamin wrote:
> On Wednesday, 4 December 2019 at 22:37:24 UTC, Walter Bright
> wrote:
>> The only real cost identified is poor support for syntax highlighting in some text editors. On the other hand, heredocs
>> are a common language feature, and other methods of doing it
>> are so clumsy people rarely have the stomach to do it.
>
> If those other literals are bad. For python it's the opposite: given triple quoted strings people can't stand delimited strings and use triple quoted strings predominantly instead of delimited strings, see it in action:

Python doesn't have delimited strings.

December 05, 2019
On Thursday, 5 December 2019 at 18:23:10 UTC, Ola Fosheim Grøstad wrote:
> Another point is that here-documents may be important in WebAssembly for embedding "files".

D can embed files with import expression https://dlang.org/spec/expression.html#import_expressions
December 05, 2019
On Thursday, 5 December 2019 at 18:34:12 UTC, Kagamin wrote:
> On Thursday, 5 December 2019 at 18:23:10 UTC, Ola Fosheim Grøstad wrote:
>> Another point is that here-documents may be important in WebAssembly for embedding "files".
>
> D can embed files with import expression https://dlang.org/spec/expression.html#import_expressions

That is a nice alternative for long text, but when building websites you often deal with many shorter blocks of text.

Anyway. Although I prefer """ as it is visually cleaner, C++ actually has something similar to D:

const char* s1 = R"foo(
Hello
World
)foo";

https://en.cppreference.com/w/cpp/language/string_literal

So, highlighters need to support that if they want to support C++...

December 06, 2019
On 12/3/2019 1:27 PM, H. S. Teoh wrote:
> Yes, sigh, I can see it already: this thread is going to be another of
> those interminably-long debates and nitpicking over technicalities, and
> at the end of it all, this DIP will fall by the wayside and we will have
> accomplished nothing.

It's a well-known effect that the less technical a proposal is, the more debate will follow.

1 2 3 4 5 6 7
Next ›   Last »