34

In How is this Perl sensical, considering Perl 6's type system?, the question was initially tagged with both the and .

I untagged , but @ThisSuitIsNotBlack pointed out that the perl tag wiki lists both the and tags.

Question:

Should questions also get tagged with ?

In my opinion, no they shouldn't be tagged with , because perl6 is a different language and knowledge of perl5 does not necessarily imply knowledge of perl6. If users wish to answer questions related to both perl5 and perl6 they can subscribe to both tags.

I am interested in feedback from both communities.

7
  • 17
    Tags are for connecting interests of users with questions. It may be someone has interest for all versions of Perl (including Perl6) and only listens to the Perl tag instead to Perl5 and Perl6. By untagging the Perl tag you would exclude them. I guess that Perl5 and Perl6 are still seen as part of the Perl family? My personal view is that I add some overall tags (python for pyqt, java for android, ...) if there are tags left. Btw. the help on tags is not really helpful in this regard. Commented Jan 25, 2016 at 20:48
  • 3
    Tags are also for searching and ideally as a perl6 user I don't want my search results to be cluttered with irrelevant perl5 answers and visa versa. Given how different the 2 languages are tagging perl6 with perl is like tagging JavaScript with Java. They're unrelated.
    – user128511
    Commented Jan 26, 2016 at 7:12
  • 4
    Questioners will always use [tags] to maximize the odds that they will find an expert to help them. Expecting them to use [perl6] but not [perl] is a completely lost cause, of course they are looking for a [perl] expert. You'll be editing questions for eternity, not a useful activity. Tags are not for searching, use google. Commented Jan 26, 2016 at 13:21
  • 3
  • If tags are not for searching, then maybe the '[tag] search_phrase' should be removed from the stack exchange advances search feature/page. I don't think that google groks tags? I find it useful to search in tags; especially when it involves ambiguous search terms. That said, you can always use '[perl] OR [perl6] term' but then you need people to expect this which I suppose it the reason for this question. Commented Jan 28, 2016 at 15:52
  • 1
    @artlessnoise when they say "tags are not for searching" they mean that that's not their purpose, but a nice side effect. The actual saying is "tags are not keywords"
    – Braiam
    Commented Jan 28, 2016 at 16:50
  • @artlessnoise Actually you have to follow all of [perl] [perl5] [perl6] [perl5.8] [perl5.10] [perldoc] [perl-module] ( or just [perl*] and look at stackoverflow.com/questions/tagged/… unfortunately they are separate features, and neither are well supported) Commented Jan 28, 2016 at 19:25

6 Answers 6

26

From the perspective of a Perl 5 developer: no. should be used for questions about Perl 5, should be used for questions about Perl 6, and the tags should only be used together on questions that are specifically about both languages (e.g, questions about the use of Inline::Perl5 in Perl 6, or Inline::Perl6 in Perl 5).

Perl 5 and Perl 6 are effectively two separate (but closely related) languages at this point. Any nontrivial question, and its answers, will be specific to one of the two languages. Combining both under a single tag doesn't make sense -- it'd be like using for questions about , , and .

