The tag has no wiki summary.

learn more… | top users | synonyms

14
votes
4answers
5k views

Is a lambda expression something more than an anonymous inner class with a single method?

There is a new hype with the long awaited lambda expressions in Java 8; every 3 day another article appears with them about how cool they are. As far as I have understood they a lambda expression is ...
15
votes
4answers
6k views

Why doesn't Python allow multi-line lambdas?

Can someone explain the concrete reasons why BDFL choose to make Python lambdas single line? This is good: lambda x: x**x This results in an error: lambda x: x**x I understand that making ...
27
votes
3answers
2k views

What are the benefits and disadvantages in the approaches of C#, Java and Scala to Closures/Lambdas/…?

I wonder what the technical implementation differences between C# and Scala are and how both solutions compare to the implementation ideas and concerns voiced in the email Peek Past lambda by Brian ...
87
votes
14answers
16k views

What triggered the popularity of lambda functions in modern mainstream programming languages?

In the last few years anonymous functions (AKA lambda functions) have become a very popular language construct and almost every major / mainstream programming language has introduced them or is ...
35
votes
10answers
10k views

Does the usage of LINQ and Lambda Expressions lead to less readable code?

I'm having a discussion with a co-worker on Linq, I'll copy here: Co-Worker: Lets be honest here. Linq syntax sucks. It's confusing and non-intuitive. Me: oh come on, more confusing ...
31
votes
4answers
6k views

C is written in C, how is this possible? [duplicate]

Possible Duplicate: How could the first C++ compiler be written in C++? I know my question goes to the underground galaxy cave where languages are born and involves some lambda math and ...
21
votes
2answers
7k views

Type inference in Java 8

Is the introduction of the new lambda notation (see e.g. this article) in Java 8 going to require some kind of type inference? If so, how will the new type system impact the Java language as a whole? ...
24
votes
11answers
2k views

Is it acceptable to use lambda functions\methods in business software?

I've noticed posts on here demonstrating the use of delegates\lambda functions to solve the hole in the middle idea without a lot of repetition: ...
14
votes
1answer
907 views

Why doesn't Haskell have type-level lambda abstractions?

Are there some theoretical reasons for that (like that the type checking or type inference would become undecidable), or practical reasons (too difficult to implement properly)? Currently, we can ...
3
votes
4answers
641 views

Using lambdas to improve encapsulation

Just as many people believe tenaciously in small functions, some people believe lambdas should only contain small code fragments. An often overlooked advantage of lambdas however, is using them you ...
12
votes
2answers
2k views

Is this a good pattern: replacing a long function with a series of lambdas?

I recently run into the following situation. class A{ public: void calculate(T inputs); } Firstly, A represents an object in the physical world, which is a strong argument for not splitting the ...
3
votes
1answer
598 views

Untyped lambda calculus: Why is call-by-value strict?

I'm currently reading Benjamin C. Pierce's “Types and Programming Languages”. Before really getting into type theory it explains lambda calculus and evaluation strategies. I am a bit confused by the ...