Lambda the Ultimate

inactiveTopic The lambda C++ library
started 12/15/2000; 7:01:46 AM - last post 12/26/2000; 5:26:55 AM
Ehud Lamm - The lambda C++ library  blueArrow
12/15/2000; 7:01:46 AM (reads: 1326, responses: 5)
The lambda C++ library
This is a brave attempt to overcome some of C++ weaknesses as compared to functional languageas. I guess the code involves some interesting hacks.
Posted to "" by Ehud Lamm on 12/15/00; 7:02:11 AM

andrew cooke - Re: The lambda C++ library  blueArrow
12/15/2000; 8:07:14 AM (reads: 1362, responses: 0)
Will this give nightmares with object lifetimes (who owns objects inside a lambda expression?)? Also, why aren't free1 etc declared (wouldn't that help provide type safety (I suspect this might be to do with memory management too...?)?)?

kaweah - Re: The lambda C++ library  blueArrow
12/18/2000; 4:37:56 PM (reads: 1335, responses: 0)
You might also want to look at FC++, recently announced in comp.lang.c++.moderated:
which points to the FC++ home page, a FAQ, and a couple of papers:
I haven't tried it out yet, but the papers are well-written and make it sound pretty cool.

water - Re: The lambda C++ library  blueArrow
12/18/2000; 7:33:45 PM (reads: 1324, responses: 0)
Also I recommend the relatively expensive but interesting book "A Functional Pattern System for Object-Oriented Design" at published in 1999 (yes, I've read my copy several times), although C++ has to be the most difficult "OO" language to implement these in. Note that you can implement GC semantics in C++, although a good implementation is lacking, save for the Boehm(sp?) GC.

Chris Rathman - Re: The lambda C++ library  blueArrow
12/25/2000; 8:26:44 PM (reads: 1324, responses: 0)
Some five years ago, I wrote some software that translated RPG code to Visual Basic (one of these days I'm gonna try to get our company to GPL the software since it is a dead project). Anyhow, in that process, I looked at a competitors product that converted from RPG to C.

For some reason, this reminds me of the Lambda C++ library. What they did was to convert all the RPG code into similar functions in C - RPG_MOVE(1, IND1). Although they technically accomplished a translation, the code thus generated tended to be a language within a language. It was like creating wholesale functions in C that did little more than mimic the RPG instruction set and cycle.

I'll be the first to admit that their product was much more commercially successful than my works, but I always felt that the code they produced was not successful in terms of conversion - only in terms of make the RPG code run inside of a C compilation engine. The generated code looked more like RPG than it did C. From a programming perspective, it was not really C code.

For some odd reason, I get the same sense with attempts to use Lambda functions in C++ templates. The code may compile in C++, but it really is a language being embedded within C++. It may be technically feasible, but it makes for a rather hard effort in trying to work with a Lambda language that happens to operate within the syntax of C++.

Ehud Lamm - Re: The lambda C++ library  blueArrow
12/26/2000; 5:26:55 AM (reads: 1307, responses: 0)
Some people find the language within a language approach all the rage, se Lisp and "stratified design."

Of course, without notation you lose the elegance.