Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > coding style

Reply
Thread Tools

coding style

 
 
baklarz
Guest
Posts: n/a
 
      10-06-2005
Hey,
Does ruby programmers preffer java style "def myMethod" or "def my_method" ?
Does exist any standrds ?
--
Tomasz Drobiszewski
 
Reply With Quote
 
 
 
 
wannes
Guest
Posts: n/a
 
      10-06-2005
On 06/10/05, baklarz <> wrote:
> Hey,
> Does ruby programmers preffer java style "def myMethod" or "def my_metho=

d" ?
> Does exist any standrds ?


When coding ruby, the uncerscore way of writing methods is prefered;
for classes CamelCase is preferred.
A good startingpoint for this is:
<http://pub.cozmixng.org/~the-rwiki/r...3DRubyCodingC=
onvention>

grtz,
wannes


 
Reply With Quote
 
 
 
 
Farrel Lifson
Guest
Posts: n/a
 
      10-06-2005
I do believe 'def my_method' is preferred.



On 10/6/05, baklarz <> wrote:
> Hey,
> Does ruby programmers preffer java style "def myMethod" or "def my_metho=

d" ?
> Does exist any standrds ?
> --
> Tomasz Drobiszewski
>
>



 
Reply With Quote
 
zimba
Guest
Posts: n/a
 
      10-06-2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

baklarz a =E9crit :

> Hey, Does ruby programmers preffer java style "def myMethod" or
> "def my_method" ? Does exist any standrds ?



Hi baklarz,

Welcome to ruby

Ruby preffers underscore_methods.

For more informations, RubyGarden[1] is a good ressource. Here[2] is
an article that explains the different styles.


Cheers,
zimba

[1] http://www.rubygarden.org
[2] http://www.rubygarden.org/ruby?RubyStyleGuide
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDROnSBPd9MK2EeAsRAmL5AJ0Xnwu+dYkhbDl9Cp3RZh Amnj3uRACffz26
7q0TBGGbEZwUcnZJ3EoFeO8=3D
=3D7ijL
-----END PGP SIGNATURE-----



 
Reply With Quote
 
Gavin Kistner
Guest
Posts: n/a
 
      10-06-2005
On Oct 6, 2005, at 3:10 AM, zimba wrote:
> For more informations, RubyGarden[1] is a good ressource. Here[2] is
> an article that explains the different styles.
> [1] http://www.rubygarden.org
> [2] http://www.rubygarden.org/ruby?RubyStyleGuide


FYI, I just cleaned that page up a bunch. I welcome corrections if I
have mis-stated the community consensus on any topics.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
general coding issues - coding style... calmar Python 11 02-21-2006 10:36 AM
Coding style for CPLD vs FPGA Analog Guy VHDL 3 03-14-2005 08:26 AM
Need help with Style conversion from Style object to Style key/value collection. Ken Varn ASP .Net Building Controls 0 04-26-2004 07:06 PM
Coding style to prioritize certain inputs Willem Oosthuizen VHDL 5 09-04-2003 05:17 PM
style for coding latches Paul Baxter VHDL 7 08-15-2003 06:19 PM



Advertisments