News for hackers. Stuff that matters.
Re:Perl 6 hands-on tutorial – A small introduction to a big ... by kbenson on Friday September 04, 2015 @03:52PM (#10172548)
__type__ I can understand, but .class seems likely to conflict in those cases where you want a method named class. __class__ seems more consistent to me.

In Perl 6, special meta method built-ins are always all caps, specifically because it's not a very reasonable name to choose in most cases, similarly to how python surrounds a name with double underscores. They are special and different, and should appear as such.

> But "object1.WHAT == object2.WHAT" is something that wouldn't occur to me in a million years

Well, that's good,because you aren't really supposed to be doing that. Rather than getting upset at how Perl 6 looks weird when you map operations directly to how you would do them in another language, it might be better to see if that case actually comes up at all. Maybe the language has other features that support different, possibly better, idioms (or at least better for that language)?

Just because Perl 6 and Python are both dynamic languages and have some features doesn't mean you should assume it functions or should be programmed in the same way. I doubt you would make that mistake for something that looked obviously different, like racket, so why jump to those conclusions here just because they look similar in certain aspects.

There are no comments on this comment yet.