I think we are long overdue for a revision of the header files used in R. This is going to be especially important for a clean build of the CORBA and R/Java stuff which I have been looking over Duncan's shoulder at. It will also let us integrate some of the features Duncan has had to find creative ways around and also to let us integrate things like the PROBLEM buffer problem. I would propose that we cut down to a much smaller set of includes and to put some thought about what goes in each. Something along the lines below. R.h / S.h This just serves to include Platform.h, RInternals.h and RUtilities.h below. Platform.h Platform specific definitions. RInternals.h R Data Structures & Access Macros Memory management Functions which manipulate R data structures RUtilities.h Functions which operate at the C level without special knowlege of R structures (But maybe not Math). RMath.h We probably need a separate set of declarations but maybe not. RGraphics.h This is big and is logically separate from other C code. Some things which are not in here should be -- e.g. hsv2rgb. (I think the rest of the code could also stand a bit of clean up too). Ross -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>>>>> Ross Ihaka writes:> I think we are long overdue for a revision of the header files used in > R. This is going to be especially important for a clean build of the > CORBA and R/Java stuff which I have been looking over Duncan's > shoulder at. It will also let us integrate some of the features > Duncan has had to find creative ways around and also to let us > integrate things like the PROBLEM buffer problem.> I would propose that we cut down to a much smaller set of includes and > to put some thought about what goes in each. Something along the > lines below.> R.h / S.h > This just serves to include Platform.h, RInternals.h and > RUtilities.h below.> Platform.h > Platform specific definitions.Maybe `RPlatform.h' then?> RInternals.h > R Data Structures & Access Macros > Memory management > Functions which manipulate R data structures> RUtilities.h > Functions which operate at the C level > without special knowlege of R structures > (But maybe not Math).Such as the things currently in appl?> RMath.h > We probably need a separate set of declarations > but maybe not.> RGraphics.h > This is big and is logically separate from > other C code. Some things which are not in > here should be -- e.g. hsv2rgb.Yes, good point.> (I think the rest of the code could also stand a bit of clean up too).-k -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Tue, 15 Jun 1999, Ross Ihaka wrote:> (I think the rest of the code could also stand a bit of clean up too).Can I re-raise the issue of comments in functions? There are in practice four types of comment: (1) Those that appear in .R files but don't make it through to the code; (2) Those that make it through but don't get printed; (3) Those that get printed in the `wrong' place; and (4) Those that get printed in the right place.>From my reading of the source code I think comments are always going to betricky to locate while they are treated as attributes. I appreciate that this is a feature of the Blue Book description, but I wonder if a simpler arrangement might not be possible. How about if comments were legitimate expressions that evaluated to "invisible(.Last.value)", or, for those that follow on on the line, "; invisible(.Last.value)". Of course this would slow the function down if implemented as is, but perhaps not if implemented in the C code. This may be a naive suggestion, and I am certainly not an expert in comments, but I do find it frustrating to see all most of my helpful asides coming out in the wrong place. It seems to be Sod's Law that comments are most useful after if() statements, when of course they are promoted up the function. Cheers, Jonathan. Jonathan Rougier Science Laboratories Department of Mathematical Sciences South Road University of Durham Durham DH1 3LE "[B]egin upon the precept ... that the things we see are to be weighed in the scale with what we know" (Meredith, 1879, The Egoist) -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._