(Using for questions about Perl 5 would be ideal, but is already commonly understood to mean Perl 5. There's no practical way of fixing that now, so whatever.)

14
  • 13
    Oh the fun we'll have by the time Perl 7 comes out... we really need a tag [perl<6] and another [perl>=6], but I'm not sure how to make that good, or even adequate, so have an upvote for now. Commented Jan 26, 2016 at 7:32
  • This was pretty much my viewpoint as well. Not going to accept yet because I know @ThisSuitIsBlackNot is going to post an argument in opposition to this one. Commented Jan 26, 2016 at 14:26
  • 1
    @HunterMcMillen I thought about this all day yesterday, even wrote up a long answer with charts and references, and then realized I still wasn't sure. I may post an opposing answer just to give people something else to vote on. Regardless, I would leave this open for longer than a day...the question doesn't have very many views yet. Commented Jan 26, 2016 at 16:20
  • 3
    I guess the only real argument I have is that this approach is different than the way other version-specific tags are handled on SO. Tagging a question both python and python-3.x is not a problem (it's actually encouraged). I imagine other tags are similar. Perl is unique because "Perl" has almost exclusively meant "Perl 5" for the past 15+ years, but now that Perl 6 has been officially released, I think that will [very] gradually start to change. New Perl 6 users unfamiliar with Perl 5 will add the perl tag to their questions, and (continued) Commented Jan 26, 2016 at 16:41
  • 6
    (continued) I can't think of a good reason to go around removing it as long as the perl6 tag is there too. At some point, "Perl" will no longer mean just "Perl 5" anymore. Commented Jan 26, 2016 at 16:41
  • 3
    @Deduplicator: It's take Perl 6 about 15 years so far to appear — and it was not mooted until a good few years after Perl 5 had been released. So, on past performance, you've got 20 years or so before you have to start worrying too much about Perl 7. Commented Jan 26, 2016 at 18:22
  • @JonathanLeffler And that's assuming they even call it Perl 7 when that happens. Given the amount of confusion Perl 6 has caused, they may very well end up using "6.x" forever, or using an entirely new name for future major changes.
    – user149341
    Commented Jan 26, 2016 at 18:44
  • Luckily, fewer people use Perl6 than are using, oh, I dunno, QBASIC/DOS, so there's that. :-)
    – Warren P
    Commented Jan 26, 2016 at 18:56
  • 1
    So...anybody want to rename Perl 6 altogether if it's not Perl?:D Not that obfuscation on the terminology level is not fun. Commented Jan 28, 2016 at 14:25
  • We could always have a mod rename the current perl tag to perl5, and then blacklist perl to stop it from being recreated. That would actually force askers to pick one or the other. But that would probably need a separate meta thread. Commented Jan 28, 2016 at 15:15
  • @IlmariKaronen I can't imagine them actually blacklisting perl: "Tags must be 'quite bad' to be blacklisted. Generally, these are tags that could never convey any useful information or are actively harmful to the site." Commented Jan 28, 2016 at 16:02
  • @ThisSuitIsBlackNot: I dunno... with two different languages called "Perl" in active use now, it seems like an ambiguous tag to me. IIRC, some of those have been legitimately blacklisted before. Commented Jan 28, 2016 at 16:07
  • @IlmariKaronen Additions to the blacklist are pretty rare, but bootstrap was recently blacklisted. I don't know if that's quite an apples-to-apples comparison, though, because bootstrap was being used for 4 or 5 completely unrelated topics, while Perl 5 and 6 are at least in the same family. bootstrap was also causing real problems, while perl isn't (yet). But could you post your suggestion as an answer? I don't think we need a separate question for this, and I'm curious what other people think. Commented Jan 28, 2016 at 16:24
  • @ThisSuitIsBlackNot: Done. Commented Jan 28, 2016 at 16:49
14

The first official release of Perl 6 was announced in December. Suddenly Stack Overflow is getting more Perl 6 questions:

perl6 questions per month

(SEDE query)

This comes after 15 years of parallel development, and 21 years after the first release of Perl 5. In that time, the word "Perl" has become essentially synonymous with "Perl 5" in common usage.

For Perl developers today, "Perl" means "Perl 5". To acknowledge that reality, let's keep tagging Perl 5 questions .

However, as Perl 6 gains popularity, it will start to be picked up by developers who are unfamiliar with Perl 5. These developers will call their Perl 6 programs "Perl", and they will automatically add the tag to their Stack Overflow questions.

At some point, there will be enough Perl 6 code in the wild that "Perl" no longer unambiguously means "Perl 5", but instead could mean either "Perl 5" or "Perl 6". In anticipation of that time, let's allow questions to also have the tag.

3
  • 3
    There are a lot of "will"s in this post, but I'm probably being optimistic about the future of Perl 6. Hell, I've been using Perl 5 for three years and I'm active in the perl tag on SO, but know next to nothing about Perl 6. I didn't even realize they had finally stabilized the language spec! But I think at some point, Perl 6, or something else Perl !5, will take off and change the current usage of the word "Perl". Perl is now a family of languages; let's make the tag reflect that. Commented Jan 26, 2016 at 19:11
  • 1
    Example of your third paragraph: stackoverflow.com/questions/35024489/… Commented Jan 26, 2016 at 21:40
  • @HunterMcMillen I was just looking at that question! I left a comment for the OP about always including perl6 for Perl 6 questions. Commented Jan 26, 2016 at 21:51
6

By request, I'm posting this suggestion I originally made in the comments as an answer, in order to gauge community support for this idea.

Given that we now have two quite different languages called "Perl" in active use, it might make sense to start treating as an ambiguous tag. Specifically, this could entail:

  1. renaming the current tag (which at the moment is still mostly used for Perl 5) to ,

  2. getting rid of the resulting synonym (to keep lazy users from just typing in "perl" and hitting enter), and

  3. doing whatever is necessary (e.g. blacklisting) to prevent the ambiguous tag from being accidentally recreated.

This way, users typing "perl" into the tag box would be presented with a choice between and , and would actually have to choose one or the other (or, in rare cases, both).

2
  • I'm not quite as against the synonym, but seems fine either way +1 Commented Jan 28, 2016 at 18:54
  • And this is what I hate about voting: post a late answer and everybody has already moved on. Thanks for posting, though. The support for duskwuff's answer is pretty high, so I think it's safe to say we don't want Perl 6 questions to include the perl tag. For now, there are so few Perl 6 questions that manually re-tagging is manageable; maybe at some point if it becomes a problem, you can promote this to a feature request. Commented Jan 29, 2016 at 18:32
3

Only for questions only relating to Perl 6.

Both and for questions relating to both Perl 6 and Perl 5.

Also, anyone wanting to see questions tagged but not can search for [perl] not [perl6], thus:

image showing searchbox in which "[perl] not [perl6]" has been entered


Part of the tagging problem may be that people using Perl 6 still think of it as being "Perl". Both Perl 5 and Perl 6 are "Perl" in philosophy and style. Perl's whole goal is to make programming problems easier and more natural to solve. It lets you think of problems in your own way and let's you program in your own way. If you love Perl 5 for its "Perlishness", you'll know what I mean. Perl 6 is even more "Perlish" than Perl 5.

-2

I frankly think the tag should be banned from Stack Overflow, or be an alias for .
( On other Stack Exchange sites it may make sense to still allow it separately )

Tagging Perl 4, Perl 5 and Perl 6 with the same tag is like tagging C, C++ and C# with the same tag. They are that different.

While it is theoretically possible to write code that works the same in both Perl 5 and Perl 6, it is also possible to write code that works in both, but works completely differently.
(Similar to making code work in many different languages at the same time)


Here is just a quick example

print "Hello from Perl ", 5 + !!"0", "\n";

In Perl 5:

Hello from Perl 5

In Perl 6:

Hello from Perl 6

If you wanted to print more about the version you are using:

#`{     // start of inline comment in Perl 6

    #// Perl 5 in a Perl 6 comment
    use 5.010;
    say "Perl $^V"; # stringifies $^V object

'       // start of string in Perl 5
}; #    // end of Perl 6 inline comment

    #// Perl 6 in a Perl 5 string
    say $*PERL; # calls .gist on $*PERL object
    say $*PERL.compiler;

#// ' # // end of string in Perl 5

(I used the Javascript highlighter to get some color without choosing Perl 5 highlighting over Perl 6, that's why there are // for every comment)

In Perl 5.20.1

Perl v5.20.1

In Perl 6

Perl 6 (6.c)
rakudo (2015.12.220.gcf.7706.f)

(There are more complex examples that don't use Perl 6 inline comments)


Those are just the simple examples, the following is valid Perl 6, but invalid in Perl 5.
Not to mention that it would be much more work to even get something that remotely works similarly in Perl 5.
(Probably using an overloaded class for the string argument, or a module that allows you to hack into the parser.)

{
  # make 5 + " 6" work the same as it does in Python,
  # but only for the enclosing scope
  multi sub infix:<+> ( $l, Str $r ) { $l ~ $r }

  say (5 + " 6") eq "5 6"; # True
}
# back to the Perl way of working
say (5 + " 6") eq "11"; # True

Objects are also different

Plain Perl 5: (no modules)

use 5.020;
package MyClass {
  my @methods;
  BEGIN {
    # Set this in a BEGIN block
    # so it is available in the other BEGIN block.
    @methods = qw'a b';
  }

  sub new {
    my ($self,%values) = @_;
    my $class = ref $self || $self;

    # requires 5.20+ I believe for %hash{@keys}
    bless {%values{@methods}}, $class;
  }

  BEGIN {
    # This is advanced code
    # that shouldn't be done by novices.
    # It would be safer with Package::Stash
    for my $method (@methods) {
      no strict 'refs';
      *{"MyClass::$method"} =
      sub {
        my ($self,$new_value) = @_;
        if( @_ > 1 ){
          $self->{$method} = $new_value;
        } else {
          $self->{$method}
        }
      }
    }
  }
}

my $obj = MyClass->new(a=>1,b=>'Hello');

say $obj->a; # 1
$obj->a(5);
say $obj->a; # 5

Perl 6:

class MyClass {
  has Int $.a is rw;
  has Str $.b is rw;
}

my $obj = MyClass.new: :a(1), :b<Hello>;
# MyClass.new: a => 1, b => 'Hello'; would have also worked

say $obj.a; # 1
$obj.a = 5;
say $obj.a; # 5

There are modules that you can and should use to get very close to the default in Perl 6, which I would absolutely recommend using if you don't have a good reason not to.
I don't consider them not coming with perl that good of a reason.


The reason I think it might be okay for be an alias to is that Perl 5 is almost completely backwards compatible to the original version of Perl released in 1987, and is what most people really mean when they say Perl.
( Most of the things that were removed or changed you shouldn't really use, or not that well designed to start with. )

-3

Using C++, my advise is tagging with [c++] if it is a general C++ question and using [c++11] and [c++14] only for questions that are really specific about features introduced by these versions.

So I would tag everything that is Perl with [perl] and if you have a specific need for either version 5 oder 6 use [perl5] or [perl6]. As these are sub-sets of [perl], I would never tag a question with [perl] and a specific version.
It might be, that Perl people will disagree.

7
  • 11
    C+++11, even though it was a significant upgrade and really changed idioms and all that, was no different language. Perl6 now, that one is. Commented Jan 26, 2016 at 13:24
  • 2
    @MrLister: Ok, I'll try with four + next time. ;-) Commented Jan 26, 2016 at 16:44
  • 3
    Perl6 is even referred out there on the Internetz as "Not perl at all" by some users who call it "rakudo" instead, as that's the current leading implementation of the perl6 spec.
    – Warren P
    Commented Jan 26, 2016 at 18:56
  • 1
    Ah, like Visual Fred.
    – Mr Lister
    Commented Jan 27, 2016 at 10:26
  • Tagging both Perl 5 and Perl 6 questions with the same tag is like tagging C++ and C# tags with the same tag. Commented Jan 28, 2016 at 16:23
  • @BradGilbert I think it would be more like tagging C and C++ questions with the same tag. Completely different languages, although one evolved out of the other and some small subset of syntax may run in both, and a lot of confusion among new users about the difference between the two (or ignorance that there even is a difference). Given the problems this has caused for the C and C++ communities here, you may have a point. Commented Jan 28, 2016 at 16:48
  • 1
    @ThisSuitIsBlackNot No Perl 4 is to C as Perl 5 is to C++ as Perl 6 is to C#/D/Haskell/Ruby. That is Perl 5 is backwards compatible to Perl 4, but Perl 6 is so different that it mostly only has a passing resemblance. Commented Jan 28, 2016 at 17:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .