Targeting C

Bill Baxter wbaxter at gmail.com
Fri Oct 23 08:51:48 PDT 2009


On Fri, Oct 23, 2009 at 5:13 AM, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> wrote:
> Yigal Chripun wrote:
>>
>> On 23/10/2009 13:02, bearophile wrote:
>>>
>>> Chris Nicholson-Sauls:
>>>
>>>> I prefer this (Scala):
>>>> list = list ++ (0 to 10)
>>>
>>> That's quite less readable. Scala sometimes has some unreadable syntax.
>>> Python has taught me how much useful a readable syntax is :-)
>>> Designing languages requires to find a balance between several different
>>> and opposed needs.
>>>
>>> Bye,
>>> bearophile
>>
>> how about this hypothetical syntax:
>>
>> list ~= [0..10];
>
> I'm not sure what the type of "list" is supposed to be, but this works today
> for arrays:
>
> list ~= array(iota(0, 10));

While we're not on the subject....
"Iota" is right up there with "inSitu".
I know it has a precedent elsewhere, but it sounds about as user
friendly as monads.  It just sounds like the language it trying to be
snooty.  Like "if you don't even know what iota is, you're clearly not
qualified to join our little D club. Maybe you should try Java... or
Logo".   Compare that to Python where it's called "range", something
every Joe the Programmer can certainly grok without having to get a
Greek to English dictionary.

--bb



More information about the Digitalmars-d mailing list