Share via


Req5: unsafe and pointer support

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

 

IDEA: "unsafe" and pointer support. VB should support unsafe programming, like C#, with pointers and all that.

SCENARIO: Pointer support is useful for people who write marshallers and operating systems and device-drivers. It's also useful for people who want to operate on memory-buffers that they get from the operate system but without any copying involved.

 

Provisional evaluation from VB team: None of them feel like they're mainstream .NETish or VBish (or C#ish even). It would be a shame to twist the language as much as this would require, just to let it cover a small additional niche.

Comments

  • Anonymous
    February 15, 2010
    I have to admit that I have no desire for this – it seems like it wouldn’t add to the language. I don’t use pointers in C# either, it’s easier to use C++ in the rare case where I need to do some low-level programming.  

  • Anonymous
    February 18, 2010
    This is something I've been asking for since VB 8.0. Adding unsafe code support would shorted the differences with C# greatly and allow for a lot of C# code to be ported over to VB. If Visual Studio would be able to nicely manage C# and VB code together inside the same project I'd have less interest for this tho.

  • Anonymous
    March 06, 2010
    The comment has been removed

  • Anonymous
    March 31, 2010
    Since when are pointers a niche? Pointers can cause problems, but they are also very powerful. Even VB6 had a limited (undocumented) way of using pointers. The fact that most VB programmers have no need for pointers, is caused by the fact that everyone who needs them do not want to use VB, just because VB doesn't support pointers.