DMD 0.148 - regular expressions

Dave Dave_member at pathlink.com
Sun Feb 26 08:09:42 PST 2006


In article <dts47r$14c0$1 at digitaldaemon.com>, Lars Ivar Igesund says...
>
>Walter Bright wrote:
>
>> The match expressions are gone. Based on the feedback, people didn't want
>> D to adopt perl'ish notation or implicitly defined variables. Instead,
>> foreach statements now allow implicit typing of the key/value
>> declarations, and the if statement now can declare a variable for the
>> result (an adaptation of Ben Hinkle's idea).
>
>I liked the idea (match expressions), just not the operator, and I thought
>that was a common opinion...

So did I (but the operators didn't bother me). I was surprised to see the
'built-in' behaviour removed. From my understanding, it wasn't terribly
complicated to implement and there wasn't any overhead unless it was used. There
really wasn't any 'perl'ish notation' to speak of, and the recent addition of if
statement result variables would have taken care of the implicitly defined
variable issue.

I think it was a mistake to remove the built-in's. Now I bet they're gone for
good. Arrrgh. I think D would better appeal to a large segment of developers
(using scripting languages like Perl) with the built-in regex match
functionality. 

IIRC, most of the posts liked the built-in idea but took issue with a few of the
details. We've gone from talk about how the compiler can optimize matching
behaviour to removing the built-in's entirely. I don't get it..

- Dave





More information about the Digitalmars-d mailing list