Variant Type Support is Here (and Common Controls are getting closer)

Hey everyone,

Big compiler milestone this week: RAD Basic now supports the Variant type.

If you’ve worked with Visual Basic Classic (VB6), you know that it doesn’t support method overloading or true polymorphism. So how does VB6 handle a method that can accept different argument types? Simple… it cheats. Many APIs, especially in the Common Controls library, use Variant parameters to simulate overloaded calls. Passing a String or a Node? Same method, same parameter slot, the runtime figures out what you actually handed it.

That design pattern is everywhere in the Common Controls API. Which means: no Variant support => no Common Controls.

Well, that blocker is gone.

Here’s a real example: TreeView.Nodes.Add accepts its first parameter as either a String or a Node, depending on how you call it:

TreeView.Nodes.Add calling with two different signatures

This is exactly the kind of VB6 compatibility detail that makes RAD Basic different from other modern Basic implementations. We’re not just building a compiler, we’re building one that speaks fluent VB6.

Common Controls support is coming together fast.

One more thing: it is available in nightly build releases.

More updates soon!

RAD Basic Team