The conversation

Lessons learnedExperience excerpt · English

VB6 is often underrated as a programming language, but it did have some neat things that are still …

VB6 is often underrated as a programming language, but it did have some neat things that are still not present in existing programming languages. (They were dropped in VB.NET.) In a sense VB6 is still ahead of its time. One is the transparent intergration with COM objects, allowing you to access objects in another process (possibly from a different executable) in exactly the same way as in-process object. All the marshalling is done under the hood. The only problem with this is that the execution of a single statement could be intermixed with another statement in another thread. I once had to deal with a nasty bug that was obscured by this fact, which was actually caused by using a programming mistake where someone had used a global variable for something that should have been a method argument. The other is the very nice event mechanism where there is no need to (un)register event handlers. They are automatically registered and unregistered. Very powerful mechanism that I started to use more and more the longer I worked with VB6.

Original discussionSomething Pretty Right: The History and Legacy of Visual Basic259 source comments · at import
3

Community replies 0

No community replies yet. Add your perspective.

Replies from the source 3

Direct replies available in this import. Original-language excerpts.

TE

> One is the transparent intergration with COM I think this is one of the things detractors of VB kinda miss. You could build quite sophisticated software to leverage COM/DCOM without needing to go full C/C++ and IDL. The place I worked at built software that ran inside Microsoft Transaction Server (latterly COM+) to exploit distributed transactions. And then there's the really "advanced" stuff you could do in VB as written about by Matthew Curland in his excellent book "Advanced Visual Basic 6: Power Techniques for Everyday Programs"[0]. Armed with a copy of Curland's book and Don Box's "Essential COM" you could be really dangerous :) [0]: https://www.amazon.co.uk/Advanced-Visual-Basic-Programming-D...

Full original
JL

I've had good luck using Python with COM. It has some rough edges, but it works well enough, and can even tab complete methods and accessors in the REPL. Here's an old example working with Catia: https://gist.github.com/jl2/2704426

Full original
ME

The integrated debugger was also excellent. Outside of Lisp, few languages have decent support for Edit and Continue. https://blog.codinghorror.com/edit-and-continue/ I think Java and .Net are pretty close. It is utterly shameful that languages like Python and JavaScript consider themselves to be developer friendly when their debuggers still require full reloads whenever the local state gets modified in place. Common Lisp had Edit and Continue (equivalent functionality in their debugger) before the dotcom crisis. Vercel and Microsoft product managers, if you are reading this, please implement this feature in Next.js, VS Code, and Typescript.

Full original
Continue on Hacker News

Respect different perspectives. Share concrete experiences.

Sign in to post, reply, repost, and quote.