-
Notifications
You must be signed in to change notification settings - Fork 314
Closed
Labels
difficulty-03-duckInvolves more challenging problems and/or developing within and revising the internals APIInvolves more challenging problems and/or developing within and revising the internals APIenhancementFeature requests, or enhancements to existing features. Ideas. Anything within the project's scope.Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope.feature-refactoringsup-for-grabsUse this label in conjunction with a difficulty level label, e.g. difficulty-02-duckyUse this label in conjunction with a difficulty level label, e.g. difficulty-02-ducky
Description
A module usually has its fields this way:
Private mFoo As Integer
Private mBar As Integer
Public Property Get Foo() As Integer
Foo = mFoo
End Property
Public Property Get Bar() As Integer
Bar = mBar
End Property
That works, but I prefer this:
Private Type TClassName
Foo As Integer
Bar As Integer
End Type
Private this As TClassName
Public Property Get Foo() As Integer
Foo = this.Foo
End Property
Public Property Get Bar() As Integer
Bar = this.Bar
End Property
Wrapping the private fields in a private type like this, eliminates the need for prefixes and makes the code cleaner, leaving only a single field in the class, which I like to name this
.
Could be just me though. Thoughts?
ThunderFrame, daFreeMan, Vogel612, rkapka and IvenBach
Metadata
Metadata
Assignees
Labels
difficulty-03-duckInvolves more challenging problems and/or developing within and revising the internals APIInvolves more challenging problems and/or developing within and revising the internals APIenhancementFeature requests, or enhancements to existing features. Ideas. Anything within the project's scope.Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope.feature-refactoringsup-for-grabsUse this label in conjunction with a difficulty level label, e.g. difficulty-02-duckyUse this label in conjunction with a difficulty level label, e.g. difficulty-02-ducky