www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - recls-D breaking changes - opinions please

Hi chap(ette)s

In updating std.recls for recls 1.5.1, I've currently done the following:

1. renamed Search to FileSearch, and aliased it back to Search
2. added a new class FtpSearch.

That all seems to be working swimmingly.

Now, I'd like to make the classes polymorphically related. This would make the
implementation smaller - who said reuse via inheritance was dead!? <g> - but,
more importantly, it will provide more generalised coding. By relating the two
a common base, a search instance may be passed to a client function that just
process "Entry"s, whether or not they may be based on the local system or a
remote file-system via FTP. The advantages of this should be obvious to all.

However, here's the rub. I'm a big believer in names being important, so I'd
the abstract base class to be called Search. IMO, SearchBase or anything like
that just chews in comparison.

The problem will be that anyone that formerly used std.recls.Search - i.e.
that is using recls - will have to change lines such as

    Search srch = new Search(directory, pattern, flags);


    Search srch = new FileSearch(directory, pattern, flags);

So my question is, this being pre-1.0 and all, can I do this without causing
intolerable consternation amongst the recls-D user community?

[btw, I know this is a shocking lack of forethought, and I will be confessing to
it in the September CUJ column, which will describe all these updates to recls.
Thankfully I had better prescience with the other mappings, albeit only


Matthew Wilson

Author: "Imperfect C++", Addison-Wesley, 2004
Contributing editor, C/C++ Users Journal
Director, Synesis Software
STLSoft moderator

Synesis Software Pty Ltd
P.O.Box 125
New South Wales, 2024

Jun 02 2004