Re: Ruby and Perl 6
by broquaint (Abbot) on Jul 31, 2003 at 19:01 UTC
|
I read in a Perl 6 mailing list that "Yes, in Perl 6, everything is an object". Is this still the truth?
As it stands, yes, everything will be an object. I doubt very much this will change.
Does anyone know in what ways Perl 6 OO design will be different from Ruby OO design?
Know one really knows since we've yet to see Apocalypse 12 ;) I'm not too hot on the ruby OO system, or perl6 OO system for that matter, but here's a short list of differences
- perl6 will have multiple inheritance
(correct?) and ruby has mixins
- there won't be a distinction between class and method variables in perl6
- instance attributes will just be normal variables (via has?), so attr_* won't be needed to access/modify them
- perl6 won't specifically distinguish between class/instance methods
They might not necessarily be completely accurate, but it illustrates that perl6 and ruby don't deviate a great deal in the overall OO system.
HTH
_________ broquaint
| [reply] |
Re: Ruby and Perl 6
by Elian (Parson) on Jul 31, 2003 at 20:18 UTC
|
I read in a Perl 6 mailing list ...
Important safety tip: Unless Larry or Damian says it on the language list, don't assume it's true. (Assuming a message on the perl 6 language list is near-lunatic raving may be right more often than assuming it's true...) And even they change their minds.
| [reply] |
Re: Ruby and Perl 6
by Elian (Parson) on Jul 31, 2003 at 20:13 UTC
|
No, perl 6 won't be completely object oriented. It'll fake it well when needed, however. | [reply] |
|
|
| [reply] |
Re: Ruby and Perl 6
by Grygonos (Chaplain) on Jul 31, 2003 at 18:42 UTC
|
I really like ruby alot as well. It's got a great concise design that really lends itself to some slick coding. However if you make perl too much like ruby .. what good is it to have them both around.
| [reply] |
Re: Ruby and Perl 6
by wufnik (Friar) on Aug 01, 2003 at 17:40 UTC
|
yes, in perl 6, everything is an object
the dictum 'everything must be an object' must represent the
most banal/specious view of what object orientation is:
is time an object? is a number? certainly i view this as a matter for debate.
one of the things i admire most about perl is the degree to which it maps to natural language: in natural language, we have n-way predicates, n-way relationships, a rich variety of constructs. our treatment of numbers in natural language is context sensitive, as is time, and relationships have their own algebra, rather more complex than that traditionally dealt with by OO.
i personally hope that whether perl 6 becomes more ruby-esque or no becomes less the focus of debate, and hope the coming transformation will preserves the traditional closeness of perl's relationship with natural language (while becoming more OO), allowing me to code in the way i think, rather than forcing me to conform to someone else's hierarchy.
wufnik
-- in the world of the mules there are no rules --
| [reply] |
Re: Ruby and Perl 6
by jonadab (Parson) on Aug 02, 2003 at 05:49 UTC
|
Yes and no. Perl6 will be getting some of what Inform
has: the object system will be strong enough to allow
the programmer to code pretty much anything in a strictly
object-oriented fashion if desired; however, doing so
will be entirely optional (and, in fact, some other
paradigms, e.g., functional programming, are getting
improved support in Perl6 as well). This is an
extension of the same general philosophy present already
in Perl5, except that the facilities for those who elect
to code in an OO fashion will be greatly improved, to
the extent that some of us who currently mostly ignore
the OO stuff in Perl5 will choose to use it more in
Perl6. I'm really looking forward to it myself.
$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}}
split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/
| [reply] [d/l] |
Re: Ruby and Perl 6
by Beatnik (Parson) on Jul 31, 2003 at 18:55 UTC
|
I think I overheard someone mention that the 'everything is an object' patch for perl 5 is about 4 lines... Ofcourse I could be wrong :)
Greetz
Beatnik
... I'm belgian but I don't play one on TV. | [reply] |