TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

New in C# 10: Easier Lambda Expressions

133 pointsby FairDuneover 3 years ago

11 comments

brundolfover 3 years ago
A couple decades ago everyone was on static types. But then people got sick of the boilerplate, and in what I think was a backlash, dynamic languages like JavaScript, Python, Ruby, etc. took the world by storm. With the raised bar of developer expectations when it comes to agility, static type systems were forced to innovate, and now type-inference and related features are coming to all static languages and bringing us back around to a best-of-both worlds situation. Exciting times.
评论 #29358138 未加载
评论 #29357881 未加载
评论 #29360451 未加载
评论 #29356816 未加载
评论 #29357400 未加载
评论 #29359299 未加载
评论 #29358615 未加载
oneepicover 3 years ago
With this the language gets a little more beautiful. On a related note, I just switched from a C# job at Microsoft (microservices) and moved to a Java shop where we're all really just starting to learn Kotlin and migrate our work there. I'm shocked how many times we've learned a fancy feature and I get to say, "actually, C# has something just like this too." (i.e. operator overloading) It is a surprisingly modern language keeping up with the other ones.
评论 #29355307 未加载
评论 #29355449 未加载
jayd16over 3 years ago
Here&#x27;s a link to the official summary.<p><a href="https:&#x2F;&#x2F;docs.microsoft.com&#x2F;en-us&#x2F;dotnet&#x2F;csharp&#x2F;language-reference&#x2F;proposals&#x2F;csharp-10.0&#x2F;lambda-improvements" rel="nofollow">https:&#x2F;&#x2F;docs.microsoft.com&#x2F;en-us&#x2F;dotnet&#x2F;csharp&#x2F;language-refe...</a><p>Lambdas can also have attributes now, too.
thrower123over 3 years ago
F# is really, really bleeding into C#. There&#x27;ll be a convergence, for all intents and purposes, by about C# 15 at this rate.
评论 #29355145 未加载
评论 #29356880 未加载
agluszakover 3 years ago
There&#x27;s something clearly wrong with the code samples: look at the &lt;&#x2F;string&gt; &quot;closing tags&quot; which somehow sneaked in in line 17 of the first sample
评论 #29354778 未加载
评论 #29354729 未加载
pipeline_peakover 3 years ago
I love watching C# slowly grow from a boring MS Java clone into something elegant but still useful
评论 #29358011 未加载
评论 #29356270 未加载
DeathArrowover 3 years ago
C# 10 didn&#x27;t introduce many new features.<p>I hate they delayed the introduction of Algebraic Data Types again. Maybe they will appear in C# 11.<p>Using ADT in F# makes it a breeze to do domain modeling.
评论 #29360017 未加载
评论 #29359326 未加载
stevefan1999over 3 years ago
I love how this make MapGet&#x2F;MapPost&#x2F;MapPut and such useless, and we can just have one MapAction to run them all. I hope .NET 6 would be getting more and more attention and competitive against Java. Java&#x27;s language and syntax, it&#x27;s so bad right now.
dgellowover 3 years ago
If you haven’t yet, check out the C#10 blog post, it has details covering all the changes: <a href="https:&#x2F;&#x2F;devblogs.microsoft.com&#x2F;dotnet&#x2F;welcome-to-csharp-10&#x2F;" rel="nofollow">https:&#x2F;&#x2F;devblogs.microsoft.com&#x2F;dotnet&#x2F;welcome-to-csharp-10&#x2F;</a>.<p>This version brings quality of life changes that make it simpler and nicer to write readable code, which is great to see IMHO.
pattrnover 3 years ago
I love how the second to last code sample has three closing &lt;&#x2F;string&gt; tags, and the blog name is &quot;don&#x27;t code tired.&quot; (Also, really looking forward to using the new type inference.)
tester756over 3 years ago
Nice, I like it.<p>I do wonder what was limiting them before
评论 #29354860 未加载
评论 #29355021 未加载