RE: [GD-General] Objective Caml (was Ruby opinions)
Brought to you by:
vexxed72
From: Jesse J. <jes...@mi...> - 2001-12-27 23:53:18
|
At 12:23 PM -0800 12/27/01, Brian Hook wrote: >Or the belief that languages shouldn't have >preprocessors because the C preprocessor was so gross; inevitably you >lose major functionality like "#ifdef 0/#endif" and the language >designers defend it to the end. Not necessarily. For example, Ruby allows you to stick executable code outside method definitions so you can do stuff like this: if want_foo_method() # add foo() to our class if it's OK def foo(arg1, arg2) # the foo method # code goes here end end I'm no Ruby guru yet, but it wouldn't surprise me if you could even do things like use a loop instead of an if statement and add a bunch of similar foo1, foo2, etc methods. -- Jesse |