Are Delimited strings and HereDoc strings just here to suck ?

2014-08-11 Thread Klaus via Digitalmars-d-learn
I mean when writing a D lexer, you necessarly reach the moment when you think: Oh no! is this feature just here to suck ?

Re: Are Delimited strings and HereDoc strings just here to suck ?

2014-08-11 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Aug 11, 2014 at 07:47:44PM +, Klaus via Digitalmars-d-learn wrote: I mean when writing a D lexer, you necessarly reach the moment when you think: Oh no! is this feature just here to suck ? I use heredocs every now and then when I need to embed long strings in my program. It's one

Re: Are Delimited strings and HereDoc strings just here to suck ?

2014-08-11 Thread Philippe Sigaud via Digitalmars-d-learn
On Mon, Aug 11, 2014 at 10:09 PM, H. S. Teoh via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On Mon, Aug 11, 2014 at 07:47:44PM +, Klaus via Digitalmars-d-learn wrote: I mean when writing a D lexer, you necessarly reach the moment when you think: Oh no! is this feature

Re: Are Delimited strings and HereDoc strings just here to suck ?

2014-08-11 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Aug 11, 2014 at 10:50:34PM +0200, Philippe Sigaud via Digitalmars-d-learn wrote: On Mon, Aug 11, 2014 at 10:09 PM, H. S. Teoh via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On Mon, Aug 11, 2014 at 07:47:44PM +, Klaus via Digitalmars-d-learn wrote: I mean

Re: Are Delimited strings and HereDoc strings just here to suck ?

2014-08-11 Thread Klaus via Digitalmars-d-learn
On Monday, 11 August 2014 at 20:10:47 UTC, H. S. Teoh via Digitalmars-d-learn wrote: On Mon, Aug 11, 2014 at 07:47:44PM +, Klaus via Digitalmars-d-learn wrote: I mean when writing a D lexer, you necessarly reach the moment when you think: Oh no! is this feature just here to suck ? I use

Re: Are Delimited strings and HereDoc strings just here to suck ?

2014-08-11 Thread Philippe Sigaud via Digitalmars-d-learn
On Mon, Aug 11, 2014 at 10:58 PM, H. S. Teoh via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: In Flex, one way you can implement heredocs is to have a separate mode where the lexer is scanning for the ending string. So basically you have a sub-lexer that treats the heredoc as

Re: Are Delimited strings and HereDoc strings just here to suck ?

2014-08-11 Thread Brian Schott via Digitalmars-d-learn
On Monday, 11 August 2014 at 19:47:46 UTC, Klaus wrote: I mean when writing a D lexer, you necessarly reach the moment when you think: Oh no! is this feature just here to suck ? They are and they do.

Re: Are Delimited strings and HereDoc strings just here to suck ?

2014-08-11 Thread Brian Schott via Digitalmars-d-learn
On Monday, 11 August 2014 at 22:20:54 UTC, Brian Schott wrote: On Monday, 11 August 2014 at 19:47:46 UTC, Klaus wrote: I mean when writing a D lexer, you necessarly reach the moment when you think: Oh no! is this feature just here to suck ? They are and they do. Also, use this:

Re: Are Delimited strings and HereDoc strings just here to suck ?

2014-08-11 Thread Klaus via Digitalmars-d-learn
On Monday, 11 August 2014 at 22:24:28 UTC, Brian Schott wrote: On Monday, 11 August 2014 at 22:20:54 UTC, Brian Schott wrote: On Monday, 11 August 2014 at 19:47:46 UTC, Klaus wrote: I mean when writing a D lexer, you necessarly reach the moment when you think: Oh no! is this feature just

Re: Are Delimited strings and HereDoc strings just here to suck ?

2014-08-11 Thread Klaus via Digitalmars-d-learn
On Monday, 11 August 2014 at 22:56:27 UTC, Klaus wrote: On Monday, 11 August 2014 at 22:24:28 UTC, Brian Schott wrote: On Monday, 11 August 2014 at 22:20:54 UTC, Brian Schott wrote: On Monday, 11 August 2014 at 19:47:46 UTC, Klaus wrote: I mean when writing a D lexer, you necessarly reach the