All the Perl that's Practical to Extract and Report

Navigation

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Without JavaScript enabled, you might want to
use the classic discussion system instead. If you login, you can remember this preference.

Thank you for writing your comment. You're fears of being a troll are quite unfounded. You're quite frank, and your intention is clearly not to cause ire but to air your own distress. Let me try to help allay it.

It's nice to be the one putting some Perl 6 code in the way of a Perl 5 programmer with ten years of experience. I'm not surprised that your first reaction to twigils is one of slight... unease. Perl 6 syntax is different, and not just in minor details.

I think I understand the motivation behind the twigils. In other programming languages you can't immediately tell if a variable name is a local variable or an object attribute, for instance.

And while I can't think of a better solution, twigils just don't seem to be the best solution to me. Maybe always requiring the object to be explicit is a better solution (e.g. $self.attribute). But then you'll hit me with a TIMTOWTDI hammer since that probably also works.:)

And while I can't think of a better solution, twigils just don't seem to be the best solution to me. Maybe always requiring the object to be explicit is a better solution (e.g. $self.attribute). But then you'll hit me with a TIMTOWTDI hammer since that probably also works.:)

Sorta, kinda, yes and no.:) Even considering what you say in your self-counterattack, many people will use the twigils anyway. Especially if they're the recommended default. Which they are.

But these are very specific situations and you can even argue that it's a feature - these constructs should only be used by those who know what they're doing.

Hm. Twigils as a shibboleth for tricky features. ("You have unlocked the '*' twigil and can now use... contextuals!") Yes, I guess so. But I still maintain that they're not as spooky as you imply, especially not the OO ones. The twigils make them fittingly stand out as "almost, but not quite, ordinary variables".

Well, I just looked at the new periodic table and if by "gorgeous" you meant "scary", I agree with you.:)

If you think about it, I guess this discussion wouldn't even exist if Perl 6 wasn't called Perl 6. This implies it's a successor of Perl 5 and thus, eventually, Perl 5 will be obsoleted by Perl 6.

Being completely honest, what goes through my mind when I read about Perl 6 these days is something like: "Oh shit, I will need to go through all this madness sometime in the future when Perl 6 is completed".

In the interests of mutual understanding, I tried to look at the periodic table (which is here [ozonehouse.com], by the way), and tried to instill a measure of fear in myself. The closest I got was "huh, that's quite a lot of them, isn't it?".

I think one of the big dividing points between the Perl languages on the one hand and other programming languages on the other, is that Perl embraces complexity -- often quite fearlessly. Language designers are known to talk about minimalism and orthogonality. Perl, in contrast, seems

I've actually read all these these references before posting here. I don't usually actively participate in discussions, though.

"Scary" was the least offensive adjective I could think of to express my general disapproval of it. "Batshit fucking insane" sounds more like my thoughts.:)

Anyway, the whole periodic table of operators sounded novel when I first looked at it a few years ago. These days, I just feel like such things could be the last nail in the coffin for Perl in general.

Masak and his homies won't acknowledge it, but having few and well-defined operators is a GOOD thing for a language. Operators are akin to prepositions and should be kept to a minimum, in my very humble opinion. I'm pretty sure chromatic/masak/lwall/etc don't think so, though.

Very true, because operators are verbs. Prepositions in programming languages are rare. Perhaps regex modifiers count.

As for the larger question, parsimony of primitives leads directly towards dialectization, in the case of Forth-like languages; top-down standardization of APIs, in the case of Java; or oscillating periods of expansion and contraction towards contentious compromises, in the case of CLOS or Scheme. Each has disadvantages.

You are missing the point entirely. Firstly, minimising the number of operators, especially in perl 6's case, would be positive. Secondly, what you are saying, in plain English (I have my pretentiousness filter on) is "if we have very little primitives, we will get into a mess like lisp" and that's simply false - there are many programming languages in the middle of the spectrum that have not been (as you say) "dialectised" (which, according

Firstly, minimising the number of operators, especially in perl 6's case, would be positive.

Why?

No, seriously. Why?

It's obvious you have a target number in mind. Quantify it. If there are facts, discoverable facts, for the design of an ideal programming language, let's be engineers about it. Be specific. "Too many" is not specific. "Fewer" is not helpful. "I know it when I see it" is opinion, not science. Be bold; back up your assertions.

Because the operators are not obvious. Not even for Perl 5 programmers. They should be as obvious as +, or -. I'm not against introducing a couple of operators, if they make sense. In this day and age, the engineering goal of a programming language should be to make multithreading and object plurality as easy as possible. I think it's right to make operators smarter so they can operate on arrays or sole elements, but it seems to have gone to a confusing extreme in perl 6.

One small case, just looking at the periodic table of perl 6 operators. I see a whole bunch of string comparison operators (leg, lt, lg, eq, ge, gt, ne) and a whole bunch of numeric comparison operators (<=>, >, <, etc etc) plus cmp plus eqv. Now, I haven’t had time to look at perl 6 deeply in years, but at first glance, that’s even worse than common lisp’s 5 different notions of equality.