swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swarm-Support] Followup: found work-aroundfor missing~/swarmarchive


From: Darren Schreiber
Subject: Re: [Swarm-Support] Followup: found work-aroundfor missing~/swarmarchiver.scm too
Date: Mon, 21 Aug 2006 18:00:02 -0700


I'm late to join this discussion, but I recall that my party model had been built relying on the ability of sending messages to nil.  When the change was made a few years ago, my model stopped working and I was completely unclear about how to fix the problem.

So, at least for me, the undocumented nature of the change was a problem and it was not clear how to solve the problem with the code.

Darren

*******************************************************************************
Darren Schreiber, J.D.
Assistant Professor of Political Science, U.C. San Diego
Assistant Adjunct Professor of Law, University of San Diego
Political Science, SSB 367
9500 Gilman Drive
La Jolla, CA  92093-0521
dmschreiber (at) ucsd (dot) edu
*******************************************************************************


On Aug 21, 2006, at 5:39 PM, Bill Northcott wrote:

On 21/08/2006, at 5:00 PM, Marcus G. Daniels wrote:
As a result Objective-C programmers obsessively test for nil if there is any possibility that an object may not be available.  That seems to me a good habit that Swarm Objective-C programmers should also cultivate.
Not really sure what kind of object is?  Well, lucky you, you get to write a bunch of code to adapt to all possible cases including the one of no case at all and you get to conflate that signal inside of the one that carries the real one as well.   But wait, is it the error signal even a real one?  Why was there a nil object in the first place?    Perhaps nil is supposed be a placeholder for some dead object in a fixed size thing?   Or maybe it is just a bug.   My experience is that modelers are thinking about other things and that it is usually a bug.   Adding in a nil_method function or a conditional is far safer than having messages simply ignored silently.

Sorry, but I have no idea what that is supposed to mean.

I understand that MacOS X runtime compatibility and/or similarity is a goal for you, but there are far bigger obstacles in your path than this little thing.  You've got to implement or ditch phases, for example.

I am well aware of the difficulties, but I cannot see that as a reason to put up more.

Swarm also does Java, and so here the underlying Objective C code is just a means to an end.   Java users will expect null pointer exceptions.

Is this not the whole point?  There exists a Java interface for people who want/need the software to keep them on a tight leash and sweep up behind.  The downside is reduced functionality.  That is a basic trade-off in any computer language.
That's not the point.  The Java interface was and is for people that want to make Swarm simulations using that popular language using it's popular tools and libraries.    Having a Java virtual machine, and vast Java libraries, opens up many more possibilities than Objective C alone.

There are large and growing libraries of Objective-C code, do you not think these are worth being able to access?

The `right' behavior for exception handling depends on your perspective.

This is not a question of philosophically right.  It is matter of whether the thing works as documented.  We say the language is Objective-C but with this significant change to the behaviour of nil it is no longer Objective-C but Marcus' Marvellous Language.

Bill

_______________________________________________
Support mailing list


reply via email to

[Prev in Thread] Current Thread [Next in Thread]