This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: extended "colon notation" [feedback needed]


Does this cause any problems to people using symbols with colons
in them for compatibility with Common Lisp?
For example, CL:IF macro.

-----Original Message-----
From: kawa-owner@sources.redhat.com
[mailto:kawa-owner@sources.redhat.com] On Behalf Of Per Bothner
Sent: Thursday, August 04, 2005 6:22 AM
To: kawa@sources.redhat.com
Subject: Re: extended "colon notation" [feedback needed]

In addition to the check-in features, I'm considering the following:

(1) To check that a value is an instance of a type:

(TYPE:instance? VALUE)
   ;; same as (instance? VALUE TYPE)
Alternative syntaxes considered:
(TYPE:instanceof? VALUE) ;; similar to Java instanceof
(TYPE:? VALUE)           ;; short and sweet

(2) To cast a value to a type:

(TYPE:<- VALUE)
   ;; same as (as VALUE TYPE)
The <- is meant to be like the arrows in say number->string, but 
backwards, since the target TYPE is mentioned first.  It's a bit ugly, 
so alternative syntax would be welcome.

(3) Accessing the java.lang.Class for a class type:

(TYPE:.class)
   ;; similar to (Class:forName "TYPE"), or Java's TYPE.class
Alternative syntax considered:
(TYPE:class)   ;; i.e. without the dot.

Comments?  Speak up quickly!
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]