dart-lang / core

This repository is home to core Dart packages.
https://pub.dev/publishers/dart.dev
BSD 3-Clause "New" or "Revised" License
19 stars 7 forks source link

Level constants screaming CAPS #438

Open alextekartik opened 6 years ago

alextekartik commented 6 years ago

Level constants still have screaming CAPS such as:

static const Level FINEST = const Level('FINEST', 300);

Is there any plan to change that (or is this package to be deprecated) or would you accept any pull request on this. If yes would change be for the previous example:

static const Level finest = const Level('FINEST', 300);

or

static const Level finest = const Level('finest', 300);
natebosch commented 4 years ago

See some discussion at https://github.com/dart-lang/logging/pull/46

I'm somewhat inclined to do this - there will be a fair amount of churn but it's not going to be difficult to do and we'll be churning lots of code anyway.

@kevmoo @jakemac53 - assuming we'll be having a breaking version bump for null safety - would you still be opposed to this?

kevmoo commented 4 years ago

In general, I support this, too. A big change, though.

We can do the deprecation dance, etc – just a bit of work.

On Wed, Mar 11, 2020 at 5:46 PM Nate Bosch notifications@github.com wrote:

See some discussion at dart-lang/logging#46 https://github.com/dart-lang/logging/pull/46

I'm somewhat inclined to do this - there will be a fair amount of churn but it's not going to be difficult to do and we'll be churning lots of code anyway.

@kevmoo https://github.com/kevmoo @jakemac53 https://github.com/jakemac53 - assuming we'll be having a breaking version bump for null safety - would you still be opposed to this?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dart-lang/core/issues/438, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAEFCWVTLZFYM73HERI27TRHAWERANCNFSM4FXRNNIA .

allentv commented 4 years ago

Is there an industry wide preference to move away from ALL CAPS to lowercase? If so, then I would say the cost of switching would be justified. When I started programming 15 years ago, constants were always in ALL CAPS. Haven't heard any discussions on this case recently though. So I am curious to understand why the inclination towards the change in case?

natebosch commented 4 years ago

Is there an industry wide preference to move away from ALL CAPS to lowercase?

There is at least a Dart preference. https://dart.dev/guides/language/effective-dart/style#prefer-using-lowercamelcase-for-constant-names

mleonhard commented 3 years ago

Do not make this change. See the detailed explanation in https://github.com/dart-lang/sdk/issues/58508 .