VB 10 thoughts …

Paul Vick has started the conversation about VB 10 features and thoughts.  Off the top of my head in no particular order here’s some things I’d like to see in the language:

  1. complete Optional parameters
    Optional parameters are one of my favorite features but there’s a couple of problems with them. First you can’t overload by only optional parameters, so it’s hard to impossible do any versioning with them. And second, you aren’t allowed to specify the default value for Structures other than the intrinsic ones. I think both these fixes are reasonably easy and allow for optional parameters to be used as a real code simplification. Sadly too often we see a set of overloads that don’t indicate what the other parameter values are, and make the choice of values passed to constructors limited. Optional parameters are great in these situations.
  2. dynamic identifiers, interfaces and operators
    a nice way to call methods, indicating the the call is dynamic (“latebound”) including truely dynamic methods where the method name is not supplied till runtime (e.g. CallByName), duck typing, and a way to mark standard operators as being dynamic, e.g ~+, ~= etc, would truly provide strict typing where needed and dynamic typing where needed.
  3. pointer support
    There really should be no reason for VB not to be able to do pointer operations.
  4. inline comments
  5. improvements in casting
    First I’d really like DirectCast to have an alias of Cast. DirectCast is ridiculously verbose.
    Second, instead of writing x = Cast(y, z).somemethod , I’d like to have the code flow more forward rather than having to decided up front to cast y you could continue the flow from y,e.g x = y.CastTo(z).somemethod.  You could probably achieve this with extension methods.
  6. multi-statement Lambdas
  7. iterators
    although LINQ statements where possible are preferable

There’s a lot of other thins I’d like to see, but most of them involve the IDE so I’ll follow up on some of them in other posts. I wonder what other folks would like to see in the language ??

Comments are closed.

Recent Comments