Click here to Skip to main content
15,914,419 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: Pointless .Net Feature of the Day Pin
#realJSOP16-Jan-19 6:13
professional#realJSOP16-Jan-19 6:13 
GeneralRe: Pointless .Net Feature of the Day Pin
Marc Clifton16-Jan-19 8:38
mvaMarc Clifton16-Jan-19 8:38 
GeneralRe: Pointless .Net Feature of the Day Pin
#realJSOP17-Jan-19 0:58
professional#realJSOP17-Jan-19 0:58 
AnswerRe: Pointless .Net Feature of the Day Pin
Super Lloyd16-Jan-19 14:04
Super Lloyd16-Jan-19 14:04 
GeneralRe: Pointless .Net Feature of the Day Pin
Dominic Burford16-Jan-19 21:54
professionalDominic Burford16-Jan-19 21:54 
GeneralRe: Pointless .Net Feature of the Day Pin
#realJSOP16-Jan-19 23:45
professional#realJSOP16-Jan-19 23:45 
GeneralRe: Pointless .Net Feature of the Day Pin
Dominic Burford17-Jan-19 0:23
professionalDominic Burford17-Jan-19 0:23 
GeneralRe: Pointless .Net Feature of the Day Pin
kalberts16-Jan-19 22:49
kalberts16-Jan-19 22:49 
When I learned about partial functions, I immediately embraced it. My project at that time was a protocol stack, with data transport, control and management planes. Each plane is a set of functions completely separated from the other two, but operating on the same protocol layer entity. Partial fuctions allowed me to keep the implementation of the planes completely independent of each other. Obviously, very plane specific functions didn't make use of partial functions, but for e.g. initialization and cleanup it was great.

Once you get going with partial functions, you add e.g. logging functions without cluttering up the plain code. When you write test functions, you write a partial function to verify entry and/or exit conditions. In the development phase, you add extensive parameter validation that would be too expensive to run in production code, or you add code for performance measurenment and statitics to detect bottlenecks and excessive resource reuqirements, so they can be fixed before the product is released.

Yes, you can put it all into one huge, messy code file with a lot of #ifdef to disable parts of the code. The programmer responsisible for one of the planes will have to wade through lots of code that is ireelevant to his tasks. An update in any of the planes, the log functions, the performance measurement functions, the test and validation functions,... invalidates the source file of every other programmer on the project.

Obviously it can be done that way. But I love the partial functions, considering that to be a much better way to do it.
GeneralRe: Pointless .Net Feature of the Day Pin
Olfello17-Jan-19 0:37
Olfello17-Jan-19 0:37 
GeneralRe: Pointless .Net Feature of the Day Pin
#realJSOP17-Jan-19 0:59
professional#realJSOP17-Jan-19 0:59 
GeneralRe: Pointless .Net Feature of the Day Pin
johannesnestler17-Jan-19 4:04
johannesnestler17-Jan-19 4:04 
GeneralRe: Pointless .Net Feature of the Day Pin
obermd17-Jan-19 11:03
obermd17-Jan-19 11:03 
GeneralCCCWNSO Pin
pkfox15-Jan-19 22:11
professionalpkfox15-Jan-19 22:11 
GeneralRe: CCCWNSO Pin
OriginalGriff15-Jan-19 22:13
mveOriginalGriff15-Jan-19 22:13 
GeneralRe: CCCWNSO Pin
OriginalGriff15-Jan-19 22:14
mveOriginalGriff15-Jan-19 22:14 
GeneralRe: CCCWNSO Pin
pkfox15-Jan-19 22:20
professionalpkfox15-Jan-19 22:20 
GeneralRe: CCCWNSO Pin
OriginalGriff15-Jan-19 22:25
mveOriginalGriff15-Jan-19 22:25 
JokeRe: CCCWNSO Pin
Daniel Pfeffer15-Jan-19 22:34
professionalDaniel Pfeffer15-Jan-19 22:34 
GeneralRe: CCCWNSO Pin
OriginalGriff15-Jan-19 23:08
mveOriginalGriff15-Jan-19 23:08 
GeneralRe: CCCWNSO Pin
Rage16-Jan-19 1:01
professionalRage16-Jan-19 1:01 
GeneralEarly CCC Answer Attempt Pin
Michael Martin15-Jan-19 21:39
professionalMichael Martin15-Jan-19 21:39 
GeneralRe: Early CCC Answer Attempt Pin
super15-Jan-19 22:03
professionalsuper15-Jan-19 22:03 
GeneralRe: Early CCC Answer Attempt Pin
OriginalGriff15-Jan-19 22:07
mveOriginalGriff15-Jan-19 22:07 
GeneralRe: Early CCC Answer Attempt Pin
pkfox15-Jan-19 22:12
professionalpkfox15-Jan-19 22:12 
GeneralRe: Early CCC Answer Attempt Pin
User 5924115-Jan-19 23:25
User 5924115-Jan-19 23:25 

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.