Bye bye, fast compilation times

Timothee Cour thelastmammoth at gmail.com
Tue Feb 6 20:59:49 UTC 2018


another weird gotcha:
  auto s="foo".isEmail;
  writeln(s.toString); // ok
  writeln(s); // compile error


On Tue, Feb 6, 2018 at 12:30 PM, Steven Schveighoffer via
Digitalmars-d <digitalmars-d at puremagic.com> wrote:
> On 2/6/18 3:11 PM, Walter Bright wrote:
>>
>> On 2/5/2018 9:35 PM, Dmitry Olshansky wrote:
>>>
>>> That’s really bad idea - isEmail is template so the burden of freaking
>>> slow ctRegex
>>> is paid on per instantiation basis. Could be horrible with separate
>>> compilation.
>>
>>
>> std.string.isEmail() in D1 was a simple function. Maybe regex is just the
>> wrong solution for this problem.
>>
>
> The regex in question I think is to ensure an email address like
> abc at 192.168.0.5 has a valid IP address. The D1 function doesn't support that
> requirement.
>
> I admit, I've never used it, so I don't know why it needs to be so complex.
> But I assume some people depend on that functionality.
>
> -Steve



More information about the Digitalmars-d mailing list