• Post Reply Bookmark Topic Watch Topic
  • New Topic

changes to the coop  RSS feed

 
paul wheaton
Trailboss
Posts: 22537
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I made some minor tweaks to the coop in sections 2.2 and 4.1.
Comments?
 
Guy Reynolds
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The addition is great information!
But, for me, there seems to be a benefit in sticking with the
Statement
Reasoning:
"indent" example
//used, "indent" cuz text wants to right justify!
format. So the newly added info would look like this:
There are two exceptions to this rule, method names and array dereferences.
Reasoning: Tradition calls for all method names to be immediately followed by a left paren and all array dereferences to be immediately followed by a left square bracket.
"indent" foo();
"indent" args[0];
And, for me, the issue about whether foo() or foo( ) has not been resolved. The statements just above the newly added info (Coop 2.2) seem to suggest that foo( ) is correct, but in your example you use foo(). So I would either change the example, if foo( ) is correct, or make another explicit statement about method calls without arguments. (On the call line it's argument, right? And parameter in the method signature..??? I have a hard time keeping those straight)
Honestly, thanks for the site Paul. It really is a great tool for learning and developing Java skills.


[This message has been edited by Guy Reynolds (edited October 28, 2000).]
[This message has been edited by Guy Reynolds (edited October 28, 2000).]
[This message has been edited by Guy Reynolds (edited October 28, 2000).]
[This message has been edited by Guy Reynolds (edited October 28, 2000).]
 
paul wheaton
Trailboss
Posts: 22537
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you make some damn good suggestions. I would implement them now if I had ftp access (wicked strict firewall here at work)
 
Guy Reynolds
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a little off the subject, but WHAT ARE YOU DOING AT WORK ON A SATURDAY!!!
According to the timecard site I just visited, today is "a day of rest". (It yelled at me, complaining that "regular hours could not be entered on a day of rest"... Wait, if I'm entering hours at a timecard site, then I must be at work too, DOH!)
I'm outta here!
GO HOME PAUL!
 
paul wheaton
Trailboss
Posts: 22537
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I'm taking all of next week off, so I need to get ahead on my hours.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm... I don't see anything new in section 2.2 or 4.1 that wasn't there on Friday afternoon when I was last reading it. Marilyn mentioned making some modifications to the file as well - Paul, is it possible Marilyn cancelled your changes?
Looking at the file as it reads now, it seems to me there are a number of other cases where spaces before and after identifiers seem inappropriate:
<code><pre> anObject.methodCall();
Object [] myArray = { objectA, objectB, objectC };
Object foo = bar;</pre></code>
Should there be spaces between "anObject" and "."? Between "objectA" and ","? Between "bar" and ";"? My own preference would be to say no to all; either way though, these cases should probably be clarified.
 
Marilyn de Queiroz
Sheriff
Posts: 9080
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<pre>Originally posted by Jim Yingst:
Should there be spaces between "anObject" and "."? Between "objectA" and ","? Between "bar" and ";"?</pre>
Currently, no, yes, and yes.


[This message has been edited by Marilyn deQueiroz (edited October 29, 2000).]
 
paul wheaton
Trailboss
Posts: 22537
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My changes are gone! What happened?
 
Marilyn de Queiroz
Sheriff
Posts: 9080
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Marilyn de Queiroz
Sheriff
Posts: 9080
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Guy Reynolds:
And, for me, the issue about whether foo() or foo( ) has not been resolved. The statements just above the newly added info (Coop 2.2) seem to suggest that foo( ) is correct, but in your example you use foo(). So I would either change the example, if foo( ) is correct, or make another explicit statement about method calls without arguments. (On the call line it's argument, right? And parameter in the method signature..??? I have a hard time keeping those straight)

If foo() doesn't have an identifier inside the paren's, you don't need to worry about extra spaces. The rule is "spaces around identifiers".

Marilyn
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!