3 ms·
The ^ is already taken in context of "C lambdas" though (hoping that if C ever gets lambdas it will simply adopt clang blocks instead of a C++ like syntax): ht
by flohofwoe 6y ago
The ^ is already taken in context of "C lambdas" though (hoping that if C ever gets lambdas it will simply adopt clang blocks instead of a C++ like syntax):
https://clang.llvm.org/docs/BlockLanguageSpec.html https://clang.llvm.org/docs/BlockLanguageSpec.html
- apankrat 6y agoAye, I've seen that. IMO it would've been better (read, cleaner) to merge lambdas and function pointers into a single language construct. Throw in the partial application too and we'd be have a natively supported concept of a "callable" instance - void foo(int tick); void bar(int tick, int tock); void do_something( void (* progress)(int tick) ); do_something( foo ); do_something( bar(,1) ); do_something( void (int tick) { /* lambda */ } ); The syntax is approximate, but for the code that is using callback-based flows this would've been very handy.