|
Cedric Vivier made changes - 16/Jan/09 08:58 PM
Cedric Vivier made changes - 16/Jan/09 08:58 PM
Cedric Vivier made changes - 16/Jan/09 08:58 PM
Cedric Vivier made changes - 16/Jan/09 08:59 PM
Cedric Vivier made changes - 16/Jan/09 08:59 PM
Cedric Vivier made changes - 16/Jan/09 09:04 PM
Cedric Vivier made changes - 16/Jan/09 09:23 PM
Cedric Vivier made changes - 16/Jan/09 09:26 PM
Cedric Vivier made changes - 16/Jan/09 09:27 PM
Cedric Vivier made changes - 16/Jan/09 09:29 PM
Cedric Vivier made changes - 16/Jan/09 09:39 PM
Cedric Vivier made changes - 17/Jan/09 12:31 AM
Field naming convention doesn't seem to belong in there.
I was expecting this about the field naming On the other hand, it is necessary to have something to guarantee no silent behavior-change wrt conflicts between fields and variables don't you agree? Since we recommended this naming from the start and that most existing code do follow this rule afaik, don't you think considering "_"-prefix, not much a naming issue but more of a "explicit field reference" is a good compromise? Hmm another mostly non-breaking option that would not require preferring one 'recommended naming' among others: In strict-mode, disallow to name a variable the same as a field of the declaring type (or one of its super types) What do you think of this one?
Rodrigo B. de Oliveira made changes - 22/Jan/09 09:24 AM
Cedric Vivier made changes - 23/Jan/09 03:04 AM
Cedric Vivier made changes - 23/Jan/09 03:07 AM
Partially landed in rev.3172
Cedric Vivier made changes - 23/Jan/09 07:26 AM
Cedric Vivier made changes - 23/Jan/09 10:45 AM
Cedric Vivier made changes - 23/Jan/09 10:46 AM
Cedric Vivier made changes - 23/Jan/09 11:05 AM
Cedric Vivier made changes - 23/Jan/09 11:06 AM
Cedric Vivier made changes - 23/Jan/09 02:10 PM
I would definitely like a warning for implicit downcasts and implicit return values, but at the same time I strongly prefer inferred return types and default-public access for methods. Rationale: implicit downcasts and implicit null return values let you shoot yourself in the foot, whereas return type inference and default-public access are low-risk, oft-used features that are essential to boo's wrist-friendliness. I can see how changing return types affects binary compatibility, but I submit that most developers only need binary compatibility guarantees in a small subset of the code they write. Shouldn't this feature be more fine-grained?
The warning about inferred return types and parameters types is for API (ie. visible) methods only, by default you do not get this warning since by default all methods are private.
I agree on the large idea (small subset need guarantee) but I disagree with your conclusion, if default method access is public then you probably publish without noticing an unwanted API that is far larger than the "small subset" you intend(ed) to guarantee.
It can with booc: -nowarn:BCW0024 -define:DEFAULT_METHOD_VISIBILITY=public
with nant: <booc ....strict="true" define="DEFAULT_METHOD_VISIBILITY=public"> <nowarn> <include>BCW0024</include> </nowarn> or in code: import Boo.Lang.Compiler macro compilerSettings: Parameters.DisableWarning("BCW0024") Parameters.DefaultMethodVisibility = TypeMemberModifiers.Public Alternatively, if strict mode is too strict for your taste, you can just enable BCW0023 (implicit return statement) since it seems that is the only thing that you care about. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BOO-703is also worth considering for strict mode imo.