Stories
Slash Boxes
Comments

SoylentNews is people

posted by martyb on Sunday February 05 2017, @08:41AM   Printer-friendly
from the watch-your-language! dept.

Since their introduction in 2002, Microsoft's pair of .NET programming languages, C# and Visual Basic.NET, have been close siblings. Although they look very different—one uses C-style braces, brackets, and lots of symbols, whereas the other looks a great deal more like English—their features have, for the most part, been very similar. This strategy was formalized in 2010, with Microsoft planning coevolution, to keep them if not identical then at least very similar in capability.

But the two languages have rather different audiences, and Microsoft has decided to change its development approach. The company has made two key findings. First, drawing on the annual Stack Overflow developer survey, it's clear that C# is popular among developers, whereas Visual Basic is not. This may not be indicative of a particular dislike for Visual Basic per se—there's likely to be a good proportion within that group who'd simply like to consolidate on a single language at their workplace—but is clearly a concern for the language's development.

Second, however, Microsoft has seen that Visual Basic has twice the share of new developers in Visual Studio as it does of all developers. This could indicate that Visual Basic is seen or promoted as an ideal beginners' language; it might also mean that programmers graduating from Visual Basic for Applications (VBA) macros in programs such as Word, Access, and Excel are picking the option that is superficially most comfortable for them. Visual Basic developers are generally creating business applications using WinForms, or occasionally ASP.NET Web Forms; the use of WinForms in particular again suggests that developers are seeking something similar to Office macros.

Accordingly, the development of the two languages is set to diverge. C# is going to continue to pick up more complex features. C# 7.0, for example, is adding integrated support for tuples and pattern matching syntax, the latest language features showing significant influence from functional programming languages like ML and Haskell. Visual Basic 15 is adding some of these, such as tuples, but it isn't going to match every new feature in C# 7.0. Going forward, it will be maintaining readability and keeping the number of different concepts manageable.

Source:

https://arstechnica.com/information-technology/2017/02/microsofts-developer-strategy-c-for-fancy-features-visual-basic-for-beginners/


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 0) by Anonymous Coward on Sunday February 05 2017, @04:47PM

    by Anonymous Coward on Sunday February 05 2017, @04:47PM (#463135)

    I know it's cool to crap on VB but VB.NET compiles to the same byte-code that C# does. If you can get the job done in a reasonable fashion with VB.NET, there is no reason not to use it over C#.

  • (Score: 0) by Anonymous Coward on Sunday February 05 2017, @07:16PM

    by Anonymous Coward on Sunday February 05 2017, @07:16PM (#463157)

    VB has some nice things over C#. For one, the type name comes after the variable name, not before. That's more logical and natural in my opinion. Second, the switch/case statement is better in VB, no Break needed, and set lists allowed. Third, one has to use the Shift key less in VB. My fingers are getting old, go nice on them.

    • (Score: 2) by jimtheowl on Monday February 06 2017, @12:30AM

      by jimtheowl (5929) on Monday February 06 2017, @12:30AM (#463238)
      "The type name comes after the variable name, not before"

      Wow.

      To be fair, I will presume that you know that just because you are used to something being a certain way, it doesn't necessarily make it better.

      Not that I care for C#, but why would you have to use to Shift key more?
      • (Score: 0) by Anonymous Coward on Monday February 06 2017, @07:05AM

        by Anonymous Coward on Monday February 06 2017, @07:05AM (#463342)

        No, the variable name is more important than the type.

        • (Score: 2) by jimtheowl on Monday February 06 2017, @03:07PM

          by jimtheowl (5929) on Monday February 06 2017, @03:07PM (#463441)
          Importance is not relevant in laying out the enumeration order.

          The program is more important than the variable declarations, yet one declares the variable first so we can read the program with some established knowledge.

          In the same way, one establishes the type of the variables to be enumerated.

          ie: int x, y, loop, rval;

          There is nothing wrong about that except lack of familiarity due to programming only in BASIC.
          • (Score: 0) by Anonymous Coward on Tuesday February 07 2017, @02:25AM

            by Anonymous Coward on Tuesday February 07 2017, @02:25AM (#463848)

            You seem to be mixing up 2 different problems. (Whether the second one is really a problem is another topic.) The order is for human readers, not the computer. The computer (compiler/interpreter) doesn't really care, as long as the rules of where to find stuff is clear.

            I've used both and find variable-first easier to read/digest/grok. If you have a different personal preference, so be it. People vary.

            • (Score: 0) by Anonymous Coward on Thursday February 09 2017, @06:33AM

              by Anonymous Coward on Thursday February 09 2017, @06:33AM (#464897)

              Addendum

              The main reason var-first is better is that it creates more of a columnar layout so that the one can scan the "variable" column or the "type" column with their eyes. This is largely because type length varies more than variable length, and least using my typical naming conventions. Example:

              // var first
              aaaa bbbbbbbb
              cccccccc dddddddddddddddddddd
              eeeee ffff
              gggggg hhhhhhhhhhhh
               
              // type first
              bbbbbbbb aaaa
              ddddddddddddddddd cccccccc
              ffff eeeee
              hhhhhhhhhhhh gggggg

              In the first, the "columns" are lined up better. They are more helter-skelter in the second.

  • (Score: 2) by jimtheowl on Sunday February 05 2017, @09:40PM

    by jimtheowl (5929) on Sunday February 05 2017, @09:40PM (#463191)
    VB4 compiles to the same hardware binary code as C++. The relevant part is that the source has to be maintained, and the VB syntax has been changing over time on a whim.

    I woudn't crap over VB because it is cool, but because it has hurt me and people that I know.
    • (Score: 1) by Ethanol-fueled on Sunday February 05 2017, @10:43PM

      by Ethanol-fueled (2792) on Sunday February 05 2017, @10:43PM (#463208) Homepage

      There is disturbingly high amounts of VB deployed as production code throughout San Diego, in some pretty big names and in scientific applications.

      I think it's an ugly language and a band-aid fix and should be ported to C# or perhaps a real programming language, but still believe it should be taught just because it's fucking everywhere -- in fact, in my experience, moreso than even Python.

      That's because industry are cheap-ass motherfuckers and aren't willing to spend the pennies on expensive employees to do anything other than barebones maintenance on code written 30 years ago.

      • (Score: 2) by jimtheowl on Sunday February 05 2017, @11:56PM

        by jimtheowl (5929) on Sunday February 05 2017, @11:56PM (#463227)
        Basic used to be of interest because one could power up a machine and it would be available instantaniously from ROM.

        It used to live up to its name.

        Now one has to install it, load it whenever you feel the itch to program you still have to put up with the the IDE turned into big brother.

        No - It doesn't need to be taught at all.

        Nevertheless, if one does it on an Apple II or C64, it may spawn an idea in a young bright mind similar to "why was something working so well got so bad and how do we bring it back?"

        To learn VB today because its all around is like spreading more cancer.
  • (Score: 0) by Anonymous Coward on Monday February 06 2017, @10:56AM

    by Anonymous Coward on Monday February 06 2017, @10:56AM (#463380)

    I use this: https://msdn.microsoft.com/en-us/library/microsoft.visualbasic.logging.log.aspx [microsoft.com]

    Works in C# too but it's interesting that this stuff is in the VB area and not something like Microsoft.System.Logging. Don't C# programmers ever need to log stuff?