VoltLang / Volta

Compiler for the Volt Programming Language
151 stars 8 forks source link

MULTIBIND #36

Closed bhelyer closed 6 years ago

bhelyer commented 6 years ago

Friends!

Have you ever wanted to bind multiple imports to a single conceptual name? For instance, putting all your watt imports under watt? Well, that has sadly been a pipe dream.

UNTIL TODAY

Introducing, M̶U̶L̶T̶I̶ ̶T̶R̶A̶C̶K̶ ̶D̶R̶I̶F̶T̶I̶N̶G̶ multibind imports, which allows you to do so.

import watt = [watt.io, watt.conv];

That's the long and short of it really. A multibind isn't a valid overload set; any name duplication in the set will cause an error (on lookup of said name).

bhelyer commented 6 years ago

Import multiple modules under the same name