How should I capitalize Perl? [closed]

2019-01-09 15:10发布

PERL? Perl? perl? What's good style?

I know the answer—I just wanted to make sure the question was out there and questioners were aware that there is a correct form.

9条回答
够拽才男人
2楼-- · 2019-01-09 15:24

Despite a lot of anecdote to the contrary, "PERL" was never really an acronym -- it's a "backronym". The name Perl was chosen first, then some people jokingly applied expansions to it, which caught on.

The PerlMonks community (highly recommended!) taught me the convention, and it's similar to Java's:

  • It's never PERL (or JAVA)
  • When you're talking about the language, it's Perl (or Java)
  • When you're talking about the interpreter itself, it's perl (or java).

That said, it doesn't make a whole hill of beans if you do it "wrong".

查看更多
小情绪 Triste *
3楼-- · 2019-01-09 15:27

Quoting the Perl article on Wikipedia.

The name is normally capitalized (Perl) when referring to the language and uncapitalized (perl) when referring to the interpreter program itself since Unix-like file systems are case-sensitive. Before the release of the first edition of Programming Perl, it was common to refer to the language as perl; Randal L. Schwartz, however, capitalised the language's name in the book to make it stand out better when typeset. The case distinction was subsequently adopted by the community.

Also check the perlfaq about this question.

查看更多
姐就是有狂的资本
4楼-- · 2019-01-09 15:31

While, as has been said, it doesn't make THAT much difference if you get it wrong, some folks do use correct capitalization (or at least, NOT referring to 'PERL' or any of the more sensible backcronyms) as a shibboleth for clue in job ads. :)

查看更多
叛逆
5楼-- · 2019-01-09 15:38

"The name is normally capitalized (Perl) when referring to the language and uncapitalized (perl) when referring to the interpreter program itself since Unix-like file systems are case-sensitive." From wikipedia at time of posting.

查看更多
Bombasti
6楼-- · 2019-01-09 15:40

<pkrumins> perlbot: PERL

<perlbot> It's Perl (for the language) or perl (for the interpreter) but NEVER 'PERL'!

查看更多
兄弟一词,经得起流年.
7楼-- · 2019-01-09 15:43

Here's the answer from perlfaq1:

What's the difference between "perl" and "Perl"?

One bit. Oh, you weren't talking ASCII? :-) Larry now uses "Perl" to signify the language proper and "perl" the implementation of it, i.e. the current interpreter. Hence Tom's quip that "Nothing but perl can parse Perl." You may or may not choose to follow this usage. For example, parallelism means "awk and perl" and "Python and Perl" look OK, while "awk and Perl" and "Python and perl" do not. But never write "PERL", because perl is not an acronym, apocryphal folklore and post-facto expansions notwithstanding.

查看更多
登录 后发表回答