Could I get some pros & Cons for strictcase; jEdit/NetRexxDE.
I prefer strict-case because of readability. Bobh _______________________________________________ Ibm-netrexx mailing list [hidden email] |
Only CONS:
StrictCase is very pity -- you must be very careful ! :-( I would prefer an option -FirstCase, where the first Case of spelling does determine the *prefered Style*. Then for instance, a utility like ReyForm (TM) may format your whole set of Programs *in the same style* !! What do you say ?? Thomas Schneider. =========================================================== Am 17.11.2010 21:14, schrieb Robert Hamilton: Could I get some pros & Cons for strictcase; jEdit/NetRexxDE. _______________________________________________ Ibm-netrexx mailing list [hidden email]
Tom. (ths@db-123.com)
|
Bob,
normally I do not use it. I remember one case in which it was necessary to switch it on due to an oddity in the Java libraries. When I remember what that was, I'll mention it here. best regards, René. On Thu, Nov 18, 2010 at 12:16 AM, Thomas Schneider <[hidden email]> wrote:
_______________________________________________ Ibm-netrexx mailing list [hidden email] |
As a matter of principal, I capitalize the first letter of function and sub-program names and would never use date nor to nor any such as variable names . . . nor start variables with a special character ! In an early version of 'B' they were to be started with an underscore character but there was no underscore for punched cards at that time -- early 1960's. ( B became C when it was found that B had been used in the Western Electric register of names: B Wire Connector)
Enjoy the day; BobH On Thu, Nov 18, 2010 at 6:25 AM, René Jansen <[hidden email]> wrote: Bob, _______________________________________________ Ibm-netrexx mailing list [hidden email] |
Hello Robert,
Java has introduced another 'Convention' 1.) Function names (method names) are lowercase. 2.) Following components are Capitalized, i.e. the Components of a name are *not* delimited by a hyphen (-) as in COBOL, and *not* delimited by an Underline (as in PL/I, or possibly classic Rexx). Instead, in Java Beans, for instance: ReyMsg.getIc1 will be used.... I do have both a function to convert COBOL Name Conventions as well as PL/I (and old classic compiled Rexx) conventions to the new Java Conventions, of course. Kind regards, Thmas Schneider. ============================================================ Am 18.11.2010 16:05, schrieb Robert Hamilton: As a matter of principal, I capitalize the first letter of function and sub-program names and would never use date nor to nor any such as variable names . . . nor start variables with a special character ! In an early version of 'B' they were to be started with an underscore character but there was no underscore for punched cards at that time -- early 1960's. ( B became C when it was found that B had been used in the Western Electric register of names: B Wire Connector) _______________________________________________ Ibm-netrexx mailing list [hidden email]
Tom. (ths@db-123.com)
|
why not USE the java convention to eliminate conflicts: Capitalize the first character of NetRexx names.
BobH On Thu, Nov 18, 2010 at 1:47 PM, Thomas Schneider <[hidden email]> wrote:
_______________________________________________ Ibm-netrexx mailing list [hidden email] |
In reply to this post by Robert L Hamilton
Your naming convention will cause confusion to Java programmers or any programmers or students if you use Java classes in a NetRexx program since the standard Java naming conventions are to start class names with a capital letter and method (function) names with a lower case letter. (Not that I am doing a very good job of following the conventions! ;-) Here is a summary of the standard naming conventions: http://en.wikipedia.org/wiki/Naming_convention_%28programming%29#Java -- Kermit On 11/18/2010 7:05 AM, Robert Hamilton wrote: As a matter of principal, I capitalize the first letter of function and sub-program names and would never use date nor to nor any such as variable names . . . nor start variables with a special character ! In an early version of 'B' they were to be started with an underscore character but there was no underscore for punched cards at that time -- early 1960's. ( B became C when it was found that B had been used in the Western Electric register of names: B Wire Connector) _______________________________________________ Ibm-netrexx mailing list [hidden email] |
What I intended to say: this would eliminate any accidental conflicts from NetRexx names to Java names.
BOBH On Thu, Nov 18, 2010 at 2:46 PM, Kermit Kiser <[hidden email]> wrote:
_______________________________________________ Ibm-netrexx mailing list [hidden email] |
What I intended to say is that most programmers who look at your
code are going to think that a name starting with a capital letter
is a class name.
-- KK On 11/18/2010 12:53 PM, Robert Hamilton wrote: What I intended to say: this would eliminate any accidental conflicts from NetRexx names to Java names. _______________________________________________ Ibm-netrexx mailing list [hidden email] |
Going back to the original question, STRICTCASE or NOSTRICTCASE is totally indifferent as far as NetRexx is concerned.
When dealing with the java library using STRICTCASE may help in certain uncommon cases but at the end of the day, the difference lies merely in what kind of diagnostics you'll be getting from the compiler (mainly "ambiguous identifier" versus "no such method or class, etc."). What is important in these cases is that you actually *use* the proper casing in your calls regardless of the compiler option in effect.
I myself always use STRICTCASE and adhere to the java ClassName.classMethod(argName=OtherClassName) convention which never gets me into trouble. But then, I use the java class library extensively plus, that's what feels natural to me.
2010/11/18 Kermit Kiser <[hidden email]>
-- Saludos / Regards, David Requena _______________________________________________ Ibm-netrexx mailing list [hidden email] |
when compiling a *lot* of programs, in directories, and also SUB-directories, what do you think: a) Would an option -FirstCase help to determine, that the *first lexial occurance* shall determine the *wanted/needed* spelling. b) Would you think, that an option -recursive (for recursing all sub-directories) will be help-ful? All: What do you say ?? Thomas Schneider. ========================================================= Am 18.11.2010 23:07, schrieb David Requena: Going back to the original question, STRICTCASE or NOSTRICTCASE is totally indifferent as far as NetRexx is concerned. _______________________________________________ Ibm-netrexx mailing list [hidden email]
Tom. (ths@db-123.com)
|
a) Would an option -FirstCase help to
determine, that the *first lexial occurance* shall determine the *wanted/needed*
spelling.
That's effectively what you have now:
In general, NetRexx is a case-insensitive language. That is, the names of keywords, variables, and so on, will be recognized independently of the case used for each letter in a name; the name "Swildon" would match the name "swilDon".NetRexx, however, uses names that may be visible outside the NetRexx program, and these may well be referenced by case-sensitive languages. Therefore, any name that has an external use (such as the name of a property, method, constructor, or class) has a defined spelling, in which each letter of the name has the case used for that letter when the name was first defined or used. Similarly, the lookup of external names is both case-preserving and case-insensitive. If a class, method, or property is referenced by the name " Foo", for example, an exact-case match will first be tried at each point that a search is made. If this succeeds, the search for a matching name is complete. If it is does not succeed, a case-insensitive search in the same context is carried out, and if one item is found, then the search is complete. If more than one item matches then the reference is ambiguous, and an error is reported.Implementations are encouraged to offer an option that requires that all name matches are exact (case-sensitive), for programmers or house-styles that prefer that approach to name matching. Mike _______________________________________________ Ibm-netrexx mailing list [hidden email] |
Free forum by Nabble | Edit this page |