dotnet / vblang

The home for design of the Visual Basic .NET programming language and runtime library.
288 stars 66 forks source link

VB6.NET! #323

Closed ghost closed 6 years ago

ghost commented 6 years ago

After reading this article in Visual Studio Magazine: https://visualstudiomagazine.com/articles/2018/06/26/tiobe-june.aspx I felt sad after I read this debate: https://www.quora.com/Is-anyone-still-using-Visual-Basic-Is-it-worth-learning-in-2018-Would-there-be-professional-jobs-for-Visual-Basic-programmers-in-2018-19-20 And I felt that Microsoft treats VB.NET unfairly twice: 1- Once when it broke all historical VB6 code in moving to VB.NET. I still have many VB6 projects that can't be upgraded to VB.NE and need a lot of work to do so. This made some VB6 programmers prefer to stick with it, refusing to move forward to VB.NET, while some others became C# programmers! 2- Once again when MS abandoned VB.NET when moving to .NET Core and new technologies. MS wants to focus on C# and F# to attract Java and PHP programmers, forgetting that VB.NET can easily attract new learners on Linux and OS that C# attracts experience programmers from other platforms!

Anyway, I have an Idea to fill the gab between VB6 and VB.NET: Create VB6.NET! This means: import VB6 compiler as a .NET language. Keep the same old syntax to open files, keep the Variant type , keep the old event handling syntax, keep enum syntax, keep all the old controls names, keep the old ADO and RDO.. etc. All this will be converted to IL using .net class library and Win Forms controls with some wrappers classes to give the API of the old controls. In short: any old VB6 code should be able to in .net as it is. This doesn't mean that VB6.NET can't have some of VB.NET capabilities, such as importing namespaces and using .NET Class Library, and having inheritance. This kind of work had to be done 16 years ago, and obviously it is still had to be done to save VB.NET by attracting VB6 lovers to .NET platform. In an open source world, if MS can announce this project, VB.NET programmers can participate to make it happen. The source code of VB6 compiler can help make things easier, not to do all things from scratch. I think it is a waste to let VB.NET, the top most high language ever, die because MS thinks that it has a fewer no of lovers, after it split them between two different languages sharing the prefix: Visual Basic! Lets call VB6 programmers to unify our forces to make Microsoft take us to other platforms!

rskar-git commented 6 years ago

"Visual Basic" already suffers by not being any particular language. It is a collection of languages that are only superficially similar. First there is the VBA/VB6 line, the so-called "classic VB". Second, there is VBScript, intended for web developers and system administrators. Third, there is (of course) VB.NET.

All three of these languages still live on, and they are hampered by sharing the same moniker of "VB" and "Visual Basic": It's this reality that makes things especially hard for VB.NET for issues of mind-share, learning, researching, and understanding. Rather often, you find you need to search on "C#" to get the .NET answers you need for your VB (.NET) projects. VB.NET newbies now get themselves ensnared by VBA or VB6 links.

I don't see this VB6.NET concept as being the way forward for anything. It would be a huge project to get it done right. Should such a beast ever see the light of day, it would simply add to the "mind-share" woes. And in any case, I can't see any reason why Microsoft would put any money & effort into this; it's a dead end.

If anything, they should have already invented a VBA.NET for Office that is a subset of VB.NET. Something like that would have been a beautiful gateway to the world of programming for the office-worker set. VB in its many forms has already proven itself as a competent line-of-business language. If MS Office did its "macros" with a "lite" VB.NET, that would have given enterprises another pipeline for business-knowledgeable developers; which, in turn, would have given Microsoft another pipeline of .NET developers.

