Why Strings as Classes?

Simen Kjaeraas simen.kjaras at gmail.com
Wed Aug 27 09:42:50 PDT 2008


Michiel Helvensteijn <nomail at please.com> wrote:

> a[i] looks much nicer than a.nth(i).

To me, this is one of the most important points here. I want a
language that seems to make sense, more than I want a language
that is by default very fast. When I write a short example
program, I want to write a[i] not a.getElementAtPosition(i).

D is known as a language that does the safe thing by default,
and you have to jump through some hoops to do the fast, unsafe
thing. I will claim that a[i] is the default, as it is what
we're used to, and looks better. a.nth(i),
a.getElementAtPosition(i) and whatever other ways one might
come up with, is jumping through hoops.

Just my 0.02 kr.

-- 
Simen



More information about the Digitalmars-d mailing list