View mode: basic / threaded / horizontal-split · Log in · Help
June 01, 2005
Re: The Focus of D
Andrew Fedoniouk wrote:
> d is distance, discriminant, data.
> 

If I were reading your code, how the hell would I know which one of 
those d was supposed to mean...

Programing is allot about choosing names for things... I am sure 
everyone using D has a sufficient vocab, probably better than mine. USE IT!

-- 
Thanks,
Trevor Parscal
www.trevorparscal.com
trevorparscal@hotmail.com
June 01, 2005
Re: should std package be renamed?
"kris" <fu@bar.org> wrote in message news:d7jjj4$nkc$1@digitaldaemon.com...
> So I'll be an ass, and postulate "use mango.io instead?"
>

Harmonia also got harmonia.io.
Nothing spectacular there though. GUI related io.

Andrew.





> <g>
>
>
> J C Calvarese wrote:
>> In article <d7j1ir$82d$1@digitaldaemon.com>, Ben Hinkle says...
>>
>>>It seems ugly to me to have modules like std.stdio, std.stdarg, 
>>>std.stdint and all the std.c.stdio, std.c.stdlib and friends. Anyone else 
>>>think
>>
>>
>> I'd try renaming std.stdio > std.io std.stdarg > std.arg
>> std.stdint > std.integer
>> for starters.
>>
>>
>>>something should be done? The most obvious choice is to change "std" to 
>>>"d" and move "std.c.foo" to "c.foo". For example the directory structure 
>>>would become (where indenting indicates nesting)
>>>phobos
>>> etc (same as before)
>>> c
>>>   stdio
>>>   stdlib
>>>   stdarg
>>>   ...
>>> d
>>>   boxer
>>>   conv
>>>   ctype
>>>   date
>>>   ...
>>>   stdarg
>>>   stdio
>>>   string
>>>   ...
>>>   zlib
>>>
>>>For example instead of
>>> import std.stdio;
>>> import std.c.stdio;
>>> import std.string;
>>>you'd write
>>> import d.stdio;
>>> import c.stdio;
>>> import d.string;
>>>
>>>
>>
>>
>> I suggested a similar idea a couple years ago (before we had "std"), but 
>> it
>> turned out I was wrong. Walter's message from 17 Oct 2003:
>>
>> "What happened was that I'd prefer just 'd', but it wound up causing 
>> problems
>> because 'd' was commonly used as a local variable name. 'D' is rarely 
>> used,
>> so seemed to make better sense.
>>
>> "Compromises everywhere, sigh <g>."
>>
>> (http://www.digitalmars.com/drn-bin/wwwnews?D/18378)
>>
>>
>> We managed to convince him that "D" wasn't good enough either and finally 
>> Walter
>> selected "std" as the name. I think Phobos could use some reorganization, 
>> but I
>> don't think "d" is the answer.
>>
>> jcc7
June 01, 2005
Re: should std package be renamed?
Andrew Fedoniouk wrote:
> "kris" <fu@bar.org> wrote in message news:d7jjj4$nkc$1@digitaldaemon.com...
> 
>>So I'll be an ass, and postulate "use mango.io instead?"
>>
> 
> 
> Harmonia also got harmonia.io.
> Nothing spectacular there though. GUI related io.
> 
> Andrew.

Wasn't there some kind of tripped-out psychedelic folk-music act in the 
sixties called "Harmonia & Mango" ?
June 01, 2005
Re: The Focus of D
The variable "d" is often used in conjunction with "a", "b", and "c". 
For example, an implementation of the SHA-1 algorithm uses the first 
five letters of the alphabet in its formula.

I would hate to use a language that gave me an error like this:

test.d(10): the variable name "ab" is too short.

I hope you realize I would go to another compiler if I ever saw a 
message like that.  When writing programs for others to use, remember:

You and your program *are not* and *should not be portrayed as* better 
than the user, ever or even to any degree.  *The user is king*, and your 
program is his or her *LOWLY SERVANT*.

Anything else is offensive and annoying.

-[Unknown]


> Who names a variable d? That is the most non-descriptive variable name 
> ever, and anyone who uses it should be slapped with a fine, payable to 
> Walter's pay pal account.
> 
> x, y.. z.. I can see.. Like in coordinate systems.. I suppose I can 
> event see w and h if you are so lazy you cant write width and height.. 
> Which btw drives me insane... If d is a common variable name, local, 
> global.. class members.. ANYTHING.. Than what are you using it for? 
> PLEASE tell me!
June 01, 2005
Re: The Focus of D
On Tue, 31 May 2005 23:35:26 -0700, Andrew Fedoniouk wrote:

> d is distance, discriminant, data.

d is dumb  ;-)

