digitalmars.D - recls-D breaking changes - opinions please
- Matthew (41/41) Jun 02 2004 Hi chap(ette)s
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 by 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 like 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. anyone that is using recls - will have to change lines such as Search srch = new Search(directory, pattern, flags); to 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 slightly. <G>] Cheers Matthew Wilson Author: "Imperfect C++", Addison-Wesley, 2004 (http://www.imperfectcplusplus.com) Contributing editor, C/C++ Users Journal (http://www.synesis.com.au/articles.html#columns) Director, Synesis Software (www.synesis.com.au) STLSoft moderator (http://www.stlsoft.org) Synesis Software Pty Ltd P.O.Box 125 Waverley New South Wales, 2024 Australia -----------------------------------------------------
Jun 02 2004