And, hey, if such a VBA.NET existed, Microsoft could then package it up as a very easy to use learning tool and application maker. You know, model it after how VB6 was built (VB6 really was an application that made use of VBA at its heart). Offer it for free from the Microsoft Store for your Windows 10 laptop/tablet/hybrid/desktop, and then say "Hey kids! Make your own games! Share them with your friends!" Something like that would be way cooler than SmallBasic (http://smallbasic.com/). Maybe something like that could be its successor?

Anyway, my two cents.

ghost commented 6 years ago

@rskar-git Thanks for sharing your thoughts, and I agree with most of them. But I don't ask MS to put "money" into VB6.NET. There are a legion of VB6 fans shouting for getting the source code of VB6, and if MS announces the VB6.NET project and publishes parts of VB6 compiler, then it will be modified to generate IL instead of machine code. writing controls and ADO wrappers will be the easier part as I think, and most of the work is to integrate this with the IDE. The goal I seek is to bring VB6 projects and programmers to .net. They will be able to use dlls from VB.NET , C#, and F#, even they can use controls created in WPF. Once they get used to VS.NET environment, they can easily learn VB.NET and C#. I know some companies that still use VB6 until today. It's difficult to abandon live systems and tool kits built over years just because MS said so! If these projects can run on VS.NET as it is, they will make the transition and continue to evolve on the .net platform. They may even convert some of their modules into .NET Standard class libraries and run on other devices and platforms! This is an idea that worth financial investigation, and doing a survey to estimate how many VB6 apps are still up and running and want to enter the .NET era! Visual Basic in 13th pos in popularity tells something about that! And as you pointed: I already search for c# although I'm a VB.NET fan. Statistics about VB.NET and C# doesn't reflect the real popularity of both! thanks.

ocdtrekkie commented 6 years ago

As a reminder: Visual Basic .NET came out sixteen years ago. I don't think anyone would disagree the move to .NET was harsh and could've been done more smoothly, but it's almost unimaginable people think there is a future to VB6 code at this point. While I realize there's a certain irony to this statement given the Windows Mobile phone I'm carrying... it's time to move on, buddy.

Other things that died in 2002, along with VB6 include Excite@Home and Napster (which both filed for bankruptcy that year).

ocdtrekkie commented 6 years ago

As an additional note: After looking at code I wrote 16-18 years ago, I think it's for the best to start over, at a certain point. It's very likely in the act of rewriting code for VB .NET, you would find significant ways to improve your code. Horrors live in old codebases, ask Microsoft about their 20-year-old Windows security flaws that come up every so often. We do not write code today the way we wrote code back then, and several assumptions one could make back then are no longer valid.

Bill-McC commented 6 years ago

Damn it, now that song from frozen is going to be stuck in my head all day.......

Regards, Bill.


From: Jacob Weisz notifications@github.com Sent: Tuesday, July 3, 2018 12:33:25 PM To: dotnet/vblang Cc: Subscribed Subject: Re: [dotnet/vblang] VB6.NET! (#323)

As an additional note: After looking at code I wrote 16-18 years ago, I think it's for the best to start over, at a certain point. It's very likely in the act of rewriting code for VB .NET, you would find significant ways to improve your code. Horrors live in old codebases, ask Microsoft about their 20-year-old Windows security flaws that come up every so often.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/dotnet/vblang/issues/323#issuecomment-401994630, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AID_hEBfnV3p_vwYn9Ioa3NRRy5_Kh9xks5uCtf1gaJpZM4U_8LB.

ghost commented 6 years ago

@ocdtrekkie MS is killing VB.NET now, the same way it killed VB6. I see most of newbies learn C# nowadays, and most companies ask for C# programmers. Why do you learn a lang that does half of what another can do? Clasic VB is still a live, and VB.Net is. We need to fill the gap between them to have a large strong community, and develope the two langs our own becuase MS doesn't seem going to do that!

KathleenDollard commented 6 years ago

For those of you that don't know my history, I have plenty, plenty of scars from fighting for VB in the early 2000's. The path from that to my current role is convoluted and uninteresting. We where we are.

I would very much like to understand the allure of VB6.

Is it the legacy code? It is either in classic ASP or a sort of legacy WinForms. WinForms (on Windows) is being carried forward to .NET Core (on Windows) and I believe this is a very important additional direction for Microsoft. I love WinForms!!! It's impossible for me to envision classic ASP in new development in today's world.

Is it the IDE simplicity? Does Visual Studio Code bridge this gap?

Is it the language itself? Visual Basic led C# to be the great language it is, so there are two great languages. Each having features that align with their personalities.

Is it something else?

I have great nostalgia for the Visual Basic <=6 application development. But it seems to me it was the right language for the right era, and I want to figure out what the right language for today's era is.

I think if Microsoft released source code for the VB6 compiler one response would be "how the heck did this ever work" Remember this code based started 25 years ago. I have no clue how anyone could know the stability or security implications of any changes to such an ancient code base (n C++ if I recall).

KathleenDollard commented 6 years ago

@MohammadHamdyGhanem

MS is killing VB.NET now, the same way it killed VB6.

No. This is not correct. VB6 was replaced with VB.NET. They announced that VB6 would not have further development except security fixes for a period of time.

This is the opposite! Microsoft has announced that Visual Basic.NET will move to .NET Core 3.

Why do you learn a lang that does half of what another can do?

Half is a massive exaggeration. C# has features that are designed for high performance apps (including pointers) that VB lacks. It also has a few features that are new to C# that have not been implemented in VB. The most important new features, including ValueTuple (and in my very esoteric opinion Private Protected) have been included in VB. VB continues to do things C# can't, including easier event management, saner overload resolution, and different flavors with the Option statements.

Clasic VB is still a live, and VB.Net is. We need to fill the gap between them to have a large strong community, and develope the two langs our own becuase MS doesn't seem going to do that!

Why not have one community behind one forward facing language that Microsoft make sure stays feeling safe.

ghost commented 6 years ago

@KathleenDollard

Why not have one community behind one forward facing language that Microsoft make sure stays feeling safe.

Becuase C# developers everywhere are convincing me that VB.NET is a lost case and MS abandoned this ship and will sink it any moment!

KathleenDollard commented 6 years ago

@MohammadHamdyGhanem

I don't follow your logic about how this might inspire VB6 commuting with VB.NET.

franzalex commented 6 years ago

@KathleenDollard

This is quite off topic but asking here seems to me to be a lot better than opening a whole new issue for just one question.

Can you please let me (and other interested persons) know if there are any plans by the Microsoft Office team or any other to 'upgrade' the MS Office VBA from a variant of VB6 to one based on VB.NET? Thanks

--


ericmutta commented 6 years ago

@MohammadHamdyGhanem Becuase C# developers everywhere are convincing me that VB.NET is a lost case and MS abandoned this ship and will sink it any moment!

You know for the longest time I have always wondered what kind of person worries about things like this. Ignoring the very obvious fact that a person can learn and use both languages, don't we all know at this point that the customer (i.e whoever uses the software we make) doesn't really care about what language was used and how popular that language is? If VB works for you (as it does for a lot of people), what do you care what those unnamed C# developers are saying? Are they your employers? Are they God?

I always like to put this matter into perspective in the following way: Facebook, Instagram and Whatsapp all have over ONE BILLION USERS across the planet. They are by far the most popular software-based products out there. How many of them are written using ANY language from Microsoft be it VB, C# or F#? The answer is ZERO. If the popularity of anything was a measure of its value or importance, we should really all be programming in a language called "Kim Kardashian .NET".

ghost commented 6 years ago

@ericmutta The kind of person who read MS strategy for VB.NET a year and a half ago!.. This is written by @AnthonyDGreen and you can read the whole strategy here: https://blogs.msdn.microsoft.com/vbteam/2017/02/01/digging-deeper-into-the-visual-basic-language-strategy/

Our challenge is to ensure C# is competitive for that audience both in the language and in the tooling. It’s not that VB couldn’t be used for those purposes but the people already doing these things aren’t demanding VB and the design philosophy of it doesn’t generally appeal to them. VB.NET was always designed to draw developers already targeting Windows to Visual Studio/.NET (including existing VB6 developers) and developers new to programming in general or for whom programming was a secondary skillset.

The former—the weak interaction to migrate off on premises infrastructure or bridge into mobile—I believe, does have a lot potential with the VB community. To be clear, it’s not because VB is unique in this. In fact, we suspect that there is a sizable equivalent subset of the C# community for whom this scenario is equally valid. But, because of the growing diversity of the kinds of workloads that people use C# for (in part because of the diversity of other languages C# draws from) that group of developers is a much more representative subset of VB developers all up.

ericmutta commented 6 years ago

@MohammadHamdyGhanem The kind of person who read MS strategy for VB.NET a year and a half ago!

Fair enough. I think this struggle between C# and VB both inside and outside Microsoft will continue but as someone who loves VB I can confidently tell you not to worry about VB being "a sinking ship" or anything of that nature.

You have to understand one thing: programming languages that have had any traction are very very hard to kill. Just look at this thread as proof: there are people out there that still want VB6 almost 20 years after support for it ended. The damn thing just won't die!

And now that Microsoft open-sourced huge chunks of their development platform (including the compilers which are the crown jewels), I would say VB.NET is outright impossible to kill even if they wanted to. The reason is simple: VB is useful enough that someone will pick it up and take it forward.

Useful things DON'T die.

Useful things that are open-source CAN'T die.

BASIC as a language is 54 years old. I wouldn't be surprised if it outlives us all.

ghost commented 6 years ago

@ericmutta I have the feeling that MS is forcing VB.NET community to carry out the mession themselves. They even puplished topics obout the anatomy of VB.NET compiler: https://blogs.msdn.microsoft.com/vbteam/2017/10/02/roslyn-primer-part-i-anatomy-of-a-compiler/ I agree that open source languaged will not die, but seems MS will not take us to AS>NET core unless we do this ourselves! This is why I want to summen VB6 programmers here. I myself have some important project that couldn't find time to upgrade to .net. Making it possible to vb6 code to run directly on framework will make all loyal VB6 developers megrate, hence know the envirinment and use .net class liberaries and open source code. So, they will be VB.NET programmers over time, and we can talk as one againest C# domination, or try to take over of VB.NET development! We can't deny that VB.NET open source community is week! I found myself publishing C# projects on github, becuase I build it oon other C# projects! You can't say poetry among slang talkers :) ! I think if we accept the current situation quitly, we will all be C# programmers as all new programmers, then MS can abandon VB.NET peacefully in the next 10 years!

ericmutta commented 6 years ago

@MohammadHamdyGhanem I think if we accept the current situation quitly, we will all be C# programmers as all new programmers, then MS can abandon VB.NET peacefully in the next 10 years!

I am going to say it again. There is no "situation to accept", we will NOT all be C# programmers and MS will NOT abandon VB (peacefully or violently) in the next 10 years. The reason like I said earlier is that languages that have any traction (as VB does) are very very very hard to kill.

Just two months after Anthony wrote the article you linked to in order to explain your concerns, this article came out about COBOL still being used in banks. COBOL is a dinosaur. It should be dead. There are people praying for it to die. Some have died waiting for it to die. Others like the Commonwealth Bank of Australia spent 750 MILLION DOLLARS in an attempt to move away from it. But it just wont die.

Honestly, you should probably worry about something else like global warming, but not about VB kicking the proverbial bucket. I can assure you it will be alive and well until the zombie apocalypse makes it hard to ship working software ;-)

paul1956 commented 6 years ago

As an old Cobol programmer, the reason it will not die is the way it can do math to "not lose a penny". It has something very unique. In a way VB is the same, it is easy to read and understand and to pass work to another developer who may not even know VB. No mystery symbols that you can't even Google. With the exception of _ (my favorite feature this month) VB can be read and understood by virtually any programmer. My favorite language was APL, a truly "write once" language, because it was easier to start over than modify an APL program and after 40+ years it also hasn't died and it some ways is being brought back to life a F#.

ghost commented 6 years ago

@ericmutta @paul1956 Lets change "die" to "fade away" :D In the last decade. I wrote books to inroduce VB.NET and C# to Arabic [rogrammers. VB.NET books sold twice C# books, but in recent few years, this is changed, and almost most of programmers want C# books or ask me questions about C#! ASP.NET is a big reason of why VB.NET went back. It's not easy or logical to use VB code and java script togethor, but C# is another story. This got worest with Xamarin, ASP.NET Core and Blazor, wher VB.NET kept away! I'me afraid even VB.NET made it finally to these ereas, it is too late to regain its popularity! Over the time, it will be hard to find someone to ask about VB.NET or share code with, and all new programmers will find it easier to learn C# to write code with, than learn C# to find resources and answers about VB.NET! I myself have doubts now about puplishing VB.NET versions of my books! I'm a VB fan. It's the top most High level syntax ever. MS wouldn't be MS without Visual Basic! DOS popularity owes alot to BASIC, and Windows popularity owes alot to Visual Basic. VB.NET deserves better than this, regards any financial considerations (although I think VB.NET can attract new beginners on linux and OS)! Thanks.

KathleenDollard commented 6 years ago

@franzalex I am not aware of future plans for VBA, but it is quite independent from our team (and Microsoft is huge), so you may want to give feedback in Office.

rskar-git commented 6 years ago

Hey, @MohammadHamdyGhanem, FWIW, VB eked out ahead of C# in the TIOBE index for July 2018 (https://www.tiobe.com/tiobe-index/). Last time that happened was December 2016 (http://silvaetechnologies.eu/blg/245/tiobe-index-december-2016-headline-what-is-happening-to-good-old-language-c).

Also, VB (.NET & "Classic") is still in the top 20 of PYPL (http://pypl.github.io/PYPL.html).

I guess this demonstrates the point which @ericmutta made: VB still has "traction".

rskar-git commented 6 years ago

@KathleenDollard @MohammadHamdyGhanem

I would very much like to understand the allure of VB6.

I am guessing here's what keeps VB6 interesting, even in 2018:

1) Its IDE is a much smaller installation versus today's Visual Studio. (Of course, VS is so much more advanced!)

2) Its runtime is tiny compared to the .NET Framework. (Of course, the FW offers so much more good stuff!)

