[Openmcl-devel] Defining objc classes causes the class name to be declared static

Gary Byers gb at clozure.com
Sun Oct 13 23:12:21 PDT 2013


It's intentional and it's been this way for many years.

It's similar enough to what ObjC does that you can translate

[someMessage classname]

into

(#/someMessage classname) ; instead of (#/someMessage (find-class 'classname))

If "classname" would also be a good variable/argument name (e.g., "view"),
then declaring the symbol to be static effectively makes use of the same
name as an argument or local variable awkward.

Whatever convenience the first point offers is obviously offset by the second.
If I was sure that no code anywhere was taking advantage of that behavior I
wouldn't be at all hesitant about changing it. but I'm not sure of that and
I am hesitant.

On Sun, 13 Oct 2013, Ron Garret wrote:

> Is this a feature or a bug? My vote goes to bug, but it's a damned peculiar bug:
>
> Welcome to Clozure Common Lisp Version 1.10-dev-r15900M-trunk  (DarwinX8664)!
> ? (defclass foo2 (ns:ns-object) () (:metaclass ns:+ns-object))
> #<OBJC:OBJC-CLASS FOO2 (#x20D42FA0)>
> ? foo2
> #<OBJC:OBJC-CLASS FOO2 (#x20D42FA0)>
>
> rg
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>



More information about the Openmcl-devel mailing list