The Inner that is named is not the true Inner.
"I'm not back." - Bill Harding, Twister
"I'm not back." - Bill Harding, Twister
The Inner that is named is not the true Inner.
"I'm not back." - Bill Harding, Twister
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Check out my kickstarter CLICK HERE
My book, my movies, my videos, my podcasts, my events ... the big collection of paul wheaton stuff!
Perhaps, but it isn't Java-ish which is my main complaint. No matter how superior you feel your style is, it isn't the standard that virtually every Java programmer uses. I read a book a year or so ago where the author thought his style was better than Sun's. It was a fine style but it made his codeOriginally posted by Paul Wheaton:
I would argue that the JR standard is far from C-ish. If anything, it's smalltalk-ish and pascal-ish.
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
"I'm not back." - Bill Harding, Twister
I agree 100%!Originally posted by Jim Yingst:
And I'd prefer that Sun style be the one they learn first, as beginners.
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
The names of variables declared class constants and of ANSI constants should be all uppercase with words separated by underscores ("_"). (ANSI constants should be avoided, for ease of debugging.)
"I'm not back." - Bill Harding, Twister
There are lots of examples of things like that in the API but they are mostly left over stuff that no one wanted to remove because they didn't want to break anyone's code. The programmers at Sun take the interface contract very seriously!Originally posted by Jim Yingst:
(And let's not overlook the Color class, with both Color.WHITE and Color.white, which mean the same thing. :roll: )
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Carl explained that:Originally posted by Jim Yingst:
What's an ANSI constant?
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Originally posted by Thomas Paul:
Perhaps, but it isn't Java-ish which is my main complaint.
Check out my kickstarter CLICK HERE
My book, my movies, my videos, my podcasts, my events ... the big collection of paul wheaton stuff!
"I'm not back." - Bill Harding, Twister
"I'm not back." - Bill Harding, Twister
Originally posted by Jim Yingst:
If the Sun style guide had referred to compile-time contstants rather than mere constants, we'd have more to owrk with here.
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Originally posted by Thomas Paul:
The problem is that for most programmers it isn't always easy to figure out whether a constant is a compile time constant. So it's best to just stick to the rule that ALL constants follow the same standard.
Check out my kickstarter CLICK HERE
My book, my movies, my videos, my podcasts, my events ... the big collection of paul wheaton stuff!
Check out my kickstarter CLICK HERE
My book, my movies, my videos, my podcasts, my events ... the big collection of paul wheaton stuff!
I have never worked in a shop that used Pascal style braces. Exceot for my brief tenure working in C#.Originally posted by Paul Wheaton:
Based on my limited experience, I would estimate that pascal style brace placement is used more often than K&R brace placement. I would even go so far as to suggest that pascal style brace placement is used 65% of the time.
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Originally posted by Paul Wheaton:
I think the point I was attempting to make, and which my attempt must have been a poor one because you didn't address it, was that the developer did not need to know whether it was a constant or not. The developer simply uses the value. Whether it is a constant or not is abstracted (one of the cornerstones of object oriented programming).
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Originally posted by Paul Wheaton:
The way you present this Tom, you make it sound like a fact. Do you have proof about what "most programmers" find "easy to figure out"?
Do you have proof about what is "best"?
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Originally posted by Thomas Paul:
I seem to have hit a sore point with you. I don't mean to get you upset. We are talking about something that is a matter of opinion so asking for "proof" is getting a little wierd.
Check out my kickstarter CLICK HERE
My book, my movies, my videos, my podcasts, my events ... the big collection of paul wheaton stuff!
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Check out my kickstarter CLICK HERE
My book, my movies, my videos, my podcasts, my events ... the big collection of paul wheaton stuff!
Originally posted by Thomas Paul:
I disagree with you on the constants. I think it is important that we know which variables are constants because constants are assigned at compile time. If I compile my class and then someone changes the class with the compile time constant in it, I am not going to see that change of the compile time constant. Changing a public variable that is marked as a compile time constant is a violation of the interface contract because it has implications that may make my code fail months from now at recompile time.
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Originally posted by Thomas Paul:
So it's best to just stick to the rule that ALL constants follow the same standard.
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
If someone changes the class with the compile time constant in it, I would think that they would recompile that class.
"I'm not back." - Bill Harding, Twister
Originally posted by Marilyn de Queiroz:
If someone changes the class with the compile time constant in it, I would think that they would recompile that class.
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
"I'm not back." - Bill Harding, Twister
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Originally posted by Jim Yingst:
Tom's point is that with compile-time constants, that's not enough. You've also got to recompile any other classes which used that constant.
Originally posted by Ernest Friedman-Hill:
You may be forgetting that a Java compiler will take static final "compile-time constant" variables and fold their literal values into the code of other classes that they compile.
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Originally posted by jason adam:
To truly get students to learn, perhaps we should introduce different style guides for different assignments, but that would probably put more work on the nitpickers.
Matthew Phillips
There are 29 Knuts in one Sickle, and 17 Sickles make up a Galleon. 42 tiny ads in a knut:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|