Live data from Hacker News

Microsoft plots the end of Visual Basic

thurrott.com

211–220 of 292 posts

Re: Microsoft plots the end of Visual Basic

#211

Earlier quoted context omitted.

> "Classic" Visual Basic has been ended for a long time now. It kinda still lives on in classic ASP. It will be supported indefinitely so far [1] [1] https://support.microsoft.com/en-us/help/2669020/active-serv...

IIS ASP and the Shell CScript/WScript hosts are just environments for the COM-based Active Scripting engine. At the time it was very capable as lots of software titles opened themselves up to automation via COM - that's why you could have Classic ASP pages that invoked Office Excel to generate charts dynamically. Unfortunately it was all a mess, but it was also something beautiful because it meant that a desktop/serv…

I wouldn't say that COM died with .NET - .NET had COM support baked deeply into the platform, to the point of language hacks where to this day, you can "new" a specially defined interface in C# (originally it was a way to reference the associated default coclass for a COM interface, if any). It's very easy to use and create COM libraries, and WinForms fully supports ActiveX controls.

Even as late as 2010, COM support in .NET was still being developed - C# 4 got named indexers for this reason alone, and its "dynamic" supported IDispatch out of the box - its main scenario being Office automation.

Re: Microsoft plots the end of Visual Basic

#212
post #153

Earlier quoted context omitted.

More like "95% simple and 5% possible". VB6 can call win APIs and C++ code for when some arcane functionality is needed.

Take https://docs.microsoft.com/en-us/windows/win32/api/oaidl/ns-... and https://docs.microsoft.com/en-us/windows/win32/api/winbase/n... and try to sensibly read a bunch of _EVENTLOGRECORD's of varying lengths. "possible" is technically true but charitable.

You don't need any of that. VB6 had C FFI (Lib/Alias), structs, and function pointers (AddressOf). So you could just implement a function in straight C, compile it into a DLL, and invoke it from VB.

Re: Microsoft plots the end of Visual Basic

#213

That is so sad. "There’s something deeply right about how list indexing and function application are the same operation". That is a quote from a recent submission about K ( https://news.ycombinator.com/item?id=22504106 ), and that is a perfect example of how I usually get VB nostalgia attacks: somebody talks about a thing in other language they consider amazing implying that that thing is unique for that language des…

Parentheses for array indexing dates all the way back to the original Dartmouth BASIC, and from there to the very first FORTRAN. It's one of the oldest pieces of PL syntax still around in its original meaning.

Re: Microsoft plots the end of Visual Basic

#214

Earlier quoted context omitted.

GOTO for flow control is not that bad, it's just a tail call after all. The real damage is things like having everything be global variables. But part of that was a technical limitation, as things like "proper" call stacks and reentrant code as the default still had plenty of overhead, and even FORTRAN didn't support them.

I'm not sure what you have in mind but in the 1975 dialects of BASIC the code was something like 10 REM Grab input 20 GOSUB 1000 30 IF VALUE=BAR THEN GOTO 100 40 IF VALUE=BAZ THEN GOTO 200 50 IF VALUE=BLA THEN GOTO 300 60 GOTO 20 100 REM Bar stuff 110 blahblah 199 RESUME 200 REM Baz stuff 210 blahblah 299 RESUME 300 REM Bla stuff 310 blahblah 399 RESUME 1000 REM Code that grabs input 1010 blahblah 1100 RESUME Or just…

In a world where you "call" functions with GOSUB, GOTO is an equivalent of a tail call.

Re: Microsoft plots the end of Visual Basic

#215
post #136

To me, this shows the huge risk of building on a language/platform that depends on a single company. This even happened earlier. Visual Basic .NET is grossly incompatible with Visual Basic 6, so much so that Visual Basic .NET is essentially a different language and was derisively called Visual Fred http://catb.org/~esr/jargon/html/V/Visual-Fred.html ... Of course, it was possible to rewrite software so that would wor…

As an ex-VB6 programmer, my view is that Microsoft has been fairly supportive of VB users. - The IDE itself was supported for 10 years, till 2008 - The runtime is supported till 2024, which is like 26 years. I think you can get it to work on Windows 10 as well, though I haven't tried it myself. I still see people using VB apps. My view is that VB.Net should never have been created, since it was closer to C# than it w…

The VB6 runtime ships with Win10, in fact.

Re: Microsoft plots the end of Visual Basic

#216
post #135

Earlier quoted context omitted.

> There would have been no need for Python syntax or Golang with Visual Basic's simplicity in a windows only world.

Not if they would have made it open source 2001 - or anytime later for that matter.

The semantics of VB6 are basically that of OLE Automation (or vice versa - it can be hard to tell sometimes). That doesn't make it impossible to port to other platforms, but it would require extra effort. And the result wouldn't have all the benefits VB had on Windows, where COM was pretty much OS-level native at the time.

Re: Microsoft plots the end of Visual Basic

#218

It's coincidental to have this announcement come on the same day Bill Gates announced he is resigning from the Microsoft board (I'm sure completely unrelated). Microsoft was founded on the idea of writing Basic interpreter by Gates so a legacy of 45 years from both has ended today.

Gates was still a huge fan of BASIC in 1990s, and I think VB would probably not be what it became at its peak without him constantly pushing it to the front of Windows dev stack.

Re: Microsoft plots the end of Visual Basic

#219

This is gonna be like Python 3. There is an innumerable amount of “production” VB.

It's far easier to convert VB.NET to equivalent C#, especially with tools like Roslyn.

Nor is it going anywhere. It's simply joining the ranks of legacy-but-stable-and-supported tech like MFC and WinForms.

Re: Microsoft plots the end of Visual Basic

#220
post #80
post #21

Earlier quoted context omitted.

> You can even mix powershell and C# together in the same script. What feature are you referring to?

You can load a .NET dll in a Powershell script and invoke it. https://docs.microsoft.com/en-us/powershell/module/microsoft...

Depends on whether this is allowed by your GPO or not.
Post reply on HN