From: Bill Bumgarner <bbum@co...> - 2001-04-12 22:14:48
Seems to be held in moderation-- wanted to make sure it was posted [will
reply later] because I forgot the bloody admin passwrod.
Begin forwarded message:
> From: Andrew Zeldis <aez@...>
> Date: Thu Apr 12, 2001 06:04:23 PM US/Eastern
> To: Bill Bumgarner <bbum@...>
> Cc: pyobjc-dev@...
> Subject: Re: [Pyobjc-dev] Why syntax?
> On Thursday, April 12, 2001, at 05:11 PM, Bill Bumgarner wrote:
>> One key difference between Java and ObjC is that ObjC doesn't require
>> us to know the method signatures-- the names-- prior to actually
>> invoking the method. We can
> I've been under the impression that all available selectors were
> somehow compiled or registered with the ObjC runtime before anything
> else happened. Is it possible to define new selectors during runtime,
> post-load? If so, I can see how the dynamicicity (?) of ObjC would
> muck this up, but as I understand it all possible selectors will be
> available for discovery if the object is available.
>> A secondary problem is that key/value arguments are not ordered.
>> I.e. Ignoring for a moment that "win.init(contentRect=frame,
>> styleMask=15, backing=2, defer=0)" drops the "With", the order with
>> which the key/value arguments are passed to the init() function cannot
>> be known. As such, it makes reconstructing the method really hard;
>> nearly impossible.
> Oh yes, I assumed that using "with" in the method name was a standard,
> and so could be dropped - like getBlah and setBlah in jython... Is
> that true?
> Also, I didn't realize ObjC methods were ordered... Does this mean
> then that it's wrong to think of them as key/value or named parameters,
> but as a single method name where variables are "interpolated"?
> Is there a possibility of more than one selector containing the same
> "keys" in a different order?
>> This was actually discussed at great length in '96 or '97 when Lele,
>> myself and others were actively working on the ObjC module. We
>> determined then that the amount of work did not justify the small
> Well, probably because I'm syntax mad, but this doesn't seem like an
> especially small reward. Especially if you're trying to evangelize
> it. Right now PyObjC looks very little like Python, *or* ObjC; if the
> thing looked more like python we'd basically have a native gui
> framework finished and *polished*.
> It doesn't look like the ObjC runtime provides anything more than
> NSSelectorFromString, is that right? So basically it'd have to run
> through all the permutations of the parameter names, testing each one,
> until it matched. Maybe a little slow, and annoying, but it doesn't
> seem that hard...?
> Anyway, now that it's building with distutils (thanks!) I think I'll
> attempt it - just please don't say I told you so!
> Are the NSFunctions (like NSSelectorFromString) made available to
> Python somewhere?
Get latest updates about Open Source Projects, Conferences and News.