Click here to Skip to main content
15,064,665 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: If I find another programming language easier should I stay with it instead? Pin
AnotherKen18-Dec-20 20:21
professionalAnotherKen18-Dec-20 20:21 
GeneralI may be moving on from .NET altogether Pin
honey the codewitch13-Dec-20 0:19
mvahoney the codewitch13-Dec-20 0:19 
GeneralRe: I may be moving on from .NET altogether Pin
Greg Utas13-Dec-20 2:03
mvaGreg Utas13-Dec-20 2:03 
GeneralRe: I may be moving on from .NET altogether Pin
honey the codewitch13-Dec-20 2:06
mvahoney the codewitch13-Dec-20 2:06 
GeneralRe: I may be moving on from .NET altogether Pin
Greg Utas13-Dec-20 2:27
mvaGreg Utas13-Dec-20 2:27 
GeneralRe: I may be moving on from .NET altogether Pin
honey the codewitch13-Dec-20 2:38
mvahoney the codewitch13-Dec-20 2:38 
GeneralRe: I may be moving on from .NET altogether Pin
Greg Utas13-Dec-20 2:59
mvaGreg Utas13-Dec-20 2:59 
GeneralRe: I may be moving on from .NET altogether Pin
honey the codewitch13-Dec-20 3:04
mvahoney the codewitch13-Dec-20 3:04 
Greg Utas wrote:
Without the abstract classes, admixed classes tend to make assumptions about each other, so refactoring is needed to make other combinations work later.


That's a good point.

I tend to think of this scenario as intermixing class and interface, but I still conceptually treat my two groups of virtual functions in the base (to be filled by two separate derived classes typically) as two "interfaces" even though they don't have an abstract base to back them. The abstract base is mixed in to the base class itself.

I can see avoiding that for complicated classes or classes that will be worked on by multiple people, and classes that will likely be added to a lot, because it quickly becomes a source of confusion as well as a maintenance hole.

However, for a lot of really simple composable legolike core classes I find this technique to be unobtrusive (not requiring a ton of type definitions) and relatively maintainable.

It's a "good enough" approach (IMO) when you don't need full on separate interfaces/contracts, and you want to keep implementation somewhat together. It quickly breaks down for complicated things though so it's basically a shortcut for simple cases.
Real programmers use butterflies

GeneralRe: I may be moving on from .NET altogether Pin
Mike Hankey13-Dec-20 2:18
professionalMike Hankey13-Dec-20 2:18 
GeneralRe: I may be moving on from .NET altogether Pin
honey the codewitch13-Dec-20 2:23
mvahoney the codewitch13-Dec-20 2:23 
GeneralRe: I may be moving on from .NET altogether Pin
Mike Hankey13-Dec-20 2:45
professionalMike Hankey13-Dec-20 2:45 
GeneralRe: I may be moving on from .NET altogether Pin
Rick York13-Dec-20 7:40
mveRick York13-Dec-20 7:40 
GeneralRe: I may be moving on from .NET altogether Pin
honey the codewitch13-Dec-20 7:50
mvahoney the codewitch13-Dec-20 7:50 
GeneralRe: I may be moving on from .NET altogether Pin
Greg Utas13-Dec-20 2:38
mvaGreg Utas13-Dec-20 2:38 
GeneralRe: I may be moving on from .NET altogether Pin
honey the codewitch13-Dec-20 2:53
mvahoney the codewitch13-Dec-20 2:53 
GeneralRe: I may be moving on from .NET altogether Pin
Greg Utas13-Dec-20 3:14
mvaGreg Utas13-Dec-20 3:14 
GeneralRe: I may be moving on from .NET altogether Pin
honey the codewitch13-Dec-20 3:23
mvahoney the codewitch13-Dec-20 3:23 
GeneralRe: I may be moving on from .NET altogether Pin
Mladen Janković13-Dec-20 3:59
MemberMladen Janković13-Dec-20 3:59 
GeneralRe: I may be moving on from .NET altogether Pin
Greg Utas13-Dec-20 4:24
mvaGreg Utas13-Dec-20 4:24 
GeneralRe: I may be moving on from .NET altogether Pin
Gerry Schmitz13-Dec-20 5:53
mveGerry Schmitz13-Dec-20 5:53 
GeneralRe: I may be moving on from .NET altogether Pin
Greg Utas13-Dec-20 6:00
mvaGreg Utas13-Dec-20 6:00 
GeneralRe: I may be moving on from .NET altogether Pin
honey the codewitch13-Dec-20 7:04
mvahoney the codewitch13-Dec-20 7:04 
GeneralRe: I may be moving on from .NET altogether Pin
Greg Utas13-Dec-20 7:34
mvaGreg Utas13-Dec-20 7:34 
GeneralRe: I may be moving on from .NET altogether Pin
honey the codewitch13-Dec-20 7:08
mvahoney the codewitch13-Dec-20 7:08 
GeneralRe: I may be moving on from .NET altogether Pin
User 1493685313-Dec-20 7:32
MemberUser 1493685313-Dec-20 7:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.