VB 10 thoughts (part 6)

Posted Thu, Oct 11 2007 11:39 by bill
  1. Standardization

    IOSO or ECMA standardization, to allow fully open development and meet organizational and governmental requirements for open standards.  At present part of the language is under Patent protection, making it unclear for example if a third party provider can use the IsNot operator for example.

  2. start of a statement with ()'s

    Instead of having to create a temporary variable to start a thread:

    Dim th As New Thread(AddressOf bar)

    th.Start()


    be able to call it as such:

    (New Thread(AddressOf bar)).Start()



  3. Range Expressions

    It'd be nice to be able to write
        If 50 < x <= 100 Then


  4. Namespace escaping

    I like using VB's root project namespace features, but at times I'd like to change that for one particular class or set of classes in a project. The only way to do that at present is remove the default namespace for the project. Where it be:
    Namespace  Global.NewRootNamespace
    or:
    Namespace  ...NewRootNamespace
    or:
    Namespace  \NewRootNamespace

    as long as there is a way to do it :)
Filed under: , ,

Comments

# re: VB 10 thoughts (part 6)

Thursday, October 11, 2007 9:06 AM by HC

#24

Is there a reason why

 New Thread(AddressOf bar).Start()

doesn't/can't work?

# re: VB 10 thoughts (part 6)

Thursday, October 11, 2007 9:18 AM by bill

I think the arguement could be made that the compiler can resolve this in this case, but it might not alwasy be human readable. For example you could have :

New A.B

That'd be unclear if a method named B is being called, or B is a class inside namespace A (or class A) However with parenthesis, it is clear as to which it is:

(New A).B

# re: VB 10 thoughts (part 6)

Thursday, October 11, 2007 3:47 PM by Anthony D. Green, MCPD

#25, YES

#24, You won't get the intellisense support initially (it kicks in for the constructor, as I recall) but prefixing the line with Call works:

Call New Thread(AddressOf bar).Start()