std.string and std.algorithm: what to do?

Lutger lutger.blijdestijn at gmail.com
Thu May 14 13:16:30 PDT 2009


Michiel Helvensteijn wrote:

> dsimcha wrote:
> 
>>> Hm.. I suppose a project could import any Boolean combination of tags:
>>> import algorithm & string;
>>> import algorithm | string;
>>> import algorithm & !string;
>> 
>> This seems like overkill.  Module/package/import/whatever management
>> should not require a Ph.D. in Boolean logic.  It should be dead simple 
>> (i.e. like the current system is, esp. after 314 gets fixed) and allow 
>> people to get on with solving real problems.
> 
> Hey, just because the system is available, doesn't mean that every
> programmer should use it. For most people, imports would become even
> simpler than they are now:
> 
> import string;
> 
> would import every symbol with the `string' tag. If you only want the
> std.string functions,
> 
> import std & string;
> 
> or even
> 
> import std.string;
> 
> would do. And no one would notice the difference, except those Boolean PhD
> types who want to use the system to its fullest. ;-)
> 
> Mostly it would make life easier for the library writers. Is
> std.string.find() a string function xor an algorithm? Nope. It's both.
> 

It has it's advantages, but misses the simplicity of matching symbols to the filesystem. 
You will also become more and more reliant on (specialized) tools with these kinds of systems, like .NET. 




More information about the Digitalmars-d mailing list