porting java methods to ruby

J

Jari Williamsson

Robert said:
Consider this, your brain has not yet used to missing parens, and it
is actually looking for them, that already is some unnecessary work,
right ;).

I would say my brain is scanning for some kind of separator, and the
space is too similar to the Rubish underscores, which (sometimes) makes
it harder than necessary IMO.
With good syntax highlighting, though, this is a non-issue.


Best regards,

Jari Williamsson
 
P

Peña, Botp

From: Jari Williamsson [mailto:[email protected]]=20
# Robert Dober wrote:
# > Consider this, your brain has not yet used to missing parens, and it
# > is actually looking for them, that already is some unnecessary work,
# > right ;).
# I would say my brain is scanning for some kind of separator, and the=20
# space is too similar to the Rubish underscores, which=20
# (sometimes) makes it harder than necessary IMO.
# With good syntax highlighting, though, this is a non-issue.

indeed.=20

too much underscore is bad[*] (yes we camel on ruby class names)
too much parens is bad (try lisp)
too much spaces is bad (try... python? :)

balance is good. choice is good. ruby is good.

kind regards -botp

[*] bad here in the sense that your senses seem to clash w your thinking =
:)
 
P

Peña, Botp

From: Robert Klemme [mailto:[email protected]]=20

# Seriously: it just occurs to me that the topic of using or not using=20
# parens seems to come up much less frequently than the topic=20
# of whether to use curly braces or "do end" with blocks. Maybe that's=20
# an indication that people faster adjust to the missing parens, dunno.

yes, until they hit a dead-end on the curlies vs do-end thingy, or =
ruby's commonly surprising msg "warning: parenthesize argument(s) for =
future version"

kind regards :)
-botp
 
R

Robert Dober

IMO, Ryan's example was farthest from writing Java in Ruby of all the
examples given in this thread.
I have no idea, I have not looked at his code, and for that very
reason I have not said that he has written Java code in Ruby.
I only wanted to say that it is a bad idea to write Java code in Ruby....
That is not nonsense I feel, even if they are both GPPLs.
I even feel that it is an important property of programming languages
that they make you think in a different way, but maybe that is OT.

Cheers
Robert
 
R

Robert Dober

From: Robert Klemme [mailto:[email protected]]

# Seriously: it just occurs to me that the topic of using or not using
# parens seems to come up much less frequently than the topic
# of whether to use curly braces or "do end" with blocks. Maybe that's
# an indication that people faster adjust to the missing parens, dunno.

yes, until they hit a dead-end on the curlies vs do-end thingy, or ruby's=
commonly surprising msg "warning: parenthesize argument(s) for future vers=
ion"
I feel much more compelled to use parens in method calls (unless it is
a single method call in one line) then in method definitions.
I see them completely useless in definitions and rather important in
calls. Given the famous warning above, Ruby seems rather to agree with
me ;).
R.

kind regards :)
-botp



--=20
what do I think about Ruby?
http://ruby-smalltalk.blogspot.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top