IMNSHO, if the scope of the use of the interface is limited to one application or one shop then the conventions of the shop or product should be observed; however, if this interface is for Rexx or ooRexx users only and will be made available to the community at large, then use the Rexx convention. My own rule in cases like this is to use the users' conventions, not the called code's conventions. It is generally easier to adjust indexes and subscripts in the target interface code. I am doing a lot of COBOL-to-C stuff and I have the C code adjust the values.
C programmers can take care of themselves (and their code). -----Original Message----- From: David Ashley [mailto:[email protected]] Sent: Saturday, January 09, 2010 10:43 To: ooRexxDevel Subject: [Oorexx-devel] Opinions Wanted All - I am working on an ooRexx interface to something that is normally programmed in C. Of course, C uses zero-based indexes for thing like memory, array positions, etc. My code could be architected to either carry this forward to the ooRexx interface when it calls the C functions or it could translate the zero-based numbers to the more user friendly (and Rexx default) one-based numbering system. I have mixed emotions on this. On the one hand I much prefer the one-based system that Rexx uses. On the other hand, C programmers who have programmed to this interface in the past will be more comfortable with the zero-based numbering system. But I also want to bring in those C and Perl programmers into the Rexx arena and that means having them get used to a one-based system. Also, all the documentation and examples for the system I am interfacing to ooRexx is for C and Perl programmers. Thus all those docs and examples are zero-based meaning that translating the examples to Rexx involves some updating of the source program number constants. So I really am of two minds about this. In the past I have always leaned to making things easiest for the Rexx programmer but this case has made me rethink that idea. I am now questioning my assumptions and I want some other opinions before I proceed too far. Thank, David Ashley ------------------------------------------------------------------------ ------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Oorexx-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/oorexx-devel ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Oorexx-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/oorexx-devel
