[#1816] Ruby 1.5.3 under Tru64 (Alpha)? — Clemens Hintze <clemens.hintze@...>

Hi all,

17 messages 2000/03/14

[#1989] English Ruby/Gtk Tutorial? — schneik@...

18 messages 2000/03/17

[#2241] setter() for local variables — ts <decoux@...>

18 messages 2000/03/29

[ruby-talk:01893] Re: Minor irritation, can't figure out how to patch it though!

From: mengx@...
Date: 2000-03-16 16:16:35 UTC
List: ruby-talk #1893
I do not have problem with either of the spellings. But I always wonder 
if Pythonic syntax 

def __init__

or 

def init   (I assume this syntax has been considered)

can be used as alternative to the current one
since Ruby's tradition is to provide similar syntax to other
languages in order to attract more users.

Thanks

-Ted


> How about the following (just for an idea):
> 
>   # the module for your script
>   module BritishInitialise      # there should be better name.
>     def initialize(*args)
>       initialise(*args) if defined? initialise
>     end
>   end
> 
> Usage:
> 
>   class Foo
>     include BritishInitialise
>     def initialise(a)
>       p a
>     end
>   end
> 
>   foo = Foo.new(5)
> 
> 							matz.
> 

In This Thread

Prev Next