Lambdas

Just right now I’ve added a syntax for lambda expressions:

// XieXie
lambda bool(int a, int b) { ret a < b }

// C++
[&](int a, int b) -> bool { return a < b; }

For XieXie I simplified the feature set of lambdas by always using automatic variable capturing (with the ‘[&]‘ C++ syntax).

In XieXie I’m using lots of different keywords. In contrast to C++, where keywords are massive overloaded – such as the ‘const’ keyword.
I think this helps for the readability.

Leave a Reply