Dear friend!

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.

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

Jose Nyimi wrote:

> >
>>-----Message d'origine-----
>>De : Nicolay A. Vasiliev [mailto:[EMAIL PROTECTED]
>>Envoyé : vendredi 1 octobre 2004 22:39
>>À : Perl Beginners List
>>Objet : Re: Becoming Disenheartened - Everyone talks about Python and
>> >>
>says
> >
>>Perl is old news.
>>
>>I didn't mean CGI, only standart types.
>>
>> >>
>
>s.replace(...) is a consequence of "everything is object" thinking.
>
>Look at the following:
>
>import re;
>m = re.match(r"(?P<int>\d+)\.(\d*)", '3.14');
>//After performing this match
>//m.group(1) is '3', as is m.group('int')
>//and m.group(2) is '14'.
>
>There is a similar ugly thing in Java.
>All of this because you want everything to be an object.
>
>Can you tell us how will you perform the above
>matching without import re; :).
>
>In Perl you don't absolutely need a kind of use RE; to be able
>performing regular expression macthing.
>
>So, don't force my $s = "I am Perl Guru"; to be an object and contain a
>replace() method.
>
>$s is a string will be treated as is in Perl.
>
>José.
>
>
>
> >



-- --------------------- Nicolay A. Vasiliev

http://www.spamliquidator.com - Real spam fighter
http://www.soft411.com - Excellent soft archive


-- 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