Class names

8 views
Skip to first unread message

dmitry.z...@gmail.com

unread,
Feb 17, 2009, 12:57:16 PM2/17/09
to Phantom OS
One of the latest problems I run into is class name space.

Class name space is the only public 'static' space in Phantom. It
menas that (currently) no two classes with the same name can exist.
The only (half)possible situation is two versions of one class.

Class name structure:

.package.package.class;version

Example: .internal.string;22

last (";version") part is usually omitted when referring to class, and
the last version is usually assumed.

Example: .internal.string

The leading point is used to denote absolute class name. It is
possible to refer to the class with a short name.

The problem (possibly) arises when you try to import classes from more
than one language. How can we guarantee that, for example, Java
and .net libraries class names won't clash?

Alexey Aristov

unread,
Feb 17, 2009, 1:42:56 PM2/17/09
to phant...@googlegroups.com
Hello!

.package.package.class;version

Example: .internal.string;22

last (";version") part is usually omitted when referring to class, and
the last version is usually assumed.
In some cases one may choose a specific version or version range.  Import statement (on input language or module level) should be able to define such requirements.

 

Example: .internal.string

The leading point is used to denote absolute class name. It is
possible to refer to the class with a short name.

The problem (possibly) arises when you try to import classes from more
than one language. How can we guarantee that, for example, Java
and .net libraries class names won't clash?
another prefix? .java.lang.String? 


--
Aleksey Aristov
Research & Development Director
___________________

Weigle Wilczek GmbH
Martinstrasse 42-44
D-73728 Esslingen
Germany

T (+49) 711 / 459 998 - 0
F (+49) 711 / 459 998 - 29
www.weiglewilczek.com

___________________

The information in this email is confidential. If you are not the
intended recipient, you must not copy, disclose or use its contents. If
you have received it in error, please inform us immediately by
return-email and delete the document.


dmitry.z...@gmail.com

unread,
Feb 17, 2009, 3:41:37 PM2/17/09
to Phantom OS


On Feb 17, 9:42 pm, Alexey Aristov <aris...@weiglewilczek.com> wrote:

> > The problem (possibly) arises when you try to import classes from more
> > than one language. How can we guarantee that, for example, Java
> > and .net libraries class names won't clash?
>
> another prefix? .java.lang.String?

I suspect, just java has its class libs all under tow specific
prefixes (java/javax). Can we assume other languages are sticking to
the same convention? Or we will run into the situation where two
languages are using the same full name for their implementations of
something?
Reply all
Reply to author
Forward
0 new messages