Message from discussion
Namespace'd subs in IMCC?
Newsgroups: perl.perl6.internals
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.perl.org
Return-Path: <ryan....@osu.edu>
Mailing-List: contact perl6-internals-h...@perl.org; run by ezmlm
Delivered-To: mailing list perl6-intern...@perl.org
Delivered-To: perl6-intern...@perl.org
Message-ID: <3F5B74C2.10603@osu.edu>
Date: Sun, 07 Sep 2003 14:11:14 -0400
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.3.1) Gecko/20030425
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: l...@toetsch.at
CC: perl6-intern...@perl.org
Subject: Re: Namespace'd subs in IMCC?
References: <3F5A9089.7060906@osu.edu> <200309070910.h879ApT11328@thu8.leo.home>
In-Reply-To: <200309070910.h879ApT11328@thu8.leo.home>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Check-By: la.mx.develooper.com
X-Spam-Status: No, hits=1.7 required=7.0 tests=CARRIAGE_RETURNS,FROM_ENDS_IN_NUMS,IN_REP_TO,QUOTED_EMAIL_TEXT,RCVD_IN_OSIRUSOFT_COM,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_MOZILLA_UA,X_ACCEPT_LANG,X_OSIRU_OPEN_RELAY version=2.44
X-SMTPD: qpsmtpd/0.26, http://develooper.com/code/qpsmtpd/
Approved: n...@nntp.perl.org
From: ryan....@osu.edu (Joseph Ryan)
Lines: 55
Leopold Toetsch wrote:
>Joseph Ryan <ryan....@osu.edu> wrote:
>
>
>> From what I understand from the IMCC documentation, the ".namespace"
>>macro prepends the namespace name plus "::" to all names within it.
>>
>>
>
>It's for variables only, currently.
>
>
>
>>I figured that this would be handy in distinguishing which class a
>>method belongs to without causing name clashes. For instance:
>>
>>
>
>
>
>> .namespace foo
>> .sub bar
>>
>>
>
>
>
>>would create a method bar in the class foo, for a full name of
>>"foo::bar".
>>
>>
>
>I'm not outerly sure, if imcc should even have such a functionality. Or
>at least, if there is one, it should be configurable. The name mangling
>is HLL dependent and there may be no general scheme to do it right for
>all kind of symbols.
>
>
>
>>However, this doesn't seem to work. Is this a bug, or should I be
>>doing something else for this type of problem?
>>
>>
>
>It's not layed out what it should really do. I'm towards removing this
>directive and let the HLL compiler deal with it.
>
>
Well, in that case, would it be possible to allow ":" as a valid
character for use in symbol names?
-Joe