From: "Nicolay A. Vasiliev" <[EMAIL PROTECTED]>
> I MEANT STANDART TYPES. ARE YOU ABLE TO SEE THE DIFFERENCE? If you
> assign the value for string variable it automaticaly gets the number
> of methods belonging to String object. And as an example I wrote the
> s.replace statement.. The similar approach has Ruby. Of course, if you
> need more complicated functionality you make "import" or another
> including of some module.

And we were trying to explain to you that it doesn't really matter 
whether you have some builtin method of the builtin types or just a 
buch of builtin functions&operators. And that we actually prefer the 
second for the very basic types like numbers and strings.

I asked you in another mail whether you'd rather write
        x = y.sin().plus(z)
or
        x = sin(x) + z

What's the reply?

> I wrote about this only to show what can the real OO language (Python
> of course could be figured as procedural language too).

Do not sweat about "real whatever" langauges. That's not what gets 
the job done. So Perl doesn't treat the base types like objects. So 
what? That doesn't make its support for OO programming any less 
complete.

Yeah in strongly typed languages with oldstyle type system (read all 
mainstream strongly typed langauges including Java and C#) need some 
base "Object" type that all other types, including the base ones, 
inherit from. You don't need this in Perl, you can pass a number or a 
string or an object to the same function or method and the method may 
easily be programmed to accept them all and do the right thing. Even 
if some of them are not considered objects.

In my opinion forcing everything to be an object is wrong. Or at 
least inconvenient. (Especialy the way Java/C# does it.)
But that's just my personal preference.

Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to