January 11, 2011
Nick Sabalausky wrote:
> "Andrei Alexandrescu" <SeeWebsiteForEmail@erdani.org> wrote in message news:igi18o$e5e$2@digitalmars.com...
>> On 1/11/11 6:34 AM, Ary Borenszweig wrote:
>>> Oh, one more thing: can the names be consistent?
>>>
>>> inpattern
>>> countChars
>>> expandtabs
>>> chompPrefix
>>> toupper
>>> toupperInPlace ??
>>>
>>> If this can't be done for backwards compatibility maybe you can make alias for the
>>> previous ones.
>> The names are for compatibility with... other languages :o|.
>>
> 
> Would that other language be Walterish or C?

The names generally come from Python, Ruby and Javascript.
January 11, 2011
"spir" <denis.spir@gmail.com> wrote in message news:mailman.550.1294771968.4748.digitalmars-d@puremagic.com...
> On 01/11/2011 07:14 PM, Nick Sabalausky wrote:
>> "Daniel Gibson"<metalcaedes@gmail.com>  wrote in message news:igi6n5$27pv$1@digitalmars.com...
>>> Am 11.01.2011 19:07, schrieb Nick Sabalausky:
>>>> Thoust words are true.
>>>>
>>>> Seriously though, I'm pretty sure a lot of native english speakers
>>>> don't
>>>> know "sans" either, unless they're familiar with font-related
>>>> terminology.
>>>> "In lieu of" is widely-known though, at least in the US.
>>>>
>>>>
>>>
>>> I'm neither representative nor a native speaker (I'm german) and I knew sans, but didn't know "In lieu of".
>>
>> I guess that just goes to show, we should all just switch to Esperanto ;)
>
> No, esperanto is just a heap of language-design errors!
>

And that differs from English, how? ;)


January 11, 2011
Why care where they come from? Why not make them intuitive? Say, like, "Always camel case"?
January 11, 2011
Nick Sabalausky wrote:
> Seriously though, I'm pretty sure a lot of native english speakers don't know "sans" either, unless they're familiar with font-related terminology. "In lieu of" is widely-known though, at least in the US.

I used to keep a dictionary on my desk, but now I just google definitions. I don't see a good reason to dumb down the language.

BTW, english is full of french words, thanks to the Battle of Hastings.
January 11, 2011
Nick Sabalausky wrote:
> "Andrej Mitrovic" <andrej.mitrovich@gmail.com> wrote in message news:mailman.543.1294713068.4748.digitalmars-d@puremagic.com...
>> Speaking of regex.. I see there are two enums in std.regex, email and
>> url, which are regular expressions. Why not collect more of these
>> common regexes? And we could pack them up in a struct to avoid
>> polluting the local namespace. I think this might encourage the use of
>> std.regex, since the average Joe wouldn't have to reach for the regex
>> book whenever he's processing strings. E.g.:
>>
>> foreach(m; match("10abc20def30", regex(patterns.number))) //
>> std.regex.patterns.number
>> {
>>    writefln("%s[%s]%s", m.pre, m.hit, m.post);
>> }
>>
>> Just a passing thought..
> 
> I think that's a great idea.

I agree.
January 11, 2011
Adam Ruppe wrote:
> I don't know about bearophile, but I used a lot of the functions
> you are talking about removing in my HTML -> Plain Text conversion
> function used for emails and other similar environments. squeeze the
> whitespace, align text, wrap for the target, etc.

As has been pointed out, a lot of these seemingly odd functions come from Python/Ruby/Javascript. Users of those languages will be familiar with them, and they've proven themselves handy in those languages.

Let's not be cavalier about dumping them just because they aren't familiar to C programmers.
January 11, 2011
Ary Borenszweig wrote:
> Why care where they come from? Why not make them intuitive? Say, like, "Always
> camel case"?

Because people are used to those names due to their wide use. It's the same reason that we still use Qwerty keyboards.
January 11, 2011
Am 11.01.2011 20:42, schrieb Walter Bright:
> Ary Borenszweig wrote:
>> Why care where they come from? Why not make them intuitive? Say, like, "Always
>> camel case"?
>
> Because people are used to those names due to their wide use. It's the same
> reason that we still use Qwerty keyboards.

And C++ :-P
January 11, 2011
Agreed. So what's wrong with improving things and leaving old things as aliases?
January 11, 2011
"Welcome to D. Do you program in C, Javascript, Python or Ruby? Cool! Then you will feel at home."

That phrase currently ends like this:

"You don't? Oh, sorry, you will have to learn that some names are all lowercase, some not."

But it could end like this:

"You don't? Don't worry. D has the convention of writing all function names with X convention, but we keep some aliases for things that we want to keep backwards compatibility for."