How can you create a combination scope/trait declarator in Raku?
Asked Answered
I

0

7

Let's get straight to the point. I want to create a declarator, let's call it testable, that is the combination of our and is export, so that instead of writing

our $foo is export;

we would simply write

testable $foo;

I'm pretty sure something can be done through the metamodel, but I'm not sure this precise thing (scope and trait) can be done or, for that matter, how.

Important answered 24/5, 2020 at 15:57 Comment(2)
.oO [ "I wanted to say "Hi" on this dark and stormy night, and share how cool it is that a programming language, or more to the point its culture, helped folk learn to make good choices. Oh, also, that while a slang macro of our $foo is export; was a 1 liner in the 2020s, it takes less than a single bit in version Z, thanks to the new version of Damian's Quantum::Computation (for obvious reasons I can only share a link to it as it was in 2020." ~~ The 13th Time Lord. ]Fatidic
@Fatidic c'mon, release it in the ecosystem!Important

© 2022 - 2024 — McMap. All rights reserved.