Forums

Namespace aliasing

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Namespace aliasing

Postby Charles » Fri Mar 28, 2014 1:16 pm

Thanks to a patch from hops, we now have namespace aliasing. Please test it out.

Examples:
http://cobra-language.com/trac/cobra/br ... lias.cobra
http://cobra-language.com/trac/cobra/br ... lass.cobra

Ticket:
http://cobra-language.com/trac/cobra/ticket/201

Installation instructions:
HowToInstallFromSource
Charles
 
Posts: 2510
Location: Los Angeles, CA

Re: Namespace aliasing

Postby hopscc » Sat Mar 29, 2014 2:21 am

wiki entry updated

useDirective
hopscc
 
Posts: 631
Location: New Plymouth, Taranaki, New Zealand

Re: Namespace aliasing

Postby nerdzero » Mon Mar 31, 2014 9:40 am

Hey, this is cool. Is this really just for namespaces though? It looks like you can alias types as well unless I'm not reading the examples correctly.
nerdzero
 
Posts: 286
Location: Chicago, IL

Re: Namespace aliasing

Postby hopscc » Mon Mar 31, 2014 11:37 pm

It feeds into the C# alias handling so if that doesnt handle what you are seeing I've probably screwed up the examples
( though I thought I'd run all them)....
hopscc
 
Posts: 631
Location: New Plymouth, Taranaki, New Zealand

Re: Namespace aliasing

Postby nerdzero » Tue Apr 01, 2014 8:17 am

Okay, well it looks like you can alias types in C# and VB with using/imports statements like you can with namespaces. I did not know that. So, it should work here too then. Looks a little strange to me to alias types that way but I'll take it :)
nerdzero
 
Posts: 286
Location: Chicago, IL


Return to Discussion

Who is online

Users browsing this forum: No registered users and 3 guests

cron