[java-dev] Re: Crash Report: call outlet() with an invalid outlet index
Peter Castine
pcastine at gmx.net
Thu Feb 14 03:33:14 MST 2008
- Previous message: [java-dev] Re: Crash Report: call outlet() with an invalid outlet index
- Next message: [java-dev] Re: Crash Report: call outlet() with an invalid outlet index
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Quote: topher lafata wrote on Wed, 13 February 2008 18:01 ---------------------------------------------------- > The thinking with this is that checking automatically if your outlet > index is in range everytime adds overhead to the outlet call. > If you wanted to subclass MaxObject with outletSafe it would be > pretty trivial. We don't want to force the checking on someone > who may not want it to happen every outlet call. ---------------------------------------------------- It's probably far too late to change the implementation... but it seems that in the Java mindset, it would be more idiomatic to have checking the default behavior (as is the case with arrays and everything else I can think of), and either a flag or a subclass to turn range&null checking off if the performance hit makes a difference. It's exceptional for an object to have a reason to speak to a null outlet, but seems it can happen. When programming C we're used to the fact that any mishap can crash Max and program carefully (for the most part). Java gives you this feeling of comfort that no matter how stupidly you code, Everything Will Be All Right... I'll read the moral of Adam's story to be that no programming language is really safe. Hang that in next to "Slow but steady wins the race" and "Look before you leap." -- P. -- ---- Peter Castine Litter Power: <http://www.bek.no/~pcastine/Litter/> iCE Tools: <http://www.dspaudio.com/software/ice/ice_overview.html>
- Previous message: [java-dev] Re: Crash Report: call outlet() with an invalid outlet index
- Next message: [java-dev] Re: Crash Report: call outlet() with an invalid outlet index
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
