L
Leszek Dubiel
I am looking for scripting language to replace Perl, which I am using
now. I don't like Perl, because its awful syntax. I thought about
Python when I've heard of Ruby. I study Ruby now, it seems to be
excellend (everything is object) and I have one question.
Why do you have two classes of integers? I think there are only two
solutions for numbers in a good language:
1. Numbers can be as big as machine word. To use bigger ones module
should be included.
2. Nubers can be as big as programmer wants, but DON'T suply two
classes for the same THING. There should be one class to rule them all
-- when number is small it is just one word, when it gets bigger it is
a list. Programmer wants to use numbers and don't want to care about
implementation. If this is so in Ruby, then using two classes is not
good and that classes should be hidden to user (programmer). If Ruby
will have implemented BigNum, Fixnum, then to be complete it sould
implement BigFload (huge precission), Complex, Naturals....
I would like to be convinced that Ruby solution is good -- now I don't
see any reason for having two classes and I feel that some time in the
future this would be a problem. Good languages are good at the
beginning, but after few years they are patched, and patched -- they
are getting worse and worse. (For example "use strict" in perl -- it
seems to me as a patch that prevents programmer from doing something
wrong...)
now. I don't like Perl, because its awful syntax. I thought about
Python when I've heard of Ruby. I study Ruby now, it seems to be
excellend (everything is object) and I have one question.
Why do you have two classes of integers? I think there are only two
solutions for numbers in a good language:
1. Numbers can be as big as machine word. To use bigger ones module
should be included.
2. Nubers can be as big as programmer wants, but DON'T suply two
classes for the same THING. There should be one class to rule them all
-- when number is small it is just one word, when it gets bigger it is
a list. Programmer wants to use numbers and don't want to care about
implementation. If this is so in Ruby, then using two classes is not
good and that classes should be hidden to user (programmer). If Ruby
will have implemented BigNum, Fixnum, then to be complete it sould
implement BigFload (huge precission), Complex, Naturals....
I would like to be convinced that Ruby solution is good -- now I don't
see any reason for having two classes and I feel that some time in the
future this would be a problem. Good languages are good at the
beginning, but after few years they are patched, and patched -- they
are getting worse and worse. (For example "use strict" in perl -- it
seems to me as a patch that prevents programmer from doing something
wrong...)