Typeless expressions (Lucian Wischik)

Typeless expressions (Lucian Wischik)

  • Comments 1

"My dog has no type."
"How does he smell?"
"Awful!"

Two of the new features of VB10 -- array literals and multi-line lambdas -- are interesting from the language perspective because their expressions have no type! This article is for language lawyers. I remember at my very first undergraduate computer science lecture, the lecturer Frank King handed out the class list and asked for corrections. One student raised his hand, apologized for being pedantic, and said that his name had an "å" with a ring above it, not a plain "a". Dr King praised him for the correction, saying "computer science needs pedants".

On my personal blog I've written in detail about the VB expressions that have no type: Nothing, Lambdas, Array Literals, AddressOf and CallsToSubs. To be pedantic, we're not talking about "Option Strict Off". We're talking about strongly-typed VB, with Option Strict On, and about which type the compiler picks for these expressions. Answer: it depends on the context they're in...

Leave a Comment
  • Please add 5 and 8 and type the answer here:
  • Post