Re: import std.traits. std.string;

2018-06-17 Thread Neia Neutuladh via Digitalmars-d
On Saturday, 16 June 2018 at 06:43:25 UTC, Meta wrote: On Saturday, 16 June 2018 at 00:24:42 UTC, DigitalDesigns wrote: space is ignored! Seems like a bug std . traits . std . string is valid? Like most C-family languages, D is a freeform language[1]. Funnily enough, I don't think this is

Re: import std.traits. std.string;

2018-06-16 Thread Meta via Digitalmars-d
On Saturday, 16 June 2018 at 00:24:42 UTC, DigitalDesigns wrote: space is ignored! Seems like a bug std . traits . std . string is valid? Like most C-family languages, D is a freeform language[1]. Funnily enough, I don't think this is explicitly stated in the D spec (at least not that I

Re: import std.traits. std.string;

2018-06-15 Thread Basile B. via Digitalmars-d
On Saturday, 16 June 2018 at 00:24:42 UTC, DigitalDesigns wrote: space is ignored! Seems like a bug std . traits . std . string is valid? No, it's not a bug. Tokens are so. Try to write a grammar and a lexer, you'll understand that this makes sense. https://run.dlang.io/is/5YxAwR

Re: import std.traits. std.string;

2018-06-15 Thread DigitalDesigns via Digitalmars-d
operators, is allowed to be surrounded by spaces. (Even though most people don't write it that way.) T So, what you are saying is that if one does import std.traits. std.string; the compiler is parsing that as valid code? Let me ask you why you think it is allowed. Is it because it just

Re: import std.traits. std.string;

2018-06-15 Thread H. S. Teoh via Digitalmars-d
On Sat, Jun 16, 2018 at 12:24:42AM +, DigitalDesigns via Digitalmars-d wrote: > space is ignored! Seems like a bug std . traits . std . string is valid? It's not a bug. The '.' is the member-access operator, and like all other operators, is allowed to be surrounded by spaces. (Even though

import std.traits. std.string;

2018-06-15 Thread DigitalDesigns via Digitalmars-d
space is ignored! Seems like a bug std . traits . std . string is valid?