News for hackers. Stuff that matters.
Re:The .NET Language Strategy by jackmott on Wednesday February 01, 2017 @05:40PM (#13546130)
I think they should quit with VB support not because there is anything wrong with it, but because it is, now, identical to C#. It is just C# with words replaced. This is nonsense.

I would donate many beers if they halted all VB work and put those guys and gals on F#!

Re:The .NET Language Strategy by AnthonyDGreen on Wednesday February 01, 2017 @06:02PM (#13546300)
It never was and never will be identical to C#. They share a lot but there are hundreds if not thousands of subtle differences between the two. It's just easier for people to 'think' that VB is just C# with a search and replace because... that's a lot shorter to say. If you were to look at the compilers themselves or try to write a perfect automatic conversion tool you'll quickly see that far from identical.

For example, VB Select Case and C# switch work nothing like each other.

Re:The .NET Language Strategy by jug on Wednesday February 01, 2017 @06:52PM (#13546666)
Yes, they have a pretty dissimilar philosophy. XML Literals, different event handling/wiring, no need for event delegates, inline date declarations, explicit integer division operator, the Module concept, the My namespace, etc.
Re:The .NET Language Strategy by josteink on Thursday February 02, 2017 @03:19AM (#13548982)
> If you were to look at the compilers themselves or try to write a perfect automatic conversion tool you'll quickly see that far from identical.

There's so much truth in this.

Telerik has a online conversion tool[1] you can us, which can batch convert entire code-bases. But a 1-to-1 straight conversion cannot be done with 100% accuracy, and the tool will tell you everywhere it struggles to figure out the right C# equivalent for the corresponding VB.Net code.

I've used this tool in the past to "eliminate" the last remnants of VB-code in our organization. And when you do a job like that, on that scale, you definitely notice the differences.

A quick list of things you can expect to cause troubles (from memory and may not be 100% accurate):

- The difference in VB global/C# static semantics.

- The (default & overuse) of late-binding in a typical VB codebase. (While that wasn't an option for me back then, this can now be overcome by using "dynamic" everywhere, but that's hardly idiomatic C#)

- VB Modules can cause issues.

- For a full conversion, you'll typically have to rewrite all code using the functions and operands only found in the Microsoft.VisualBasic namespace. Not all these have straight up C#/BCL replacements.

Etc etc.

For being superficially so similar, a conversion job is actually much more work than you would typically imagine.

[1] http://converter.telerik.com/

Re:The .NET Language Strategy by averagewall on Thursday February 02, 2017 @07:01AM (#13549906)
Isn't Microsfot.VisualBasic just as much part of C# as it is VB or any other .Net language?

The rest of your points all sound like bad practice anyway so hopefully people are already avoiding them.

Re:The .NET Language Strategy by josteink on Thursday February 02, 2017 @01:15PM (#13552917)
> The rest of your points all sound like bad practice anyway so hopefully people are already avoiding them.

Welcome to the real world. I can tell you're new here :)

Re:The .NET Language Strategy by cm2187 on Wednesday February 01, 2017 @06:11PM (#13546378)
And until VS2013 the IDE was nothing like either. I think with VS2015 both have mostly converged but I must say it is a bit of a regression for the VB IDE.
Re:The .NET Language Strategy by MichaelGG on Wednesday February 01, 2017 @06:33PM (#13546541)
Hundreds or thousands of differences? Do you have a citation for that?
Re:The .NET Language Strategy by cm2187 on Wednesday February 01, 2017 @06:38PM (#13546563)
He is the program manager for VB...
Re:The .NET Language Strategy by MichaelGG on Wednesday February 01, 2017 @09:39PM (#13547617)
While I was/am a bit incredulous at the number I was hoping for some sort of list or summary. Just sounds like a lot.
Re:The .NET Language Strategy by Locke1689 on Thursday February 02, 2017 @03:31PM (#13554358)
Read the source for the compiler and find all the differences. There are constantly minor semantic changes, like numeric conversions, double parsing, scope of generated temps in for loops, delegate conversions, Nothing, etc.

I just started typing this list off the top of my head and every time I typed something out I could think of one more thing. And these are just the ones I remember, so they're probably the ones that were annoying to work around in the compiler.

Re:The .NET Language Strategy by wuzzard on Wednesday February 01, 2017 @06:54PM (#13546677)
Even so... with numbers like that we need proof!
Re:The .NET Language Strategy by btilly on Wednesday February 01, 2017 @06:00PM (#13546282)
As long as paying customers have legacy VB code, Microsoft has a very good reason to continue supporting VB.

Companies generally spend a lot more money maintaining legacy code than they do creating new code.

Re:The .NET Language Strategy by runjake on Wednesday February 01, 2017 @06:26PM (#13546487)
Legacy VB != VB.net. VB.net is just C# with the words replaced (although there are a few unique logic structures). Legacy VB code has to be ported to VB.net.
Re:The .NET Language Strategy by btilly on Wednesday February 01, 2017 @09:27PM (#13547573)
You should parse my statement as (legacy (VB code)) and not ((legacy VB) code).

At this point anything written in VB of any flavor is legacy. But it still needs to be supported. And as long as that is true, Microsoft has reason to support it.

Re:The .NET Language Strategy by Zardoz84 on Thursday February 02, 2017 @06:15AM (#13549692)
Or throw it to the trash and rewrite it
Re:The .NET Language Strategy by krylon on Thursday February 02, 2017 @07:32AM (#13550056)
In an ideal world, this would probably happen quite often, but on a large and complex code base, it also means throwing away the specific knowledge that might only exist in the heads of people who have already left the company, as well as throwing away the countless hours of debugging to get it working (even if "working" might mean "barely working").

From a management point of view, it means throwing away a large amount of money and then spending more money to replace the old code base, accompanied by the usual risk of whooshing deadlines and all that.

To a programmer it might be easy to see that a rewrite will save the company money in the long run, that can be difficult to sell.

Re:The .NET Language Strategy by madiathomas on Thursday February 02, 2017 @03:30AM (#13549011)
Existence of VB.NET doesn't bother me at all. I develop exclusively in C#.NET but there is a lot of VB.NET language features I wish were available in C#.NET.
Re:The .NET Language Strategy by krylon on Thursday February 02, 2017 @07:50AM (#13550141)
Never having touched VB.Net, that makes me kind of curios: Would you care to name a few of those features?
Re:The .NET Language Strategy by smoothdeveloper on Thursday February 02, 2017 @07:59AM (#13550195)
better type inference for anonymous functions, better type inference for instance members.

Another big feature is code layout being more compact and consistent than in C# codebases.

Re:The .NET Language Strategy by krylon on Thursday February 02, 2017 @12:39PM (#13552514)
Thanks!