The tag has no wiki summary.

learn more… | top users | synonyms

-1
votes
1answer
67 views

Pros and cons of using generic delegates as nested functions

I've written code like this before: private void Strings_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { var onAdd = new Action(() => { if(e.NewItems != ...
0
votes
2answers
71 views

Handling multiple packet types in Java 8

I have a Netty-based game server implementation that handles 40 or so distinct packets with their own serialization structure, for brevity I'll refer to them as FooPacket, BarPacket, ... These packet ...
0
votes
1answer
131 views

Is Lambda Still Supported In Python?

Only one or two years ago, I remember reading Python constructs that would be removed from Python -- reduce was one of them -- and other constructs that would be emphasized like comprehensions and ...
4
votes
1answer
72 views

Is the Fork/Join framework a bad match for the Java 8 Streams API?

Today I found an article about Java8's Fork/Join-Framework and its usage for the parallel streams implementation. While I do understand the article, I'm not entirely sure what I should think of it. ...
0
votes
0answers
59 views

Using Statement lambda in exception handling

Following is a code snippet from MVP Win Forms application and this explanation would be helpful when answering the questions. My DAL doesn't handle exceptions and it will be propagated up to the ...
1
vote
1answer
58 views

How the Stream.filter() method works?

I know how the lambda expresion works and I know it is an argument for .filter() that establish the criteria to filter with. But I don't get how .filter() uses the argument, in this case a lambda ...
2
votes
3answers
261 views

If Scheme is untyped, how can it have numbers and lists?

Scheme is said to be just an extension of the Untyped Lambda Calculus (correct me if I am wrong). If that is the case, how can it have Lists and Numbers? Those, to me, look like 2 base types. So I'd ...
0
votes
2answers
269 views

foreach in list or foreach in list.where [duplicate]

I don't know what to call this question. This is my example: foreach (var item in lstItem.Where(item => stock.ItemCode == item.ItemCode)) { stock.ItemName = item.ItemName; ...
2
votes
0answers
123 views

Redex and reduction strategies

I'm studying Types and Programming Languages, and have some trouble getting my head around the concepts of the 5th chapter, The Untyped Lambda Calculus. Specifically, redex, reduction and the various ...
-1
votes
1answer
214 views

Is there any practical algorithm / data-structure that can't be done with non-recursive Lambda Calculus augmented with foldl?

In my search for a practical non-turing complete programming language, I've been paying attention to lambda-calculus with disallowed self-application - that is, x x forbidden. After taking that ...
5
votes
3answers
286 views

Interface at the class or function level?