-- 
Derek Parnell
Melbourne, Australia
1/06/2005 5:17:31 PM
June 01, 2005
Re: The Focus of D
"Trevor Parscal" <trevorparscal@hotmail.com> wrote in message 
news:d7jl48$omj$1@digitaldaemon.com...
> Andrew Fedoniouk wrote:
>> d is distance, discriminant, data.
>>
>
> If I were reading your code, how the hell would I know which one of those 
> d was supposed to mean...

Easy, see:

bool HaveSpacesuitWillTravel()
{
 foreach(distance d; stars)
{
   if (d <= 4.3)
      writef("Alpha Centaurus? Piece of cake!");
   else
     writef("Do you have a spare ion drive, BTW?");
 }
}

>
> Programing is allot about choosing names for things... I am sure everyone 
> using D has a sufficient vocab, probably better than mine. USE IT!
>
> -- 
> Thanks,
> Trevor Parscal
> www.trevorparscal.com
> trevorparscal@hotmail.com
June 01, 2005
Re: The Focus of D
In article <1o6qpoefvv20w$.i85textgh7d9$.dlg@40tude.net>, Derek Parnell says...
>
>On Tue, 31 May 2005 23:35:26 -0700, Andrew Fedoniouk wrote:
>
>> d is distance, discriminant, data.
>
>d is dumb  ;-)

It's not dumb. It's just the letter I use when a, b, and c are already used. :)

jcc7
June 01, 2005
Re: should std package be renamed?
In article <d7jjj4$nkc$1@digitaldaemon.com>, kris says...
>
>So I'll be an ass, and postulate "use mango.io instead?"
>
><g>

Can we continue the tread, then...

std.stdarg > mango.arg
std.stdint > mango.integer

=)

>
>
>J C Calvarese wrote:
>> In article <d7j1ir$82d$1@digitaldaemon.com>, Ben Hinkle says...
>> 
>>>It seems ugly to me to have modules like std.stdio, std.stdarg, std.stdint 
>>>and all the std.c.stdio, std.c.stdlib and friends. Anyone else think 
>> 
>> 
>> I'd try renaming 
>> std.stdio > std.io 
>> std.stdarg > std.arg
>> std.stdint > std.integer
>> for starters.

..

jcc7
June 01, 2005
Re: The Focus of D
In article <d7jp8f$u1o$1@digitaldaemon.com>, J C Calvarese says...
>
>In article <1o6qpoefvv20w$.i85textgh7d9$.dlg@40tude.net>, Derek Parnell says...
>>
>>On Tue, 31 May 2005 23:35:26 -0700, Andrew Fedoniouk wrote:
>>
>>> d is distance, discriminant, data.
>>
>>d is dumb  ;-)
>
>It's not dumb. It's just the letter I use when a, b, and c are already used. :)
>
>jcc7

why use a, b, c, d... ? Arrays are SOOO much more flexible, powerful,
manageable, and in most cases, faster when compiled.

Eh.. whatever, It's not the point.. I won't name my varaible that way..

and why would you have a user data type that's all lowercase?

foreach(distance d; ...

Wouldnt that be

foreach(DISTANCE distance; ...

or 

foreach(Distance distance; ...

Well... I appricate the feedback anyhoo.

Have a good night gents!

Thanks,
Trevor Parscal
www.trevorparscal.com
trevorparscal@hotmail.com
June 01, 2005
Re: The Focus of D
In article <d7jkm3$ofc$1@digitaldaemon.com>, Trevor Parscal says...
>
>
>>>Walter's message from 17 Oct 2003:
>>>
>>>"What happened was that I'd prefer just 'd', but it wound up causing 
>>>problems
>>>because 'd' was commonly used as a local variable name. 'D' is rarely 
>>>used,
>
>Who names a variable d? That is the most non-descriptive variable name 
>ever, and anyone who uses it should be slapped with a fine, payable to 
>Walter's pay pal account.

Oh, come on now. I'd use "jeNeSaisQuoi", "savoirFaire", and "deJaVu" for
variable names instead, but they take a lot more effort to type.

..

>C. Do we all just rant cause we lack an outlet for this crap anywhere 
>else.. (I mean, honestly, I can't talk to my fiance or my friends about 
>this crap..)

Probably.

jcc7
1 2 3 4 5 6
Top | Discussion index | About this forum | D home