by codeflo · 3y ago · 0 comments
Please don't. I don't mind Microsoft pushing .NET languages, that's sort of expected, but why VB? Getting started with modern Visual Basic isn't actually all that much easier than with C# -- both target the .NET runtime, and the deeper semantics are actually largely the same. And C# is infinitely more relevant in the job market.
It's just like many of us picked up PHP in the early 2000s. Then we went to Ruby in 2007. Now we are in Go or Rust or something else.
Any kind of coding is good coding.
You read a bit much into my comment. My point is just: If two languages are largely equivalent in terms of difficulty and ecosystem, why pick the more obscure one? That's not "hate".
> Any kind of coding is good coding.
Any kind of coding is better than no coding, but that doesn't mean you can't make distinctions. I simply don't see a point in making learners later lives more difficult for no obvious pedagogic benefit.
So given they're approximately the same level of syntactical difficulty to learn (for equivalent amounts of power), why choose the more restrictive and esoteric one?
It's not that VB.NET is a bad or useless language. It's just a very different language than the common modern multi-paradigm ones. Which isn't great for career progression.
Side note: VB.NET's anonymous function shoehorning is syntactically atrocious: https://stackoverflow.com/a/6091579
Fair enough. Thanks for the explanation.
For learning / academic stuff; it doesn't matter.
In the professional world, what happens is that someone, who generally is less experienced than the rest of the team, shows up mixes Visual Basic into a world of C#. It turns into a smell that something isn't right here; because usually the Visual Basic parts are loaded with novice mistakes; because the rest of the team didn't review the code closely enough while it was being written.
The problem isn't the language; the problem is how a team integrates newcomers and mentors them.
As such, it matters less whether it is a good, expressive, easy to use language than that there are so many other better options.
Now… it’s not easy to get many languages running on Windows. While on Unix you get Python for free in a base install (with some rare exceptions), Windows require some extra steps novices may have trouble with.
https://apps.microsoft.com/store/detail/python-311/9NRWMJP37...
I've finally shifted all my projects to C# only because support for VB.Net is sadly waning.
Flip power switch, wait 2 seconds for the READY prompt.
10 PRINT "HELLO WORLD"
20 GOTO 10
RUN
I'm pretty sure that started an era of programmers, curious would else you could do than just type LOAD "*",8,1It’s never been the best language but also nowhere near the worst. Modern versions of it are at least decent and arguably better than more popular languages like PHP.
Going from Small Basic to VB.NET makes sense if the syntax is familiar but it allows you to move to move to a more professional and full feature environment. The difference between VB.NET and C# is largely syntactical so, once on VB.NET, getting to C# is a pretty easy journey.
There may be some value in this profession for early programmers as they can gently see how languages are both very similar but also different in important ways. The idea that the syntax is not the most important difference is valuable in itself.
For educational purposes, being able to say "we've eliminated a bunch of tarpits" is a good thing.
On the other hand, I wouldn't discount the syntax differences as a real pain point, once you've walked past the 200-level CS class that shows "look, here's LISP and Prolog and Assembler and they're all Turing complete and can solve the same problem." We get it, the syntax doesn't matter, but familiarity does.
There's no doubt a lot of friction and productivity cost when you take a experienced programmer who's worked on language A and drop them in language B-- even if they know what they want algorithmically, they're going to spend a lot of time stubbing their toe over syntactic differences. In the worst case, I could see them making worse code because they choose the easiest/most documented approaches rather than having to figure out how to express exactly what they want.
It's interesting there's little tooling to support that use case. Given that (originally, who knows now?) C# and VB.NET were supposed to be more or less isomorphic, I could imagine an IDE extension that dynamically transpiled either language to the other for display and editing, and then converting the changes back to the "official" project language when ready to share the code. It could be used as anything from a training tool (flip back and forth to see how this construct maps between the languages) to a crutch (I don't know how to express XYZ in C#, transpile it for me)
If you look at the auto-generated VB.NET code, it’s very close to the Small Basic code, with the addition of a variable declaration. This variable is of a magic, SB-specific `Primitive` type that is a string, a decimal, and a dictionary at the same time. Generating it was probably easier than translating to C# and introducing real (static) types.
VB.Net lets an amateur achieve something quickly, with a UI! In my oppinion the most important thing a first language needs is very easy and quick UI tools. Prior to ASP/VB(script) I could code html, so it was super quick to get something on screen.
Are there flaws with VB, yes, but it's almost the perfect first "proper" language.
The lack of VB code examples on learn.microsoft.com was always a problem.
But that's fixed now that ChatGTP is writing all the code for us. /s