Req19: Allow statements to start with parentheses


[This post is part of a series, “wish-list for future versions of VB“]


 


IDEA: Allow statements to start with parentheses. Currently, every statement in VB must start with either an identifier or a keyword. We should allow statements to start with arbitrary expressions. At the very least, starting with “open parentheses” would be good. It would mean that we’d no longer need “Call” in the following statement:


        Call (New Threading.Thread(AddressOf ThreadProc)).Start()


 


Provisional evaluation from VB team: It’d be a surprisingly big change to the parser code to implement this! We see that it would be useful, but don’t believe it would be worth the effort to fix.

Comments (3)

  1. Kevin Ryall says:

    It’s hardly worth changing if it’s difficult to do so – having to include the ‘Call’ keyword isn’t a big deal.

  2. weitzhandler says:

    Actually I've just bumped into a case where the 'Call' keyword I would almost vote to remove it from road…

    And now realizing that there is a simple workaround (or call it whatever you want) to this thing that exists in C#, and didn't know how to do it inline, I always had to create a variable.

  3. weitzhandler says:

    Actually I've just bumped into a case where the 'Call' keyword I would almost vote to remove it from road…

    And now realizing that there is a simple workaround (or call it whatever you want) to this thing that exists in C#, and didn't know how to do it inline, I always had to create a variable.