News for hackers. Stuff that matters.
Re:Perl 6 Optimism by joosters on Tuesday January 23, 2018 @04:48AM (#16212218)
I don’t understand why Perl 5 and 6 are still tied together as if they are the same language. There’s no compatibility between the two. You can’t write a library that works in both versions, so you lose CPAN and the thousands of packages that make Perl so powerful. I don’t think there’s even any reliable way to translate Perl 5 source code.

This is a vastly larger change than python 2->3, and people are still using python 2.x. In short, there’s no sensible upgrade path, Perl 5 & 6 are very much their own language.

If Perl 6 wanted backwards compatibility, they needed to have thought about it a long time ago. Trying to hack in some Perl 5 style functions into it now seems futile...

Re:Perl 6 Optimism by simias on Tuesday January 23, 2018 @05:45AM (#16212481)
Pretty much. I used to use Perl 5 a lot but I never considered using Perl 6 and eventually moved on from the Perl ecosystem altogether. The huge advantage of Perl ~10 years ago was the massive amount of CPAN packages but in the meantime python & friends mostly caught up in my experience.

Meanwhile the shiny new revolutionary Perl 6 took forever to release and when it finally did nobody cared anymore. Quoting Wikipedia:

>The design process for Perl 6 began in 2000. [...] on December 25, 2015, the first stable version of the specification was announced.

I can respect taking the time to do things right but when your development history resembles that of Duke Nukem Forever something is off. That in my opinion hurt Perl more than anything else, even more so than the lack of compatibility between Perl 5 and Perl 6. If Perl 6 had released in early-to-mid 2000 I think there would've been enough interest out there to bridge the gap. It would've been messy but it could've worked.

Instead Perl 5 felt a bit like a legacy language "while we wait for Perl 6 to be finished" and Perl 6 was nowhere to be found. And Perl went from the de-facto scripting language for un*x to people asking "Is Rakudo Perl 6 used in production?".

Re:Perl 6 Optimism by skywhopper on Tuesday January 23, 2018 @07:48AM (#16213136)
Yeah... sometime around 2007 or so they finally admitted as much and started updating Perl 5 more regularly. But it's been a ridiculous journey. No project that starts out to rewrite a long-established and entrenched piece of software from the ground up ever ends up being a smooth transition. It's best to admit as soon as it's clear what's happening that you are doing something entirely new, and let the old project live out its own lifecycle.

What I've heard about Perl 6 does sound intriguing, and probably a solid language platform does take a good decade-plus to get on solid footing. But re-using the name of a once-well-loved and established language is a bad move for both the old and the new versions.

Re:Perl 6 Optimism by jandrese on Tuesday January 23, 2018 @11:35AM (#16214844)
The progress on Perl 5 has been remarkable too. Complex data structures no longer require you to wave a dead chicken and spelunk through StackExchange for hours. Unicode just works most of the time. Useful new features appear in the language, even though you would rightfully expect it to be in maintenance mode.
Re:Perl 6 Optimism by loggedinmyphone on Tuesday January 23, 2018 @11:45AM (#16214920)
> Complex data structures no longer require you to wave a dead chicken

Do you have a reference on changes to data structure syntax in 5.x? Probably my biggest frustration was trying to use anything beyond a scalar list - it always ended up a mess of hashrefs.

Re:Perl 6 Optimism by jandrese on Tuesday January 23, 2018 @12:44PM (#16215488)
Mostly it is deref operators being smarter now so you don't have to wrap everything in curly braces to get it to dereference properly.
Re:Perl 6 Optimism by raiph on Tuesday January 23, 2018 @12:14PM (#16215190)
> It's best to admit as soon as it's clear what's happening that you are doing something entirely new

Larry said something similar on day one.

> and let the old project live out its own lifecycle.

Larry did exactly that. It's still living out its own lifecycle and will for another N decades.

> re-using the name of a once-well-loved and established language is a bad move for both the old and the new versions.

I agree that this has likely turned out to be the case for Perl 6.

Re:Perl 6 Optimism by jandrese on Tuesday January 23, 2018 @11:31AM (#16214820)
Perl 6 seems to have one of the worst cases of the second system effect in modern history. It didn't help that Larry Wall got sick halfway through the development either.

As a Perl 5 developer, I look at it and go "If I have to learn a new language I might as well make it a popular one like Python 3 or Rust."

Re:Perl 6 Optimism by cutler on Tuesday January 23, 2018 @08:38PM (#16219622)
Python - ok, but Rust? How many Rust jobs do you see posted on major job sites?
Re:Perl 6 Optimism by saghm on Tuesday January 23, 2018 @08:55PM (#16219710)
I always find this logic a little troublesome; there are certainly many more Python jobs than Rust, but there are also many more Python programmers than Rust programmers. Wouldn't it make sense to optimize for the best ratio of available jobs to qualified applicants rather than just the largest number of available jobs? (I'm not saying that the ratio is better for Rust, just that the metric itself being used seems flawed).

Of course, there are also reasons to learn a programming language beyond job listings; GP might work on things that don't require a specific language, be looking for a language for dude projects, or just want to learn a language for fun.

Re:Perl 6 Optimism by jandrese on Wednesday January 24, 2018 @11:01AM (#16223672)
Python will get you a job today, but Rust may well be more valuable in the future. Or it may be a flash in the pan that never catches on in a big way. The future is hard to predict.
Re:Perl 6 Optimism by collyw on Tuesday January 23, 2018 @06:38AM (#16212747)
The failure to admit it was going slowly was another killer. It will be released at Christmas, we just aren't telling you which one. After a few years of hoping, I gave up and am in the world of Python and Django. Its a shame as Perl feels like a more powerful / expressive language than Python.
Re:Perl 6 Optimism by scardine on Tuesday January 23, 2018 @10:29AM (#16214291)
I'm one that moved to Python and don't want to look back. It is not that Python is easier read (I would say it is less noisy) but it is almost impossible to write your own "DSL" like you can do with Perl or Ruby.

YMMV but for me this is what makes it easy to maintain: you just need to learn Python not the personal programming style of the previous developer.

Re:Perl 6 Optimism by cutler on Tuesday January 23, 2018 @08:41PM (#16219652)
If you have such a strong preference for Python isn't it fair to say that any version of Perl - 5 or 6 - wouldn't be right for you as Perl falls on the expressive end of the language spectrum like Ruby and Clojure? You could have left Perl for Python before Perl 6 was even invented.
Re:Perl 6 Optimism by scardine on Wednesday January 24, 2018 @01:26PM (#16224991)
Of course, the Perl 5/6 soap opera was not the reason for jumping the ship.

10 years ago RIA platforms were the rage (Silverlight, Flex). By this time I was working in operations but willing to switch career to software development. Finally the opportunity presented and I picked OpenLazlo and PHP/MySQL. Two weeks later it was clear that I would not be able to meet the deadline using this platform. I googled for something like "productive web frameworks" and the top entries were about Rails, followed by Django. I could not make Rails work on my local development environment but the the Django tutorial worked like a charm.

So the truth is that I started using Python more seriously because I was not smart enough to make through the Rails tutorial. But no complaints - Python/Django is paying my rent since then!

Re:Perl 6 Optimism by achileas on Tuesday January 23, 2018 @03:42PM (#16217475)
Generally, yes, but at least in organizations you can enforce some style. The problem definitely arises (and often) when you can't write and enforce that standard. Python and Perl definitely have diametrically opposed philosophies on that front.
Re:Perl 6 Optimism by vgy7ujm on Tuesday January 23, 2018 @06:45AM (#16212777)
This.

Being "forced to use Python" sucks as a Perl developer.

Re:Perl 6 Optimism by hedora on Tuesday January 23, 2018 @10:18AM (#16214197)
The worst parts are the conversations of the form: Would you use something like perl for this? Why not? Python has 100% of the “write only” problems you mention, except that there are less syntactic clues to help the reader.

sigh

(And for the record, I’ve dealt with 100K+ sloc perl and python projects, and the perl one was more maintainable than the python projects, even after multiple python rewrites. It doesn’t have to go that way, but it certainly can!)

Re:Perl 6 Optimism by BeetleB on Tuesday January 23, 2018 @10:06AM (#16214102)
On the flip side, being forced to use Perl always sucks.

I mean it only as a half joke, unfortunately.

Re:Perl 6 Optimism by vgy7ujm on Tuesday January 23, 2018 @10:37AM (#16214348)
I would love to be forced to use Perl :)

As a side note, "forced" often means "we have a lot of beginners here and they want to do Python".

Re:Perl 6 Optimism by askvictor on Tuesday January 23, 2018 @03:16PM (#16217222)
Find a job maintaining some legacy code (there's plenty of it there). At which point you'll quickly realise that maintaining a complex perl program (particularly that someone else wrote) is painful. And the only remaining production perl programs are complex or they would have been rewritten.
Re:Perl 6 Optimism by vgy7ujm on Wednesday January 24, 2018 @04:01AM (#16221350)
I would not mind actually.

Better than rewriting failing Python or Node projects once a year.

Re:Perl 6 Optimism by collyw on Tuesday January 23, 2018 @11:52AM (#16214998)
Better than Java or VB by a long way. You can do most stuff just not as cryptically.
Re:Perl 6 Optimism by emmelaich on Tuesday January 23, 2018 @10:13PM (#16220026)
The only thing I miss about Perl was the immediacy of the regexes. There's a LOT I won't miss.

If you want that regex behaviour in a more modern language than Perl5 then Ruby is there.

Re:Perl 6 Optimism by joosters on Tuesday January 23, 2018 @06:28AM (#16212703)
I agree, it definitely hurt mainline Perl development when Perl 6 was this promised great new thing. At least Perl 5 never got abandoned, and there is development and bugfixing still going on today.

Perl 5 has a feeling of being 'complete' as a language. I guess this makes it unsexy and it'll never be the cutting edge where all the cool devs want to work, but it's rock solid stable and reliable.

Now, if only Perl 5 could get a JIT compiler...

Re:Perl 6 Optimism by lizmat on Tuesday January 23, 2018 @09:00AM (#16213563)
> Now, if only Perl 5 could get a JIT compiler...

Perl 5 running as a slang on MoarVM or JVM would give it a JIT compiler

Re:Perl 6 Optimism by cutler on Tuesday January 23, 2018 @08:49PM (#16219686)
If only language completeness was all that mattered. Module ecosystem health and community matter a lot more in the rise and fall of languages and CPAN now has a lot of unmaintained modules due to Perl's dwindling community. Languages themselves don't really decline once they've reached maturity.
Re:Perl 6 Optimism by toyg on Tuesday January 23, 2018 @07:25AM (#16213016)
> I guess this makes it unsexy

Nah, what makes it unsexy is the Perl syntax. The world has moved on. The readability of modern languages like Python is on another level.

Re:Perl 6 Optimism by vgy7ujm on Tuesday January 23, 2018 @07:33AM (#16213053)
I disagree. To me Perl is more readable than Python. What is so modern about Python? It was released in 1991.
Re:Perl 6 Optimism by octothorp3 on Tuesday January 23, 2018 @09:01AM (#16213573)
>>To me Perl is more readable than Python.

There's a phrase I never thought I'd see.

Re:Perl 6 Optimism by toyg on Tuesday January 23, 2018 @08:27AM (#16213370)
Compared to Perl, the overall under-use of special characters and the forced indentation make it objectively more readable; there is a reason it's often compared to pseudocode.

Age of release is a meaningless metric, btw. For starters, what Python was in 1991 is very different from what it was in the early 2000s, when it reached critical mass. Its modernity is measurable by the influence it had on most languages designed after its success, like Go and Swift.

Re:Perl 6 Optimism by simias on Tuesday January 23, 2018 @10:01AM (#16214049)
To me python and perl and two extremes. Perl is almost comical with its use of special characters (which they've embraced even more in Perl 6 with the optional use of unicode symbols in built-in operators) but python went too far the other way IMO. "It looks like pseudocode" sounds nice in theory but people don't typically write huge projects in pseudocode. I don't really like the significant indentation but my main problem is with the awkward scoping rules. I also find that it makes it harder to refactor code (if I copy/paste a snippet at a different level of indentation I can't blindly trust the editor to re-indent it properly).

That being said I agree that these days the tendency across all languages is to go towards fewer special characters, not more. In this context Perl 6's syntax feels a bit anachronistic.

Maybe you'll be able to win a few new user by telling them that in Perl 6 they can use × for *, Ⅻ for 12 and [unicode atom symbol]++ (ironically HN automatically removes the actual symbol when I submit) for atomic incrementation but I expect that many more will recoil in horror. I won't even talk about »=» and the ascii equivalent >>[=]>>.

Re:Perl 6 Optimism by sedachv on Tuesday January 23, 2018 @03:32PM (#16217371)
> That being said I agree that these days the tendency across all languages is to go towards fewer special characters, not more. In this context Perl 6's syntax feels a bit anachronistic.

This is just a comeback of a recurring dumb trend based on the fallacy that describing the operations of a program using English words is always superior to using appropriate specialized notation. The core of the fallacy is assuming that because something looks like a familiar English word, people who do not understand programming will understand the corresponding semantics of the operation in the programming language, because they know English. Which is complete nonsense - people who do not understand programming will reason by analogy, and through trial and error end up at a partially wrong and misguided understanding of that operation. English words only start you off with unnecessary baggage in the learning process.

It is even worse for people who already know programming. A C for loop is not a JavaScript for loop is not a Python for loop... The details of their semantics are very different, and you will introduce bugs if you just assume "I know how for loops work!"

There is nothing new about this trend either; it was the central premise behind COBOL, and a big motivation for BASIC. What BASIC was in the 1980s, Python is today.

What is ironic about this trend resurfacing today is that it has never been easier to use special characters - Unicode is everywhere, and even making custom keyboards has turned from a major manufacturing endeavor to an accessible hobby: https://www.youtube.com/watch?v=uk3A41U0iO4

Re:Perl 6 Optimism by vgy7ujm on Tuesday January 23, 2018 @08:51AM (#16213507)
Special characters, clear visual markers of scope etc. that Python lacks is part of the appeal of Perl to me.

I feel like a dyslectic when I read Python (projects of significant size) due to it being much less visually helpful and that the idea of simplicity falls apart when the problems are not trivial and when multiple devs have touched the code over multiple years.

YMMV of course but that is why your POV is not objective and I disagree.

Re:Perl 6 Optimism by toyg on Tuesday January 23, 2018 @09:33AM (#16213783)
The visual marker of scope is there and it's massive: indentation.

You can write bad code in every syntax, but when a language carries jokes about being "write-only" and the other has a reputation for being anal about indentation (the single most helpful scope-marker in any syntax), I don't think you can argue about objectivity when discussing readability.

This said, I'd like to see scientific comparisons, which are lacking. Some studies suggest terse languages using more special characters are more readable to experienced programmers than ones with simpler syntax, which seems to match your experience. That might well be true; but when applied to the real world, this still means than only a minority will ever prefer that style over a simpler one. As the number of coders naturally rises, this will only become more and more true over time.

Re:Perl 6 Optimism by newen on Tuesday January 23, 2018 @10:22AM (#16214231)
Bro, literally every language does indentation. Python just does indentation badly by making it syntactically significant.

Also. If you're going to come back to me with the argument that it forces people to use indentation, I've got some news for you. Literally everyone uses indentation. And if you somehow come across code written by the rare soul that doesn't use indentation, all I've to do is select the entire code and click "re-indent". Which, btw, in python is a chore to fix badly indented code with tabs and spaces mixed in together. And it's even more work to properly copy-paste python code, even in good editors.

Re:Perl 6 Optimism by mixmastamyk on Tuesday January 23, 2018 @11:38AM (#16214872)
> everyone uses indentation.

Yes, if you don’t you’re incompetent. If you do, the markers are then redundant.

Mixed indentation hasn’t been allowed in years.

Any good editor will show mixed indentation, guides, and indent properly with the tab key, get one.

Sounds like your knowledge of Python is about a decade behind. Not to mention those were nonissues from my experience even back in the day.

Re:Perl 6 Optimism by newen on Tuesday January 23, 2018 @04:59PM (#16218169)
These issues are only there because python has significant whitespace. These issues should not have been there in the first place.

Ideally, I shouldn't need to use an editor geared specifically for python code to copy-paste some python code and run it. I have had no issues with the majority of other languages when copy-pasting some code and reindenting. Only in python have I had issues with it. Even in elpy-mode in Emacs, I have had issues. Another is Jupyter/IPython, a widely used python IDE for data scientists, where this problem crops up all the time. So lay off with the superior attitude.

Re:Perl 6 Optimism by mixmastamyk on Tuesday January 23, 2018 @10:29PM (#16220086)
Don’t need a special editor, just an industry-standard one, that’s the whole point.

I was bothered by the whitespace too, for an hour one afternoon in the spring of ~2001. Then I got over it and realized what a masterstroke it was, removing ~15% of the redundant visual noise.

Firstly, if you cut and paste so often that you feel it should take precedence over everyday readability and conciseness, then that’s a dev smell. Code is read 10x as much as written, likely one reason perl declined.

Secondly, you could simply toggle view whitespace on your editor or have it replace the indent chars on the tab key. Geany does this automatically via pref and it’s Python-specific support is basic.

Thirdly, Python3 and pep8 make issues even less likely than they were. Which is approximately never in my experience in the last ten years or so.

So, this subthread could have been on slashdot in ‘98, hence the frustration.

It’s such a fucking non-issue and productivity boon. Like using yaml for config instead of json.

Re:Perl 6 Optimism by newen on Tuesday January 23, 2018 @11:22PM (#16220295)
My point is that you should be able to code python using Notepad but it is impossible to. Yeah, when multiple people complain of the same thing and you make up more and more complicated solutions for the problem, then you know where the problem lies. Also, you smell.
Re:Perl 6 Optimism by mixmastamyk on Wednesday January 24, 2018 @10:37AM (#16223446)
Yeah, using an editor is so complicated. Maybe programming isn’t for you.
Re:Perl 6 Optimism by newen on Wednesday January 24, 2018 @03:30PM (#16226022)
There are many cases where it is. And your rudeness and devolution into pathetic statements like this is noted.
Re:Perl 6 Optimism by emmelaich on Tuesday January 23, 2018 @10:24PM (#16220067)
When I started writing C a million years ago I thought to myself -- why the f$# does the compiler need to be told twice what the structure of my code is? Once with {} and once with indentation. It's not as if anyone half-sensible is going to write good code with bad indentation.

With that thought in mind, I am pathetically grateful for Python.

Re:Perl 6 Optimism by ptman on Wednesday January 24, 2018 @05:02AM (#16221574)
the compiler doesn't care about indentation, look at IOCCC https://www.ioccc.org
Re:Perl 6 Optimism by emmelaich on Wednesday January 24, 2018 @07:00AM (#16222039)
I know. I'm saying it should. Because why not?
Re:Perl 6 Optimism by newen on Wednesday January 24, 2018 @09:32AM (#16222937)
Because small invisible changes in the code text can result in actual changes in the logic of the code.
Re:Perl 6 Optimism by toyg on Wednesday January 24, 2018 @10:01AM (#16223154)
They are not invisible in any half-decent editor.
Re:Perl 6 Optimism by newen on Wednesday January 24, 2018 @10:22AM (#16223317)
But in the majority of editors that actual people use (mainly, jupyter/ipython), they are invisible. Not to distract from my point though, which is that a good programming language should be easily editable from Notepad.
Re:Perl 6 Optimism by toyg on Wednesday January 24, 2018 @10:21PM (#16228504)
This is where your bias shows. You define this "majority of people" by looking at your niche - you must be in academia or big data. I can tell you that in my niche nobody knows what the hell jupyter even is, and they use real editors like PyCharm, emacs, vim and so on, where whitespace is never a problem.

> a good programming language should be easily editable from Notepad.

The '90s called, they want their notepad back. Please. Not even Windows users run Notepad, anybody with a minimum of knowledge will use Notepad++. And guess what, N++ has plenty of features to deal with whitespace.

Re:Perl 6 Optimism by newen on Thursday January 25, 2018 @10:09AM (#16231232)
Yeah, point taken about my bias. Dealing with python via jupyter has been my biggest source of frustration with python.

But there are still plenty of cases where you will come across python via a bad interface, such as a shell interface to a server that I haven't set up properly (I come across this a lot since I've a lot of code running in clusters), and new computers or other people's bad setups or computers.

Even when using elpy-mode in Emacs, I've had problems when I tried to tabify and untabify a file (to change indentation length), which completely changed program logic in multiple places, and resulted in subtle bugs that I caught much later.

Re:Perl 6 Optimism by hedora on Tuesday January 23, 2018 @10:22AM (#16214232)
Python was designed for doing quick throw away prototypes. Perl 5 was designed to support devops before that was a word. If you are writing a large code base in either, there is a good chance you are doing something horribly wrong. (I still prefer perl though)
Re:Perl 6 Optimism by vgy7ujm on Tuesday January 23, 2018 @10:23AM (#16214244)
Indentation + characters for scope is a lot more visual IMO than just using indentation with no clear end marker.
Re:Perl 6 Optimism by cutler on Tuesday January 23, 2018 @09:05PM (#16219757)
If Python's identation-based scope is so obvious why does the language have to resort to "global" and "nonlocal" all over the place? Python is a crippled language hiding behind a veil of readability.
Re:Perl 6 Optimism by MadcapJake on Tuesday January 23, 2018 @09:50AM (#16213948)
> Its modernity is measurable by the influence it had on most languages designed after its success, like Go and Swift.

So you are measuring "modernity" by legacy?

Also, I don't see any Python influence in Go and from the brief exposure I've had to Swift, I'd say there isn't much influence there either.

By your axiom, one could argue that C is a modern language.

Re:Perl 6 Optimism by toyg on Tuesday January 23, 2018 @11:46AM (#16214930)
> I don't see any Python influence in Go

Well, in Google's own words[1]: "Go attempts to combine the development speed of working in a dynamic language like Python with the performance and safety of a compiled language like C or C++". Some go datastructures are very python-like. Coming from a big Python shop, it's unsurprising.

Chris Lattner mentions Python[2] as an influence among others. Swift's lists and dicts are very python-like. The way python deals with datastructures is one of its strong points, and it's clearly more modern than anything C-like.

Both Go and Swift are more restrictive than Python in many ways, mostly for performance reasons since they are built for specific needs, but the influence is there and openly admitted.

[1] https://techcrunch.com/2009/11/10/google-go-language/

[2] http://nondot.org/sabre/

Re:Perl 6 Optimism by wtetzner on Tuesday January 23, 2018 @02:54PM (#16216991)
What exactly is Python-like about the data-structures? What do they do that, say, Java's Maps and Lists don't do?
Re:Perl 6 Optimism by oblio on Tuesday January 23, 2018 @06:12PM (#16218786)
Slices, for one.
Re:Perl 6 Optimism by cutler on Tuesday January 23, 2018 @08:56PM (#16219716)
The "readability of Python" meme always strikes me as an appeal to mediocre programmers who can't be bothered to learn a full-featured language. It's like trying to avoid musical notation in the teaching of musicians for fear it'll get too complicated for the poor student. Can you imagine a civil engineer being spared the discipline of physics and maths? In which other professional discipline does one expect the language to be dumbed down to the size of the student's brain instead of requiring the student to raise his/her game to gain mastery of the subject?
Re:Perl 6 Optimism by raiph on Tuesday January 23, 2018 @12:10PM (#16215147)
One of the bigger features of P6 is that it can use modules written in other languages such as python.[1]

Are you aware of the compatibility with Perl 5 that I mentioned in my prior comment in this thread? If so, why do you discount it?

[1] https://www.perl.com/article/plotting-with-perl-6/

Re:Perl 6 Optimism by askvictor on Tuesday January 23, 2018 @03:12PM (#16217166)
P5 also has inline python, but it's nowhere near as easy as using a native library.
Re:Perl 6 Optimism by raiph on Tuesday January 23, 2018 @04:35PM (#16217941)
Stefan Seifert authored or maintains both the P5 and P6 versions of Inline::Python, the Inline::Perl5 for P6 and the Inline::Perl6 for P5.

Three of the four are at the first stage. They work in much the same way, using `.run( ... )` to run a line of code at a time.

One of the four is at the second stage. It works as easily as using a native library. No need for `.run` etc.

Re:Perl 6 Optimism by raiph on Tuesday January 23, 2018 @11:54AM (#16215009)
> Perl 5 and 6 are still tied together as if they are the same language

P5 and P6 have been explicitly different languages since day one[1]. As Larry Wall said, "We had to make almost everything [in Perl 5] ... backward compatible [with previous Perls] ... But now it’s the first chance to [break bug-for-bug syntactic and semantic compatibility] and ... I think we should [take the chance]."

> There’s no compatibility between the two.

None?

With an appropriately compiled perl 5 binary installed one can install regular Perl 5 modules from CPAN and use them as if they were Perl 6 modules:

    use Some:Perl5::Module:from<Perl5> ;
How is this not compatible?

> You can’t write a library that works in both versions

Even the large complex Perl 5 package Catalyst works in both Perl 5 and Perl 6 per the above.

> so you lose CPAN and the thousands of packages that make Perl so powerful

Per the above, the majority of CPAN just works 100% correctly out of the box.

> If Perl 6 wanted backwards compatibility, they needed to have thought about it a long time ago.

P6ers thought about backward compatibility with Perl 5 from day one[1].

[1] https://www.perl.com/pub/2000/10/23/soto2000.html/

Re:Perl 6 Optimism by alien_at_work on Tuesday January 23, 2018 @08:01AM (#16213211)
>I don’t understand why Perl 5 and 6 are still tied together as if they are the same language.

A lot of people seem to have forgotten, or maybe they weren't around for it, but when Larry anounced Perl 6 it wasn't for a totally different language. It was the next version of Perl. Just as Perl 5 was to Perl 4, and 4 was to 3 and so on. This idea that it's a completely different language and has no relation with 5 is something people started saying when it was clear that Perl 6 wasn't just around the corner.

Re:Perl 6 Optimism by raiph on Tuesday January 23, 2018 @12:57PM (#16215601)
> when Larry anounced Perl 6 ...

... he very clearly emphasized that it was NOT just the next version of Perl, in contrast with his approach with earlier Perls.

> This idea that it's a completely different language and has no relation with 5 is something people started saying when it was clear that Perl 6 wasn't just around the corner.

I think it's just a chinese whispers effect.

To folk who paid attention to what Larry said on day one, it was obvious that P5 and P6 were (are) not the same and are not totally different either and are related.

Around a decade ago some folk began repeating the mantra that P5 and P6 were different languages in the same family. The hope was that this would help.

But some folk don't like nuance so they arrived at clearly made up and extreme views like "completely different language ... no relation with 5".

Re:Perl 6 Optimism by dkarl on Tuesday January 23, 2018 @11:12AM (#16214644)
Almost. Perl 6 was always meant to be a step beyond Perl 5 rather than just an extension or evolution, but initially, Perl 5 was supposed to be a supported syntax. It would be one of many supported by the runtime, and the primary syntax people meant when they said "Perl 6" was going to be a clean break from the past — which excited many people such as myself who despised Perl 5 while envying its terseness — but the underlying engine was supposed to support Perl 5 with seamless interop from Perl 6.

When they gave that up, they needed to work out a completely new plan for maintaining interest and driving adoption, but instead of reassessing they seem to have decided "who cares, it's gonna be so awesome that it won't matter." It might work, but I'm not holding my breath.

Re:Perl 6 Optimism by zura on Tuesday January 23, 2018 @05:38AM (#16212446)
You can actually use Perl 5 and even Python modules from Perl 6: https://github.com/niner
Re:Perl 6 Optimism by joosters on Tuesday January 23, 2018 @06:20AM (#16212667)
There are gotchas and unsupported functionality (e.g. 'since Perl 6 does not have the same concept of "context", Perl 5 methods are always called in list context.') which effectively mean that you've got no idea if library 'foo' will work or not without a thorough review of the code.

At best, it's a hack. Impressive, sure, but not something that you could rely upon. There's still no sane upgrade path here.

Re:Perl 6 Optimism by lizmat on Tuesday January 23, 2018 @09:02AM (#16213580)
> At best, it's a hack. Impressive, sure, but not something that you could rely upon.

The same could be said for XS. And I do think that all of Perl 5 is relying upon that.

> There's still no sane upgrade path here.

FWIW, my blog post https://www.perl.com/article/an-open-letter-to-the-perl-comm... touches on that subject.

Re:Perl 6 Optimism by jerf on Tuesday January 23, 2018 @10:22AM (#16214235)
XS is the "same" hack all the time, though. A Perl library that can only be called in list context in Perl 6 is a substantial change from Perl 5. I've seen much smaller changes trash code bases before. I've got real code that would be affected by that. (I also think the context idea was a misfire in Perl <6, but as long as it is there, I've sometimes written code that had to deal with it.)

That said, why is it impossible to call a Perl 5 function in scalar context? Shouldn't the equivalent of Perl 5's "scalar" be fairly easy to implement? It may stink to have to manually use it, but it wouldn't be very often, and it's easy enough to use any of half-a-dozen Perl 6 features to minimize the syntactic hit.

Re:Perl 6 Optimism by raiph on Tuesday January 23, 2018 @02:19PM (#16216574)
> why is it impossible to call a Perl 5 function in scalar context?

Has Stefan (who wrote IP5) said or written that it's impossible?

18 months ago he wrote "So far I've found 3 different ways to implement scalar/list context for method/function calls".[1]

He has left issue #31 open.[2]

Where did you read that it's impossible?

[1] https://irclog.perlgeek.de/perl6/2016-08-03#i_12961486

[2] https://github.com/niner/Inline-Perl5/issues/31

Re:Perl 6 Optimism by jerf on Tuesday January 23, 2018 @03:56PM (#16217602)
"Where did you read that it's impossible?"

Grandparent of my post, no further research.

Bear in mind that as I posted doubt, that I am indeed doubting it, so don't expect me to be too surprised if you confirm that it is worth doubting. :)

Re:Perl 6 Optimism by ionforce on Tuesday January 23, 2018 @05:01AM (#16212272)
Should have chosen a different name for the language.
Re:Perl 6 Optimism by yesbut on Tuesday January 23, 2018 @05:56AM (#16212536)
I feel that there should probably be a name change, but ultimately I don't really care. I am enjoying the language and they can call it whatever they want. If and when they change the name I will just refer to it as the new name.
Re:Perl 6 Optimism by corpMaverick on Tuesday January 23, 2018 @10:06AM (#16214104)
A new name would have kept momentum in Perl 5 and it would have made Perl 6 more sexy. It is sad, Perl is amazing, I still use it as my personal scripting language. Back in the day I wrote complete enterprise applications.
Re:Perl 6 Optimism by sampo on Tuesday January 23, 2018 @12:26PM (#16215301)
> Should have chosen a different name for the language.

I wonder if Fortran 2008 wasn't called Fortran, could it be sold to computer science people as a "fast, type-checked matlab".

Re:Perl 6 Optimism by petre on Tuesday January 23, 2018 @06:53AM (#16212824)
There were numerous discussions about this and it was decided against it.

Eventually one would use Perl 5 from inside Perl 6 with the "use v5" statement.

Re:Perl 6 Optimism by cthor on Tuesday January 23, 2018 @09:06AM (#16213604)
Clarification: Decided by the Perl 6 devs who want to keep the name and don't seem to care about the damage that decision does to Perl 5
Re:Perl 6 Optimism by petre on Tuesday January 23, 2018 @10:39AM (#16214366)
One of the discussion was on the Perl blogs[1]. Most of the devs there are Perl 5 devs and they also decided against the name change. Perl 6 is the next iteration of Perl that has been redesigned from the ground up. Why should it bare a different name? Yes, the redesign took more than a decade and it's incompatible with Perl 5, but so is Python 3.6 compared to 2.7, albeit to a lesser extent. Even Perl 5.26 has changed a lot since 5.6. In fact the least common denominator is 5.10.1. Using older versions is discouraged since they're largely unsupported by the majority of CPAN modules.

1. http://blogs.perl.org

Re:Perl 6 Optimism by cthor on Tuesday January 23, 2018 @11:48AM (#16214945)
The most recent discussion I saw on this subject[1] makes it very clear that there isn't a consensus. If there is, it's in the "Perl 6 should rename" direction.

[1]: https://www.reddit.com/r/perl/comments/7r1b33/an_open_letter...

Re:Perl 6 Optimism by vorg on Wednesday January 24, 2018 @11:50AM (#16224126)
> Yes, the redesign took more than a decade

Quite true! In fact, the redesign took more than a decade and a half (July 2000 to Dec 2015). A record worth breaking!

Re:Perl 6 Optimism by virtualsue on Tuesday January 23, 2018 @12:42PM (#16215467)
It was a decision made by Larry Wall alone.Since it’s his language, he’s allowed to do that.
Re:Perl 6 Optimism by vgy7ujm on Tuesday January 23, 2018 @06:56AM (#16212850)
If this really had worked seamlessly it would be great. But that includes /usr/bin/perl working this way on every OS etc... with a clear&easy upgrade path for existing code.
Re:Perl 6 Optimism by petre on Tuesday January 23, 2018 @10:58AM (#16214530)
Well Perl 5 needs a spec in order to be supported inside Perl 5. Otherwise which version do you support? 5.6? 5.10.1? 5.16?
Re:Perl 6 Optimism by emmelaich on Tuesday January 23, 2018 @10:26PM (#16220071)
What ... like Ruby? :-)

Perl6 has some compatibility -- at the wetware level.

Which is not nothing.

Re:Perl 6 Optimism by jbucaran on Tuesday January 23, 2018 @07:57AM (#16213174)
Yeah, but I think it's because they have the same name, only the number on the right is different and people tend to assume that Perl 6 is the one after 5.
Re:Perl 6 Optimism by makecheck on Tuesday January 23, 2018 @03:57PM (#16217619)
Also, how would similar functions even be enough? The average Perl script I had was full of special operators, etc. (they all changed and are impossible to Google anyway). And code bases have more than enough churn without being fundamentally rewritten multiple times to do the same thing.
Re:Perl 6 Optimism by unixhero on Tuesday January 23, 2018 @10:18AM (#16214199)
It's the spiritual successor