[NCLUG] Looking at programming languages...
Michael Milligan
milli at acmeps.com
Wed Jan 16 17:00:39 MST 2008
Sean Reifschneider wrote:
> On Wed, Jan 16, 2008 at 01:21:57PM -0700, Chad Perrin wrote:
>
>>The syntax is beautiful. You just need to get into its mindset -- just
>
>
> The biggest problem I had when learning Ruby was the lack of parens in the
> examples of function calls. In Ruby you can leave out the parens if it's
> obvious what is what. However, when I read these I always found that I
> would go "WTF?" and have to go through and figure out what it really meant.
>
> Maybe that's just me, but I found that the lack of parens got quite in the
> way of trying to learn it by example. This isn't really a language
> problem, except that the language allows it. This is more a problem I had
> with the Ruby examples.
I agree with you here... I'm a fan of Ruby now, but I've started always
putting in the parens for maintainability's sake. It makes it clear you
are calling a method with arguments. It gets especially hairy when you
are chaining method calls, e.g..
if self.respond_to?(word.to_sym)
r = self.method(word).call(arg.length == 0 || arg[0].chr == '/' ?
name+arg : arg)
else
# freak out with a parse error
end
My biggest problem with Python was the rigid indent style forced upon
me, but I got over it pretty quick. That's actually a very good thing
for maintainability.
Regards,
Mike
--
Michael Milligan -> milli at acmeps.com
More information about the NCLUG
mailing list