From: Robert Klemme Date: 2005-10-18T16:36:58+09:00 Subject: Re: A couple of questions/statements from a Ruby neohacker Christophe Grandsire wrote: > Selon Dave Bettin : > >> >> 1) Consistency in naming/coding conventions. The standard library >> module and class list is not the prettiest thing to look at. Is >> there a standard for naming/coding conventions in Ruby? I believe it >> is very important for Ruby to have consistency with its conventions. >> > > Classes/modules are in CamelCase, methods are with_underscores. For > the rest, I find personally that the standard library looks quite > nice. To each his own. Well, that's probably because you got used to it. But there are more conventions and some of them are violated even by the std lib: - boolean query method identifiers end with a question mark "?" ([].empty?) - destructive method identifiers end with an exclamation mark >> a=[1,2,3] => [1, 2, 3] >> b=a.reverse => [3, 2, 1] >> a => [1, 2, 3] >> a.reverse! => [3, 2, 1] >> a => [3, 2, 1] >> a.delete! 2 NoMethodError: undefined method `delete!' for [3, 2, 1]:Array from (irb):14 Ooops! >> a.delete 2 => 2 >> a => [3, 1] Ah! See also recent threads here. >> 3) Finally, the unixisms in the library. Face it we live in a >> heterogeneous world and these libraries must face this reality. I >> understand the ancestry of Ruby is unix but will we see better >> system abstractions for the libraries in the future? Maybe the >> answer to number will this question too. > > I don't know what you're talking about. Before I moved to Linux I > used Ruby exclusively on Windows and have never seen anything unixist > that prevented me to do what I want (except iconv, but that has been > solved since then, and will be built-in in Ruby2). So I don't believe > it's a problem. I'm also interested in hearing which Unixisms are present and what things they make harder / prevent. Kind regards robert