Import proposals (Ideas)

BCS BCS at pathlink.com
Wed Jul 12 10:25:48 PDT 2006


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 */
> # }
> 
> or if you just want to import one it'd be something like this:
> 
> import select std.string.replace alias replace;
> 
> or maybe even this if it's not being renamed...
> 
> import select std.string.replace;
> 
> I think there's a really good syntax in here somewhere. I'm just not sure what
> it is yet...
> 
> jcc7

Yeah, that "with" doesn't look to good. OTOH that "select" looks kind of 
funny also. I think just switching to the "alias <name> [<name>];" 
syntax would be best. IIRC all {} block use ";" as a separator, so it 
would be more consistent than a comma separated list.



More information about the Digitalmars-d mailing list