From: Simon Strandgaard Date: 2004-03-23T23:39:34+09:00 Subject: Re: Need some advice on PickAxe II On Tue, 23 Mar 2004 14:10:35 +0000, gabriele renzi wrote: > il Tue, 23 Mar 2004 14:53:59 +0100, Simon Strandgaard > ha scritto:: > >>On Tue, 23 Mar 2004 22:41:56 +0900, Nathaniel Talbott wrote: >>[snip] >>> Oh, and mostly unrelated: I hope this edition uses under_score notation >>> instead of camelCase. I know I was led astray by the Pickaxe in my >>> early days of Ruby programming :-/ >>> >> >>I _avoid_ libraries which uses camelCase, luckily many of them >>provide underscore aliases. Thus it would be really nice if Ruby2 enforced >>underscores for varnames + methodnames. I know this may be a religious >>subject... >> >>Maybe I should submit an RCR.. opinions/flames/benefits/drawbacks ? > > well, we should ho the way a language for the OZ platform do (can't > remember what)... just make any name, Name, N_A_M_E equivalent and > kill this debates for ever :) > Jikes! too much flexibility for me, it would take long time to adapt my brain to recognize that 'N_a_M_e____' is the same as 'name' > Seriously, it would be nice to have some kind of Style Guidelines > somewhere (like using CamelCase for classes and under_scores for > methods, provide block form for accessing resource that need to be > freed and so on) Ruby enforces to a mild degree certain naming conventions. CamelCase for classes. Why not go the whole way and also enforce under_scores? I find 'camelCase' with an initial lowercase letter, mixed with a few uppercase, ad-hoc. It was difficult to learn this notation, because letters were mixed. Its something which scares people when they look first time on a computer program. I wish the best for newcomers to Ruby. -- Simon Strandgaard