3 ms·
>can I gently request you take that slight back. Or at least qualify it to be "perl regex". Regex has the same complexity in any language, that can't be a vali
by carlmr 8y ago
>can I gently request you take that slight back. Or at least qualify it to be "perl regex".
Regex has the same complexity in any language, that can't be a valid reason to denigrate Perl. My biggest issue with Perl is that functions don't even have proper parameters and you need somewhat cryptic syntax to work with arrays, scalars and dictionaries.
- yellowapple 8y agoDefine "proper parameters". Perl subroutines are delightfully flexible in that regard compared to most other languages, and they also happen to be closer to your machine's reality (x86 doesn't care about what's in your stack when you JMP). With the Perl approach, you have the tools to implement multiple dispatch, variable numbers of arguments, etc. rather easily and elegantly. Yeah, it looks weird from the outside, but once you're used to it you start to want it in other languages. That's one example of what makes Perl a great teaching tool for general programming: it doesn't hide the mechanics of function/method calls behind the language, but instead shows it off to you and encourages you to explore and experiment.
- carlmr 8y agoI don't want a great teaching tool, I can use ASM for that. I want something that's easy to read and maintain. I think Perl 6 got it right, but a little too late.
- b2gills 8y agoPeople keep saying that Perl 6 is too late, but they don't say that about other new languages. I mean nobody says the same about Julia, which has been in development for the better part of a decade. The only way it could be too late is if it doesn't do anything better than a single other language. By that I mean if there is a language that does everything that Perl 6 does, and does it just as well. Even if all it does is bring a collection of useful features that haven't already been collected together into a single language, then it isn't too late. It could also create a new design of an existing feature that goes on to influence the design in future languages. That would also make it so that it isn't too late. (I think that in the future we may be able say that about Perl 6 grammars.) I think the real reason people keep saying that about Perl 6 is that they want it to be true. We can only really make that determination years from now when we have perspective.
- petre 8y agoIt does have subroutine signatures since 5.20. And there's autobox.
- carlmr 8y agoOk, I didn't know that, haven't used Perl in a long time. But I don't think any of my Perl programming colleagues have heard of it or like using it. I still think their code is harder to read because of this ingrained bad practice.