|
Posted by Jim Cochrane on May 2, 2008, 3:40 am
Please log in for more thread options
>
> s> Peter Scott wrote:
> s> [...]
> >> Are you thinking that Perl 6 is intended to be backwards compatible
> >> with Perl 5? It isn't, and it won't be.
>
> s> While Perl 6 has it's merits, this alone doesn't really inspire me to an
> s> all out switch when it finally comes, and given how much code would be
> s> broken, I wouldn't be surprised if it ends up having a poor adoption
> s> rate for the first year or two because of this, as Perl 5.10 adds some
> s> of the Perl 6-destined features (like given/when) and still promotes
> s> backwards compatibility (and in a very intelligent and un-intrusive way)
> s> and future releases are likely to only be better.
>
> s> So given this, why would one, who have plenty of Perl code, feel
> s> compelled to choose Perl 6 over Perl 5 and spend what could huge amounts
> s> of time rewriting a lot of code?
>
> you should move this thread to the perl6 language list. but in any case
> p6 will have a p5 compiler in it (or some way to do that). larry's
> intent is that almost all p5 code could be compiled to run on the p6
> backend and so allow p5 and p6 code to run in the same process. this is
> better than backwards compatibility as it allows incremental migration
> of p5 code to p6 (and this may include tools to do that
> translation). the albatross of true backwards compatibility is what has
> kept x86 and redmond so 'backwards' for decades. supporting easy and
> clean migration to a new target is much smarter.
>
> as for prodedural vs OO, p6 will allow both but OO will be much stronger
> and such than p5's OO. look around for damian's slide show of p5 code vs
> the equivilent p6 code. much of the basic stuff won't change or will
> change little. there will still be scalars, arrays, hashes and
> subs. subs will have a proper arg passing and handling mechanism but the
> @_ style can be used in some way if desired. but the overall lang is so
> much better in p6 and sections suchs as rules/grammars vs p5 regexes are
> like comparing an orange grove to a crabapple. that change alone is
> worth using p6. read about that on the perl.org pages and look for the
> synopsis or other docs on p6 grammars.
>
> uri
>
It sounds to me like one could think of perl 6 as a different language
(which happens to have a very similar name) than perl 5, but with features
(described above) for compatibility with this other language (perl 5).
So perhaps it's helpful to think of p6 as a different language altogether,
designed in such a way as to be easily learnable by perl 5 programmers,
but whose design is better (especially in making it easier to use OO
features) than perl 5. In other words, switching to p6 would be a
language change (not a language/compiler/version upgrade) - similar to
switching from C++ to Java, although the difference would not be as large.
That's how I'm currently thinking of it, anyway.
Why would people want to make that change? Well, perhaps for similar
reasons that many people/organizations switched from C++ to Java?
(E.g., better productivity, maintainability, etc.)
--
|