I have been falling into a pattern lately where I have been defining routines that rely on an interface defined by a function that is specified as a parameter to the routine. (The language is C#, but ...
0
votes
1answer
349 views

Techniques to Enable Dynamic Query / Calculation at Runtime

I'm working on a C# project which provides users an on-demand method of importing data from various formats and then performs mail-merge-like actions to complete a template. The process works for ...
3
votes
1answer
390 views

How to serialize and deserialize lambda expression in F#?

I serialized lambda expressions in C# before. Now I wanna use F# instead of C# for serialization and deserialization. I heard F# is better in this area. Is it true? How can I do that with F#? I’d ...
3
votes
1answer
278 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 ...
12
votes
5answers
488 views

What is the name of λx.λf.fx (like reverse apply) in lambda calculus? Does the corresponding function have a standard name in programming?

What is the name of λx.λf.fx in lambda calculus? Does the corresponding function have a standard name in functional programming languages, like Haskell? In object oriented programming, is there a ...
10
votes
4answers
3k 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 ...
9
votes
1answer
630 views

Are “normal order” and “call-by-name” the same thing?

I was studying the book Structure and Interpretation of Computer Programs and in section 1.1.5 The Substitution Model for Procedure Application the author explains the concepts of normal order and ...
9
votes
4answers
1k views

What is Java's primary focus? Why does it take so long to get new features?

I have been exploring the new features in the JDK8, like the lambda expressions, the extension methods, and the new stream API. Evidently none of these features are new in the programming world and ...
4
votes
1answer
222 views

How to properly diagram lambda expressions or traversals through them in Architecture Explorer?

I'm exploring a piece of code in Architecture Explorer in Visual Studio 2010 to study the relations between methods. I noticed a strange behavior. Take the following source code. It generates a hello ...
4
votes
1answer
140 views

Lambda Calculus Free Variable

Here's something from Slonneger's "Syntax and Semantics of Programming Languages": A variable may occur both bound and free in the same lambda expression: for example, in λx.yλy.yx the first ...
1
vote
1answer
1k views

Is python lambda “really formal” λ-calculus or just share the name?

Now and then I use the Python lambda. Is it so formal that it is safe to say that you can do formal lambda calculus with it? I just used it but I didn't fully understand whether the python lambda and ...
4
votes
4answers
4k views

What does this mean: Expression<Func<TModel, TValue>>

In ASP.Net MVC, in the razor view, you can type this kind of code: @Html.EditorFor(model => model.Name) (in this case, it creates a textbox for the field Name of the object which is defined as ...
13
votes
1answer
593 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 ...
18
votes
2answers
4k 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? ...
87
votes
14answers
15k 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 ...
5
votes
2answers
468 views

What can procs and lambdas do that functions can't in ruby

I've been working in Ruby for the last couple weeks, and I've come to the subject of procs, lambdas and blocks. After reading a fair share of examples from a variety of sources, I don't how they're ...
12
votes
1answer
1k views

Does Clojure have the continuation?

I started programming with Python. When using python, concepts like coroutine, closure made me really confusing. Now I think I know them some superficial level, but I want to get the "enlightement" ...
5
votes
6answers
2k views

Good way to explain the need for nestable lambda expressions

I'm in a situation where I need to explain lambda expressions to a colleague. He's well-educated, with some programming experience, and my first time showing him lambda expressions seemed to go well. ...
31
votes
4answers
4k 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 ...
27
votes
5answers
5k views

What is the difference between a function and a lambda?

I'm a little bit confused about 'function' and 'lambda'. I've seen some examples showing that the scheme keyword lambda works very similarly to the JavaScript keyword function, but I really don't ...
6
votes
3answers
629 views

Is there a reason to prefer lambda syntax even if there is only one parameter?

List.ForEach(Console.WriteLine); List.ForEach(s => Console.WriteLine(s)); To me, the difference is purely cosmetic, but are there any subtle reasons why one might be preferred over the other?
25
votes
3answers
3k views

What is the origin and meaning of the phrase “Lambda the ultimate?”

I've been messing around with functional programming languages for a few years, and I keep encountering this phrase. For example, it is a chapter of "The Little Schemer, which certainly predates the ...
27
votes
3answers
1k 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 ...
23
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: ...
5
votes
3answers
1k views

Will there be any official LINQ like lambda based library for C++?

Given C++('11) has lambdas now, will there be any LINQ like higher order function library officially supported later? Is there any such library now being used in any production level code? Obviously ...
11
votes
4answers
5k 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 ...
3
votes
3answers
933 views

What is the necessity to go for lambda functions and expressions in C++?

What is the necessity to use lambda functions and expressions in C++? Can you explain or show through examples how to use lambda functions and expressions? I already gone through the related ...
2
votes
5answers
253 views

Delegate vs Method

Is there any advantige using delegates instead of methods? For example: public void LoginAuthenticate(object sender, AuthenticateEventArgs e) { if (Membership.ValidateUser(lgUserLogin.UserName, ...
3
votes
4answers
602 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 ...
2
votes
2answers
340 views

Is Lambda function same as Actor? How can it be explained?

Sometime back I read (from a book) that conceptually Lambda function is similar to Actor. However I am clear on the concept, and will appreciate any insight or explanations for this. If they are ...
4
votes
4answers
2k views

Delphi doesn't have Lambda Expressions and I'm a Delphi programmer, what am I missing out on?

I'm nearly clueless as to what a lambda expression is, but I have a hard time believing that I couldn't finagle something to the same effect in Delphi (albeit with 900% more code). What is the big ...
39
votes
3answers
10k views

Can somebody explain me what are lambda things in programming?

So far I heard about : Lambda calculus Lambda programming Lambda expressions Lambda functions Which all seems to be related to functional programming... Apparently it will be integrated into ...
33
votes
9answers
8k 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 ...