Should this work?

Regan Heath regan at netmail.co.nz
Tue Jan 28 03:28:47 PST 2014


On Mon, 27 Jan 2014 16:19:54 -0000, Andrei Alexandrescu  
<SeeWebsiteForEmail at erdani.org> wrote:

> On 1/27/14 6:27 AM, Regan Heath wrote:
>> On Sat, 25 Jan 2014 10:15:28 -0000, Peter Alexander
>> <peter.alexander.au at gmail.com> wrote:
>>> Special cases are pure evil. There's nothing special about strings in
>>> this case.
>>
>> This is a tangent to my suggestion.
>>
>> I am arguing for domain specific language (aliases) where sensible, not
>> domain specific functions.  If canFind can already handle all the
>> desirable string cases, perfect, but lets alias it in std.string as
>> "contains" so that people find what they expect to find first time and
>> don't get frustrated looking for the correct generic name for the
>> functionality they want.
>>
>> There are likely other cases where we already have all the functionality
>> in a nice generic function, but people struggle to find it because it
>> has a suitably generic name.
>>
>> I just want us to lower the bar for beginners coming from other
>> languages like Java and C#.
>
> I just don't think this scales, though I understand it can sound  
> reasonable before it being tried.
>
> Walter doesn't like writing libraries so when he first defined Phobos'  
> string support he simply took the string functions in Python and Ruby  
> and implemented them. That didn't work well at all, in spite of the  
> functions having the same names and semantics.

What specifically didn't work?  All I can recall are UTF and slicing  
issues, some of which remain with us today.

R

-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/


More information about the Digitalmars-d mailing list