3) Items 1 and 2 make it possible to develop software on really old PCs.

4) It is very easy to create a (32-bit) native binary with VB6, and thereby get very good performance. (The integer overflow checks can be shut-off for a boost.)

5) Via WINE, a VB6-based application can run on Linux.

6) Items 1 thru 5 enable one to create a sort-of "cross-platform" program that can run (at a good speed) on Windows and Linux, from very old Windows and Linux to very new Windows and Linux.

7) The "Immediate" window of VB6 gives true interactivity. One can do something like for i = 1 to 3: debug.print(i) : next in it. Cannot do that in VB.NET to date (there is no "Interactive" window for VB, although there is for C# and F#). Interactivity is a big part of what makes Python cool.

8) Development and debugging is done in its p-code environment, which was the secret sauce to its productivity success. OK, it's clunky compared to .NET CLR/JIT, but still that difference is probably why a "VB(.NET) Interactive" window would be a fair bit of work.

9) It's been a while, but I remember the (off-line, on hard drive) context help for VB6 to be nicely and tightly integrated with the IDE.

10) A VB6 User-Defined-Type (Type Foo ... End Type) works a lot like a C struct. The old school String*000 (fixed string) was an OK stand-in for char buf[000] (character array). With LSet, one could simulate a C or Pascal style union. This along with the interactive "Immediate" window made it easier to get the hang of communicating with laboratory equipment (or other machines with primitive communications). Its marshaling scheme for the Get # and Put # file commands is primitive, but it worked.

