VB 10 thoughts (part 6)
- 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. - 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()
- Range Expressions
It’d be nice to be able to write
If 50 < x <= 100 Then - 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 \NewRootNamespaceas long as there is a way to do it 🙂
#24
Is there a reason why
New Thread(AddressOf bar).Start()
doesn’t/can’t work?
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
#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()