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:
Jonathan Scott Duff
Date:
April 11, 2010 06:01
Subject:
Re: underscores vs hyphens (was Re: A new era for Temporal)
Message ID:
s2hb762bfda1004101150u629878der9c3342af5270ac2b@mail.gmail.com
On Sat, Apr 10, 2010 at 5:14 AM, Mark J. Reed <markjreed@gmail.com> wrote:

> I'd much rather see a single consistent style throughout the setting
> than backwards compatibility with p5 naming conventions.
>
> If Temporal is the first setting module to use multiword identifiers,
> I vote for hyphens.


As another data point ... me too.  I'd prefer to see hyphens than
underscores.

-Scott


> They're easier on the fingers and the eyes;
> underscores have always felt like an ugly compromise to make the
> compiler's job easier.
>
> On Saturday, April 10, 2010, Carl Mäsak <cmasak@gmail.com> wrote:
> > John (>):
> >> Forgive me if this is a question the reveals how poorly I've been
> >> following Perl 6 development, but what's the deal with some methods
> >> using hyphen-separated words (e.g., day-of-week) while others use
> >> "normal" Perl method names (e.g., set_second)?
> >
> > I'd just like to point out that the current Temporal spec only does
> > methods with underscores, including C<day_of_week>.
> >
> > This goes against my personal preferences; I greatly prefer dashes in
> > almost all of the code I write. But I acknowledge that most of the
> > programmers out there seem to expect underscores -- and also, the aim
> > was to produce a small delta from CPAN's DateTime and not change
> > around things ad lib.
> >
> > // Carl
> >
>
> --
> Mark J. Reed <markjreed@gmail.com>
>


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