Click here to Skip to main content
15,891,704 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: do you use extension methods intensively in your projects? Pin
Jörgen Andersson14-Oct-16 20:19
professionalJörgen Andersson14-Oct-16 20:19 
GeneralRe: do you use extension methods intensively in your projects? Pin
#realJSOP14-Oct-16 20:45
mve#realJSOP14-Oct-16 20:45 
GeneralRe: do you use extension methods intensively in your projects? Pin
OriginalGriff14-Oct-16 21:32
mveOriginalGriff14-Oct-16 21:32 
GeneralRe: do you use extension methods intensively in your projects? Pin
Sander Rossel15-Oct-16 0:04
professionalSander Rossel15-Oct-16 0:04 
GeneralRe: do you use extension methods intensively in your projects? Pin
BillWoodruff15-Oct-16 3:52
professionalBillWoodruff15-Oct-16 3:52 
GeneralRe: do you use extension methods intensively in your projects? Pin
Sander Rossel15-Oct-16 4:11
professionalSander Rossel15-Oct-16 4:11 
GeneralRe: do you use extension methods intensively in your projects? Pin
Southmountain15-Oct-16 8:33
Southmountain15-Oct-16 8:33 
GeneralRe: do you use extension methods intensively in your projects? Pin
Fabio Franco17-Oct-16 0:15
professionalFabio Franco17-Oct-16 0:15 
Sander Rossel wrote:
On a few occasions I've created an interface, ISomething, and before writing any implementation I wrote a few extension methods I knew I needed.


Still doesn't make sense to me. If the interface is your own, you should write the method to the interface as it makes sense to be in its scope. If you need behavior without having to implement everywhere, you're looking for an abstract class.

Extension methods provide a clean way to have helper methods to class you cannot modify. Otherwise you're just creating spaghetti code and killing a few principles.

Although M$ does with it's own classes, it makes sense, specially to not break backwards compatibility when implementing new frameworks (like LINQ), so yes, they own the code, but they should not modify it, as LINQ is implemented in a whole different scope.

If you are developing frameworks, with attachable components, that extend other standalone components, yes, it makes sense to have extension methods on your own code, otherwise I agree that's "silly".

To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson


Our heads are round so our thoughts can change direction - Francis Picabia

GeneralRe: do you use extension methods intensively in your projects? Pin
Sander Rossel17-Oct-16 1:15
professionalSander Rossel17-Oct-16 1:15 
GeneralRe: do you use extension methods intensively in your projects? Pin
Wendelius14-Oct-16 23:10
mentorWendelius14-Oct-16 23:10 
GeneralRe: do you use extension methods intensively in your projects? Pin
#realJSOP14-Oct-16 23:13
mve#realJSOP14-Oct-16 23:13 
GeneralRe: do you use extension methods intensively in your projects? Pin
Wendelius14-Oct-16 23:18
mentorWendelius14-Oct-16 23:18 
GeneralRe: do you use extension methods intensively in your projects? Pin
Duncan Edwards Jones14-Oct-16 23:15
professionalDuncan Edwards Jones14-Oct-16 23:15 
GeneralRe: do you use extension methods intensively in your projects? Pin
#realJSOP14-Oct-16 23:57
mve#realJSOP14-Oct-16 23:57 
GeneralRe: do you use extension methods intensively in your projects? Pin
Southmountain15-Oct-16 8:31
Southmountain15-Oct-16 8:31 
GeneralRe: do you use extension methods intensively in your projects? Pin
Sander Rossel15-Oct-16 0:06
professionalSander Rossel15-Oct-16 0:06 
GeneralRe: do you use extension methods intensively in your projects? Pin
harold aptroot15-Oct-16 1:18
harold aptroot15-Oct-16 1:18 
GeneralRe: do you use extension methods intensively in your projects? Pin
Cameron Oltmann17-Oct-16 4:01
Cameron Oltmann17-Oct-16 4:01 
GeneralRe: do you use extension methods intensively in your projects? Pin
harold aptroot17-Oct-16 5:57
harold aptroot17-Oct-16 5:57 
GeneralRe: do you use extension methods intensively in your projects? Pin
Cameron Oltmann17-Oct-16 13:47
Cameron Oltmann17-Oct-16 13:47 
GeneralRe: do you use extension methods intensively in your projects? Pin
Marc Clifton15-Oct-16 3:08
mvaMarc Clifton15-Oct-16 3:08 
GeneralRe: do you use extension methods intensively in your projects? Pin
BillWoodruff15-Oct-16 3:16
professionalBillWoodruff15-Oct-16 3:16 
GeneralRe: do you use extension methods intensively in your projects? Pin
Southmountain15-Oct-16 8:30
Southmountain15-Oct-16 8:30 
GeneralRe: do you use extension methods intensively in your projects? Pin
Mark_Wallace15-Oct-16 21:48
Mark_Wallace15-Oct-16 21:48 
GeneralRe: do you use extension methods intensively in your projects? Pin
pt140115-Oct-16 3:15
pt140115-Oct-16 3:15 

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.