Hi,

I tend to agree with Bulat.  If people think it isn't Ruby anymore, that's
why we will call it "R".  Because we have enjoyed Ruby very much, R is
designed more like a "superset" of Ruby, the addition being some hints on
type checking.  How strong the type checking is can be controlled by a
parameter, in which case type_check_level == 0 reduces "R" to Ruby.  Sure,
it will not be as fast and efficient as Ruby, but for experimentation I
think it is worth it.

My philosophy is not to reinvent the wheel.  Java is interpreted, yet it
has static type (in some sense).  Ruby has borrowed some Perl features
(such as all those "$" variables) and this makes it rather easy for a Perl
programmer to learn Ruby.  By the same token, "R" may make it easier for
C/C++/Java programmers to learn this new language.  Here I am just trying
to mix the "alloy wheel" with that "radial tire", and not to reinvent the
wheel.  (Of course, there is always the possibility that the wheel does
not fit into the car :) )

(Sigh), if only I understand lexing and parsing and have more time, I
probably would have started experimenting with "R".  At least I will have
this to start

    def (Numeric a)
    end

which is in Ruby equivalent to

    def (a)
        raise "type error" unless a.kind_of? Numeric
    end

Well, Ruby already have concepts of "shortcuts" such as attr_reader and
attr_accessor.  So at least initially "static type" can simply be
interpreted as a shortcut as in the above code.

Regards,

Bill
=============================================================================
Nikodemus Siivola <tsiivola / cc.hut.fi> wrote:

> On Fri, 27 Sep 2002, Bulat Ziganshin wrote:

>> my idea is opposite - ruby code with some hints can be effectively
>> compiled. so there is only one laguage

> But never as effectively as purely static code... And when you introduce
> typing, it ain't ruby no more.

>   -- Nikodemus