Import proposals (Ideas)

jcc7 jcc7_member at pathlink.com
Wed Jul 12 12:19:54 PDT 2006


In article <1152731324.8336.9.camel at localhost>, Anders Runesson says...
>
>ons 2006-07-12 klockan 10:25 -0700 skrev BCS:
>> jcc7 wrote:
>> > 
>> > 
>> > I'm just not a big fan of using with for this since it seems like importing to
>> > me.
>> > 
>> > "with(module fooTooLong)" would be somewhat better, but I think "import" should
>> > be there. How about this?
>> > 
>> > # import select fooTooLong
>> > # {
>> > #    alias reallyTooLong tooShort;    /* alias */
>> > #    alias reallyTooLong2 tooShort2;  /* alias 2 */
>> > #    alias notReallyTooLongAtAll notReallyTooLongAtAll; /* No alias */
>
>Seems redundant to have to type "notReallyTooLongAtAll" twice though.
>Just declaring which symbols you are interested in should be enough,
>with the option of declaring aliases at the same time for convenience.
>
>Also, I don't see the point of adding a keyword like "select" in all of
>it. 

Oops. I've been looking at too much Visual Basic code. I was thinking that
"select" was already a keyword in D. And "switch" doesn't sound right at all.
Oh, well. I guess we don't need a keyword there.

jcc7



More information about the Digitalmars-d mailing list