There've been one or two instances where I thought a lambda in C might be useful. In general, however, any operation that requires a lambda is better suited for higher level language anyway.
Name:
Anonymous2013-07-17 0:14
Just use C++11. Use it as a C with lambdas and closures.
rusty rails can cause a train to go off track and cause massive destruction
Name:
Anonymous2013-07-17 3:55
>>14,15
Someone needs to make a rails equivalent library for Rust just so we can have this pun.
Name:
Anonymous2013-07-17 4:02
>>11
Wrong GCC has supported them since 4.5. Clang/LLVM has supported them since 3.1. MSVC++ has supported them since MSVC++ 2010. Intel C++ has supported them since Intel C++ 10.0.
>>11
If you download the latest Clang binaries and compile the latest clang libc++ (easy to do), you can have pretty much ~100% of C++11 compatibility. I have it running right now on a Linux box while using STROUSTRUP C++11 book.
The GCC compiler is C++11 compatible itself but the GNU's libstdc++ is still far away from clang libc++. And I've heard that Visual C++ supports it ~100% too.
>>20
LLVM bytecode is only used as a intermediate step. My binaries are full native.
Clang is the superior compiler.
Name:
Anonymous2013-07-17 10:35
>>21
How is it coming along now? Do you know if it will compile a modern GNU+Linux system? Last time I tried compiling GNU and Linux using Clang six years ago, it didn't work completely.
>>26 Cello projects is inspired by Haskell
It much closer resembles the design of the Go or Haskell standard libraries.
love how this retard says "Haskell" like it is some magic word
int main()
{
State_1 s1;
int a[256];
int a_end = 0;
const char* b = "hello";
a[a_end++] = 1;
a[a_end++] = 2;
s1.a = &a;
s1.a_end = &a_end;
s1.b = &b;
return 0;
}
These do exactly the same thing. The real difference is that C does it about 120 times faster.
In terms of code length, Ruby is slightly better. However, considering performance issues, it's hardly worth it. In real world, typing those extra letters takes practically zero time compared to the time that is spent designing higher level structures.
To answer to your question: I don't think it would be horrible abomination. However, I thing it closures are not needed in C. They bring more float to a language that is right now simple and elegant.
If you want lambdas so desperately, go try C++11. Let's see how happy you are then. HAH. Enjoy your bloat.
>>33 In real world, typing those extra letters takes practically zero time compared to the time that is spent designing higher level structures.
Using a proper text editor (such as ed or emacs), it does not take much time at all to type this sort of stuff out (abbrevations et cetera).
Typed with emacs
Name:
Anonymous2013-07-18 22:59
>>37
Well, emacs is ok. In some cases it's even better than ed. But it's not standard. So I think it's just better to use ed.