December 2006 Entries

IIF, a True Ternary Operator and Backwards Compatibility

One of the things we've been discussing for VB 9.0 is adding a true ternary operator to the language. It's been a persistent source of annoyance for myself (and many others, to judge from suggestions and complaints we've gotten over the years) that there is no short-circuiting conditional expression operator in the language. True, there's the IIF method which does most of what you want, but it doesn't short-circuit. If you evaluate "IIF(x Is Nothing, 10, x.Foo())" and x is Nothing, then you'll get an exception because we always evaluate all of the arguments of a method call (since IIF...

VB 2005 SP1 is released...

In case you missed the announcement, VS 2005 SP1 is released. You can get it here. Beta support for Vista coming soon!

Language Specification: Useful? Not?

Random question for people: how many people out there actually ever look at the VB language specification? The original purpose of writing the language specification was purely for internal use, done so we'd have a reasonably authoritative explanation of the language aside from "whatever the compiler does" and "whatever MSDN happens to say." And to have a place where historical thinking could be preserved for future generations of VB team members, so there'd be some chance in hell that we could avoid making the same mistakes twice. But how useful is it for the public? Not that much, I would...

Lambda expressions, Part II: Closures

Well, I'm glad to see that even with my writer's block, people still seem to be reading the blog! Although there is definitely a diversity of opinion, the majority of people seem to prefer the "Function" syntax of the choices I laid out, which is not exactly what we expected. (We were wagering people would go for the more cryptic, compact syntax. Shows what we know...) That's the syntax you should expect to see in the beta, and if public opinion shifts over time in the beta, we'll deal with that feedback if and when we come to it. After...

Lambda expressions, Part I: Syntax

As I alluded to in my earlier entry, one of the features we're working on for LINQ/Orcas is lambda expressions. Now, I might be tempted to say "You know, we should really call them 'inline functions' instead of 'lambda expressions,' because I think 'inline function' is a little clearer and less of a computer science-y term." but you can rest assured that I learned my lesson. Lambda expressions they are. (Do you detect a trace of bitter sarcasm there? Perhaps just a little.) For those not well versed in the arcana of the lambda calculus, a lambda expression is, uh,...

Sometimes you forget you're not the only one...

One of the teams I've been spending a lot of time talking to lately is the folks over in the CLR who bring you IronPython. Overall, it's been a very enjoyable experience, as they're a smart bunch of guys who have a lot of experience with building dynamic languages and libraries and such. One of the unexpected benefits, though, has been psychological. After spending the past nine years interacting mostly with languages that were derived from C, it's amazingly refreshing to talk to people who work in a language that has more of a cultural affinity with our own language. After all, if the...

Writer's block...?

Just for fun, as I was starting at the "Archives" in the left pane started working out what my "post per month" average was per year. It comes out to: 2003: 19.6 PPM (only 6 months of the year, though)2004: 12.3 PPM2005: 9.3 PPM2006: 4.9 PPM (only 11 months so far) As you can see, my average has dropped precipitously this year and I'm in danger of getting awfully close to zero next year if things continue as they have been. The real question is: why has my posting average gone down so much? I mean, I'm not surprised that...