11) VB6 doesn't have StringBuilder, but with the Mid$ statement (not the function!) one could achieve about the same, and help avoid hammering on the garbage collector too much.

12) If you've at least dabbled at VBA on Microsoft Office, you can get the hang of VB6.

ghost commented 6 years ago

@rskar-git

11.VB6 doesn't have StringBuilder

VB6 has the Join function, so you can alocat a string array with suitable capacity, populate it with strings, then join it to one string. In VB5 (before Join added), I had to open, append strings to it (most of that im memory) then read the whole file into a string variable. It was a hard time, but I enjoyed the challange. Now, most of the effort and time goes to study the huge framework that does almost everything.

HaloFour commented 6 years ago

I programmed in VB5/6 professionally for a number of years. These looks back on VB6 can only be with rose-colored glasses. VB5/6 was an absolute mess. The IDE was fast to start, but clunky and buggy. The language was extraordinarily limited. The framework was extraordinarily limited. The default experience was to ignore blatant errors in debugging right up until the point of smacking into them at runtime. The default experience was not to even save your changes. As the IDE was the debugger, anything slightly complicated involving Win32 that caused the debugger to crash would take out the IDE, which when combined with the previous default behavior could cause you to lose all kinds of work. Concurrency didn't exist, at least not properly and not without some serious hacks (if you still had VB5SP3 you could multithread, if you were really careful, but it would still likely blow up the IDE). For sockets you were stuck with Winsock, which was fundamentally broken (as in it dumped the buffer when the other side closed the socket), or Win32 (see debugging fun above).

In short, VB6 was terrible. The only thing that kept it relevant was the fact that Borland was even more incompetent with their offerings. VB.NET was an abrupt and painful but necessary reboot. The biggest mistake was MS not doing the same with VBA, at least side-by-side.

VB6 has the Join function, so you can alocat a string array with suitable capacity, populate it with strings, then join it to one string.

Which is infinitely slower that StringBuilder, or left-side Mid$.

ghost commented 6 years ago

@HaloFour I agree. I'm a VB.NET fan, but I sometimes go back to vb6 to write code that cant be decompiled (I hope I can compile VB.NET code to native code). The last time I tried this I failed to make vb6 work with some pdf liberaries. No doubt that vb6 is out-dated, but there are still many programmers and companies stuck with it! I will close this, since the idead is rejected. Thanks all.