Stefan Tilkov's Random Stuff

Code and Data in C# and Scheme

Great post by Don Box — if C#’s syntax were a little less ugly, this would actually be very elegant.

Comments

On May 12, 2006 6:31 PM, Marc Brooks said:

I hate the syntax of the lambda expression too… why can’t we use a function-syntax like would be used in C# 2.0? Something akin to:

with(var e) { return e + 5; } // or lambda(var e) { return e + 5; }

would be much clearer than:

e => e + 5

On May 12, 2006 8:11 PM, Stefan Tilkov said:

Actually, I object to that part of the syntax included due to its C heritage :-)

(Not entirely serious; I understand why so many languages have adopted the rather strange C conventions, C++, C# and Java included. But mixing in more and more idioms from other languages certainly doesn’t make it any prettier …)