Re: Will Perl 6 be usable as a procedure language?



On 2008-05-02, Uri Guttman <uri@xxxxxxxxxxxxxxx> wrote:
"s" == szr <szrRE@xxxxxxxxxxxxxxx> writes:

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


--

.



Relevant Pages

  • Re: Will Perl 6 be usable as a procedure language?
    ... They'll be hellish backwards compatibility issues ... Are you thinking that Perl 6 is intended to be backwards compatible ... Backwards compatibility would imply that old scripts would still run ... libraries will still sort of work. ...
    (comp.lang.perl.misc)
  • Re: Chromatics - Why is funding Perl So Hard
    ... "Perhaps backwards compatibility is cannibalizing usage from current" ... Python had a totally different approach and it seems that it was a good ... I also think that Perl 5 would have been a little more successfully if Perl ... because after announcing that Perl 5 is not a language for the future so the ...
    (perl.beginners)
  • Re: Will Perl 6 be usable as a procedure language?
    ... >> Are you thinking that Perl 6 is intended to be backwards compatible ... s> backwards compatibility ... better than backwards compatibility as it allows incremental migration ... subs will have a proper arg passing and handling mechanism but the ...
    (comp.lang.perl.misc)
  • Re: Will Perl 6 be usable as a procedure language?
    ... They'll be hellish backwards compatibility issues ... Are you thinking that Perl 6 is intended to be backwards compatible with ... Backwards compatibility would imply that old scripts would still run (sort ...
    (comp.lang.perl.misc)
  • Re: Python or PHP?
    ... > every language here and there more ways to do something. ... The best the programmer can do, as you imply, is to ... parse out into proper perl expressions. ... > lists, dictionaries, etc. etc. ...
    (comp.lang.python)