[R-gui] Re: [R] Feedback about SciViews?

Zed Shaw zedshaw at zedshaw.com
Tue Apr 29 20:57:58 MEST 2003


Hi Byron,

With regard to your comments on exception handling, I say I have to 
agree, but I'm not quite sure where you got that I was critiquing R's 
exception handling.  It's no better or worse than others, although I 
agree that try/catch would be nice.  Actually, I'm using try() to get 
around my real complaint:  jump_now handling.

Read the "Handling Errors" section of:

http://developer.r-project.org/embedded.html

For details on what is wrong.  Now, they recommend that you actually 
create a function that overrides the jump_now found in the libR.so 
file.  The problem with that is when you are on other platforms (like, 
Mac OSX) the libR.so jump_now overrides the one you write.  If they 
created a global variable like "R_JumpNowFunc" which you could set to 
your own jump_now handler, then the problem would go away.

I went into fits for about a week trying just about everything I could 
to get my version of jump_now to work.  Eventually I just backed out of 
it and now wrap everything in a try({}) call to keep R from crashing.  
This is what I mean when I complain about how jumps are used to 
maintain the event loop.

Just a quick clarification, otherwise I pretty much agree with what you 
say.  The main things I'd like added to R are too long to mention, and 
I doubt anyone who could make the changes would care.

Zed A. Shaw
http://www.zedshaw.com/


On Tuesday, April 29, 2003, at 07:32 PM, Byron Ellis wrote:

>
> Well the pty thing I'll give you---irritating as hell---but as for R's 
> exception handling and its ease of repair, your statements somewhat 
> disingenuous. R's exception handling mechanism is simply How It is 
> Done in C. Go look at the Python source code sometime, what do you 
> find? That's right. setjmp()/longjmp() for exception handling. Just 
> like R. Just like Objective-C and AFAIK Perl as well.



More information about the R-SIG-GUI mailing list