develooper Front page | perl.perl6.language | Postings from April 2010

Re: underscores vs hyphens (was Re: A new era for Temporal)

Thread Previous | Thread Next
From:
Damian Conway
Date:
April 11, 2010 07:54
Subject:
Re: underscores vs hyphens (was Re: A new era for Temporal)
Message ID:
z2g832f158a1004110754ndad258ffjaf2abef3c1ad41ff@mail.gmail.com
Well, if we're not going to try to implement linguistically based
hyphenation/underscoriation rules (and I'd still argue that hyphenating
adjectives to nouns and underscoring everything else isn't exactly
rocket science), then I'd suggest we reconsider a radically different
proposal that was made on this list five years ago:

    http://www.mail-archive.com/perl6-language@perl.org/msg22675.html

The relevant suggestion regarding hyphens vs underscores is:

    "...to allow both characters, but have them mean the same thing."

That is, any isolated internal underscore can be replaced with an
isolated internal hyphen (and vice versa), without changing the meaning
of the identifier.

This would be the death of fine distinctions such as between:

    activate_main-sequence_detonator();

and:

    activate_main_sequence-detonator();

which would now resolve to the same subroutine...and do so even if
that subroutine had been declared as

    sub activate-main-sequence-detonator {...}

But perhaps such distinctions are indeed too fine and subtle, and we
would be better off eliminating the possibility of them entirely.

Hyphen/underscore equivalence would allow those (apparently elite few) who
can correctly use a hyphen to correctly use the hyphen, whilst the
shambling masses can just randomly type underscores or hyphens between
each word, as their atavistic whims dictate.

;-)

Damian

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About