r/dotnet • u/ben_a_adams • Nov 13 '18
Visual Basic in .NET Core 3.0
https://blogs.msdn.microsoft.com/vbteam/2018/11/12/visual-basic-in-net-core-3-0/5
Nov 13 '18
I'm surprised noone has said anything complain ing about VBA in stuff like Word... (it's like VB but just as bad)
7
Nov 14 '18
The Excel team did an AMA the other day, and I seem to recall a few complaints. :-) (Mostly people wanting to see Python support).
Given how widely used VBA is, it baffles me that the VBA editor in Excel hasn't had any changes in over 20 years other than the addition of long data types.
4
Nov 14 '18
You can write add-ons in JavaScript for Excel these days, interestingly.
4
Nov 14 '18
Unfortunately, the JavaScript Office object model is still pretty limited, though.
5
u/Sebazzz91 Nov 14 '18
Not only that, internally it launches the Internet Explorer web host to execute the javascript. It is really super limited.
19
u/Apk07 Nov 13 '18
I love VB and will never understand the hate it garners from C# evangelists. C# is good, too, but preferring C# doesn't justify demonizing VB.
Regardless, I'm happy they're actually treating it as a "first class citizen" as they wrote.
8
u/stun Nov 13 '18
VB is treated as PHP in the .NET world.
4
u/ModernTenshi04 Nov 14 '18
Recently took over as maintainer of a site with several others. Current site is written in PHP, and we're planning to overhaul it to .Net Core.
So, yeah, pretty much.
-10
Nov 14 '18
Carefulllllll
.NET is excellent for large websites, but small websites can't justify the performance detriment of the CLR. The same goes for Java.
8
7
Nov 14 '18
[removed] — view removed comment
-1
Nov 14 '18
I personally owned a Windows shared hosting server catering to ASP.NET on the .NET Framework 3.5. It was extremely slow. I then transferred to a Linux hosted server catering to your traditional LAMP setup and gained a massive performance enhancement, especially after I rewrote my back-end in PHP.
Like I said, .NET and Java are great for large websites that need the ability to scale, but their overhead is woefully large on small websites like mine that a server-side scripting language would be much more efficient for (assuming you aren't writing a game, or something).
3
u/jayrulez Nov 15 '18
ASP.NET on the .NET Framework 3.5 is not ASP.NET Core on .NET Core.
From actual usage as well as benchmarks, dotnet core is faster than PHP for pretty much everything.
3
Nov 14 '18
[removed] — view removed comment
0
Nov 14 '18
Different languages have different runtimes. These different runtimes contribute to the over all performance of the language by ways of their garbage collector routines, dynamic code management, stack tracing, and debugging tools. These tools are always present when programs are executing on that runtime. Without the runtime, the code doesn't run (in the case of JavaScript, Java, .NET).
This is why you don't see C# or Java used for embedded as much as C++ or C. The virtual machine (read: emulated computer) they run on, the CLR and JVM, respectively, are quite heavy. C++ and C require minimal runtime assistance because they run natively on the machine.
Now in the case of PHP vs. C#, PHP is an interpreted language which is handled by its own runtime. The key difference here is that simple language = simple runtime. You end up with a situation where for small deployments, PHP actually outperforms C# by not bogging down the host machine with its runtime.
However, as deployments get larger, the overhead of the CLR becomes less important, and the speed of C# over PHP begins to shine.
This is computer science in a nutshell. The science of trade-offs. All tools and languages have their place.
3
u/jayrulez Nov 15 '18
Um... Just no!
You try to sound like you know what you are talking about but what you are saying seems to be coming from gut feelings instead of actual experience and knowledge.
Now in the case of PHP vs. C#, PHP is an interpreted language which is handled by its own runtime. The key difference here is that simple language = simple runtime. You end up with a situation where for small deployments, PHP actually outperforms C# by not bogging down the host machine with its runtime.
False.
The complexity of a runtime does not directly relate to its performance.
Have a look here: https://www.peachpie.io
PHP on .NET runs faster than your standard PHP implementation.
I actually migrated a Symfony to .NET Core 1.0 a while ago. We did lots of bench marks before even attempting it. .NET Core at the time already outperformed PHP. It has gotten a lot better since then. Said application is currently running on the latest ASP.NET Core with zero performance issues.
10
u/hokie_high Nov 13 '18 edited Nov 13 '18
I hated VB long before I ever even looked at C# just based on seeing ancient code at my first real job. Subjective of course, but it's full of weird shit like the
Dimkeyword, and it has awful syntax. I tend to despise any language that uses words to wrap scopes instead of curly brackets. If you're not going to use brackets then just go full Python and use nothing, but enforce whitespace in the syntax.There's plenty of other things people don't like about the language itself but VB has a reputation of being a language non-programmers learned out of necessity rather than a desire to actually be a competent programmer, so shitty legacy dumpster fire code bases full of MyVar1, MyVar2... MyVarX crammed into a single source file in a project called WindowsApp1 has become a VB meme.
1
u/cwbrandsma Nov 13 '18
All of my main languages are C syntax languages (C#, Swift, Kotlin, JavaScript). So, we have { } instead of begin and end. So it is easier to setup common style guides between languages, which leads to easier migration. C# also tends to be less verbose and just as clear. VB has a few niceties as well.
Granted, I've worked in VB4, VB5, VB6, and even VBScript. They all left a bad taste in my mouth, especially after I switched to Delphi (which was vastly more capable than VB6, and much easier to use than C++).
So when C# and VB.net both came out, I really didn't want to go back to VB.
0
Nov 13 '18
[deleted]
12
u/_pupil_ Nov 13 '18
It's as simple as this: if you're a talented developer who is learning .net, even coming from VB5, why bother learning VB.Net?
I mean... it's roughly comparable in terms of language, but with a larger market share, more similarities to Java, more examples, and a larger community (IIRC), on the C# side. There's simply no reason, outside of familiarity, to invest your time and energy there.
Especially given how readily VB.Net libraries can be consumed by C# libraries, there just isn't a lot of motivation to stay on it over time if you or your team are on top of your game.
7
u/hokie_high Nov 14 '18
My feeling is that VB is sticking around for the same type of people who benefited from it in pre-.NET days. It allegedly has a simple syntax and a non-programmer can be productive with it in a Windows environment very quickly. You can learn it while skipping a lot of programming 101 concepts.
Obviously this mindset is horrible for shared/production code and that leads to a lot of people hating it, including myself. And I say “allegedly” above because I think the syntax is shit and much more convoluted than languages closer to C, but I’ve been programming since age 10 and grew up learning that stuff, it’s impossible for me to see these things the way a new programmer from an entirely different background sees them.
17
7
u/hopfield Nov 14 '18
So they drop legacy ASP.NET compatibility on .NET Core but they keep Visual Basic limping along? Is there someone in charge at Microsoft because this makes no sense. I thought .NET Core was supposed to be a streamlined, rethought version of .NET with modern best practices applied and legacy cruft removed.
7
u/1s4c Nov 14 '18
It's basically just about the compiler. Visual Basic .NET is compiled to the same CIL as C#. It doesn't really matter for the runtime what kind of language you used to write your program. You can run PHP and tons of other languages on .NET runtime if you have compiler for them.
2
u/derekmckinnon Nov 13 '18
VB.NET (2005) was the first programming language I learned, so it has somewhat of a special place in my heart. But I definitely never want to go back to using it full time. It’s just so esoteric feeling and verbose compared to C#. Unfortunately, I still occasionally deal with VB6 legacy garbage to this day...why anyone would prefer any VB flavour to C# is puzzling to me, but to each his own
1
2
u/iso3200 Nov 13 '18
Visual Basic 16.1 and 16.2 will improve C# interop
Can someone please explain to me what this means. Why interop with C# when you can just write in C# in the first place. Want to write C#? Just create a C# class library and reference from the VB.NET project, right?
8
Nov 13 '18
You might have old working code in VB.Net, and want to add new code in C#?
Why rewrite the old stuff if it works?
1
Nov 17 '18
[removed] — view removed comment
1
u/Wolven_1 Mar 12 '19
Really? How? Since they both are converted to the same CIL, how would rewriting it in C# make it "work better"? Are the 0's & 1's compiled from CIL which was converted from C# somehow special 0's & 1's?
1
u/throwaway_lunchtime Nov 14 '18
This is a pretty strong statement about sun-setting the full framework.
1
u/softwareguy74 Nov 15 '18
Why?
-1
u/Ronald_Me Nov 15 '18
Why not?
2
u/softwareguy74 Nov 15 '18
But why?
Who the hell in their right mind would build anything new in VB?
1
u/Wolven_1 Mar 07 '19
Anyone that doesn't like typing\seeing f%^&ing curly braces everywhere... for one.
1
u/softwareguy74 Mar 11 '19
So you'd rather type "Then" and "End" in an If statement than a single curly brace?
1
5
61
u/[deleted] Nov 13 '18
Visual Basic is good for working out which jobs not to apply for. ;)