Something more succinct than Function ?
Posted
Sat, Feb 23 2008 12:41
by
bill
I really dislike VB's inline Function syntax... it's incredibly verbose. When they were looking at it, I suggested Func, but given that usage in the framework that would be confusing. (I hadn't seen the Func(Of T,...) delegates at that time ) I would still like something more succinct. I'm wondering if we couldn't have something like if you type f( and press tab or hit space, that get's changed (similar to a snippet) to ƒ(
That is, why not use ALT+0131 if we can make it easy for users to add via IDE auto-modification. So instead of :
Dim cust = customers.Where(Function(c) c.FirstName = "Smith")._
Select(Function(c) c.FirstName & " " & c.LastName)
you'd have :
Dim cust = customers.Where(ƒ(c) c.FirstName = "Smith")._
Select(ƒ(c) c.FirstName & " " & c.LastName)