Click here to Skip to main content
15,891,567 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: What "advanced" features of programming languages do you use? Pin
F-ES Sitecore20-Jan-20 1:21
professionalF-ES Sitecore20-Jan-20 1:21 
GeneralRe: What "advanced" features of programming languages do you use? Pin
rjmoses20-Jan-20 1:25
professionalrjmoses20-Jan-20 1:25 
GeneralRe: What "advanced" features of programming languages do you use? Pin
Dan Neely20-Jan-20 4:52
Dan Neely20-Jan-20 4:52 
PraiseRe: What "advanced" features of programming languages do you use? Pin
ZurdoDev20-Jan-20 1:27
professionalZurdoDev20-Jan-20 1:27 
GeneralRe: What "advanced" features of programming languages do you use? Pin
OriginalGriff20-Jan-20 1:29
mveOriginalGriff20-Jan-20 1:29 
GeneralRe: What "advanced" features of programming languages do you use? Pin
rjmoses20-Jan-20 1:43
professionalrjmoses20-Jan-20 1:43 
GeneralRe: What "advanced" features of programming languages do you use? Pin
Rick York20-Jan-20 5:26
mveRick York20-Jan-20 5:26 
GeneralRe: What "advanced" features of programming languages do you use? Pin
Sander Rossel20-Jan-20 2:28
professionalSander Rossel20-Jan-20 2:28 
Depends on what you think is advanced Wink | ;)
I use lambdas in C# all the time, but they've been around for over 10 years and now also turn up in other languages like JavaScript and, apparently, C++.
I use named tuples in C#, they were introduced two or three years ago, I think.
I've used pattern matching too.
A comment above this one mentions var and dynamic, I use var quite often and dynamic when I need it.
Basically, if it's in the language, why shouldn't I use it if I have need for it?

Personally, I don't find lambdas difficult to read at all.
In fact, a simple lambda can much better convey what you're doing than a function and be better maintainable.
For example:
C#
myCollection.Where(x => x.IsActive).ToList();

// vs.

myCollection.Where(IsActive).ToList();
// Elsewhere in the code.
private bool IsActive(Something x)
{
   return x.IsActive;
}
If the specs change, for example x.IsActive && x.Status == Status.Done, the first is an easy fix, the second would become IsActiveAndStateIsDone or some such, which gets harder to read every time.
In the case when the lambda is an Expression, like with Entity Framework, a function can't even be parsed and you have to use a lambda.

GeneralRe: What "advanced" features of programming languages do you use? Pin
User 1106097920-Jan-20 2:49
User 1106097920-Jan-20 2:49 
GeneralRe: What "advanced" features of programming languages do you use? Pin
Sander Rossel20-Jan-20 2:57
professionalSander Rossel20-Jan-20 2:57 
GeneralRe: What "advanced" features of programming languages do you use? Pin
User 1106097920-Jan-20 3:08
User 1106097920-Jan-20 3:08 
GeneralRe: What "advanced" features of programming languages do you use? Pin
Sander Rossel20-Jan-20 3:36
professionalSander Rossel20-Jan-20 3:36 
GeneralRe: What "advanced" features of programming languages do you use? Pin
User 1106097920-Jan-20 6:10
User 1106097920-Jan-20 6:10 
GeneralRe: What "advanced" features of programming languages do you use? Pin
RugbyLeague20-Jan-20 3:30
RugbyLeague20-Jan-20 3:30 
GeneralRe: What "advanced" features of programming languages do you use? Pin
DRHuff20-Jan-20 3:59
DRHuff20-Jan-20 3:59 
GeneralRe: What "advanced" features of programming languages do you use? Pin
honey the codewitch20-Jan-20 6:58
mvahoney the codewitch20-Jan-20 6:58 
GeneralRe: What "advanced" features of programming languages do you use? Pin
Gary R. Wheeler20-Jan-20 15:20
Gary R. Wheeler20-Jan-20 15:20 
GeneralRe: What "advanced" features of programming languages do you use? Pin
rjmoses20-Jan-20 23:27
professionalrjmoses20-Jan-20 23:27 
GeneralRe: What "advanced" features of programming languages do you use? Pin
Stefan_Lang20-Jan-20 20:46
Stefan_Lang20-Jan-20 20:46 
GeneralRe: What "advanced" features of programming languages do you use? Pin
Greg Utas21-Jan-20 1:31
professionalGreg Utas21-Jan-20 1:31 
GeneralThat's how we "always" work Pin
Sander Rossel20-Jan-20 0:50
professionalSander Rossel20-Jan-20 0:50 
GeneralRe: That's how we "always" work Pin
phil.o20-Jan-20 1:10
professionalphil.o20-Jan-20 1:10 
GeneralRe: That's how we "always" work Pin
Sander Rossel20-Jan-20 2:03
professionalSander Rossel20-Jan-20 2:03 
GeneralRe: That's how we "always" work Pin
rjmoses20-Jan-20 1:12
professionalrjmoses20-Jan-20 1:12 
GeneralRe: That's how we "always" work Pin
Daniel Pfeffer20-Jan-20 1:42
professionalDaniel Pfeffer20-Jan-20 1:42 

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.