On Wed, Feb 18, 2009 at 3:36 AM, Andrei Alexandrescu
<seewebsiteforem...@erdani.org> wrote:

> Besides std.regexp only works with (narrow) strings and we want it to work
> on streams of all widths and structures. One pet complaint I have is that
> std.regexp puts a class around it all as if everybody's favorite pastime
> would be to inherit Regexp and override some random function in it.

So what do you think it should be, a struct?
That would imply to me that everybody's favorite pastime is making
value copies of regex structures, when in fact nobody does that.

Regex is a class in order to give it reference semantics and provide
encapsulation of some re-usable state.  Maybe it should be a final
class, but my impression is "final class" doesn't really work in D.

--bb

Reply via email to