6 ms·
In point of fact I do know about moose, since, like every other Perl user on the planet, I've been around the CPAN block at this point. And that's just the pro
by grammaton 16y ago
In point of fact I do know about moose, since, like every other Perl user on the planet, I've been around the CPAN block at this point. And that's just the problem - it's in CPAN, not in Perl itself. I can get an object system just as good (or better) in either Ruby or Python without having to go and download an add on. By itself, Perl - without any modules or extensions or any other crutches - has horrid OOP.
As far as scoping goes, I shouldn't have to explicity declare a variable lexically scoped - and I can't think of any other language where I do. Only Perl - and only because it's visibly hacked in after the fact, along with a number of other features.
Threading is not great for Ruby or Python either, because they use green threads - but Perl has problems bigger than that with it's threading.
- berntb 16y agoSo your complaint is really that you have to install stuff to get better defaults in Perl? :-) Sorry, but that is hard to take seriously. >>I shouldn't have to explicity declare a variable lexically scoped Are you saying you don't like strict? Without that, you're fscked if you spell a variable name wrong in the same way, twice... (I really don't get that not all scripting languages have strict.) I've avoided threading in scripting languages as the plague, but I tend to agree with you as far as I've read. :-)
- grammaton 16y ago> So your complaint is really that you have to install stuff to get better defaults in Perl? :-) No, my point is that if you compare it to another programming language simply as a language, it is basically missing a major feature. If you take Ruby, Python, and Perl, and line them up next to each other simply as languages, Perl is at the bottom of the pile on it's own merits where OOP is concerned. > Are you saying you don't like strict? Even if I use strict, good software development practice would dictate using a lexically scoped variable at all times unless I really need something else. That's one of the reasons lexical scoping is the default in so many languages at this point.
- __david__ 16y ago> If you take Ruby, Python, and Perl, and line them up next to each other simply as languages, Perl is at the bottom of the pile on it's own merits where OOP is concerned. Reminds me of a Larry Wall quote: "I don't really know much about Python. I only stole its object system for Perl 5. I have since repented." Really, Perl's native OO stuff just lacks syntactic sugar. "Bless" is admittedly weird. And you have to write "new" yourself. If you get over those 2 things, it's really quite the same as everything else.
- berntb 16y ago>>if you compare it to another programming language simply as a language Perl is extensible by design. Your "point" of refusing to accept that is just strange. If you can't handle it, use something else. >>good software development practice As __david__ noted, you're just strange here. Variables really should be declared, as I noted before, just because of spelling problems. That is good software practice. Edit: I might be missing the point re "strict", but you can't explain it to either __david__ or chromatic, either. :-) And it seems your "point" about downloadable extensions is that you don't have anything to complain about without that arbitrary limitation.
- grammaton 16y ago>Perl is extensible by design. Your "point" of refusing to accept that is just strange. If you can't handle it, use something else. I think you're missing my point entirely. And I can "handle" it just fine since I've been using Perl for years now. >Variables really should be declared, as I noted before, just because of spelling problems. That is good software practice. Again, you're missing my point completely.
- __david__ 16y ago> As far as scoping goes, I shouldn't have to explicity declare a variable lexically scoped - and I can't think of any other language where I do. Really? I can think of a few: How about C, C++, Java, Lisp, and Javascript? (Yeah, technically javascript is function scoped if you declare it with "var", but you have to do that to prevent it from being global).
- grammaton 16y ago> How about C, C++, Java You do realize they all default to lexical variables, and if you want something else, you have to declare accordingly, right? >Lisp Is a beautiful language, and primarily a play-toy for academics with a handful of real-world applications. While we're at it, which Lisp? Ansi Common? > Javascript I believe it is exactly this quirk in Javascript's scoping that is a major complaint of many developers - although I don't know much javascript and can't speak with authority here.
- __david__ 16y ago> You do realize they all default to lexical variables, and if you want something else, you have to declare accordingly, right? I don't understand your argument. You have to explicitly declare lexical variables in those languages. Ditto for Perl: $ perl -e 'use strict; sub x { $i = 0 }' Global symbol "$i" requires explicit package name at -e line 1. Execution of -e aborted due to compilation errors.