[MacRuby-devel] book idea - "making it look like Ruby"
Rich Morin
rdm at cfcl.com
Sat Feb 12 17:45:17 PST 2011
Robert Payne <robertpayne at me.com> wrote:
> Is it extremely bad practice to use Camel Case in Ruby?
> At least for MacRuby? I have been mostly because I'm
> an Objective-C developer and it's what I'm used to as
> well as all of the Apple API are Camel Case and I didn't
> want to make the code spaghetti between the two.
Matt Aimonetti wrote:
> It is not, we are just talking about conventions here.
> Personally I like to use both casing approaches so I
> can see the difference between obj-c APIs and Ruby's.
Indeed, it's "just" a matter of tastes and conventions.
Some folks like CamelCase. I despise so much that, when
forced to use upper case (eg, to name a class), I tend
to use a Combination_Method, for readability.
IMHO, two of the nicest things about Ruby are:
* Matz's taste as a language designer
* TIMTOWTDI, inherited from Perl
I'm extremely OCD about how my code looks. I polish it
until it's as clean and readable as I can make it. By
giving me a nice starting point and not getting in my
way, Ruby allows me to write code I can be proud of.
If a Ruby variant (eg, MacRuby) forces my code to look
like a combination of Ruby with Java, ObjC, or another
high-ceremony language, that will diminish my joy (and
perhaps my efficiency) in using it.
At 4:41 PM -0800 2/12/11, Matt Aimonetti wrote:
> Ok so I will play the mean team member and tell you
> that we are seriously not considering supporting
> something like that as part of the base implementation.
> Now that doesn't mean that you guys can't create a gem
> to support that.
The next step, as I posted earlier, is to transliterate
an example, then look over the results. So, there is
only one situation where a change to MacRuby needs to be
considered at all:
MacRuby.hack if code.nicer? and code.slow?
When and if that happens, we can talk about sanitary ways
to hack variant behavior into MacRuby's code base, etc.
-r
--
http://www.cfcl.com/rdm Rich Morin
http://www.cfcl.com/rdm/resume rdm at cfcl.com
http://www.cfcl.com/rdm/weblog +1 650-873-7841
Software system design, development, and documentation
More information about the MacRuby-devel
mailing list