On 2022-09-16 5:50 p.m., Darren Duncan wrote: > On 2022-09-16 7:44 a.m., Branislav Zahradník wrote: >> IMHO better solution will be to provide namespace specific methods, eg: >> Foo::Bar::->*is_loaded >> Foo::Bar::->*load >> >> grammar rule: >> NAMESPACE_LITERAL ARROW STAR method >> >> and so on >> >> Advantage: >> - namespace methods will not pollute namespace for other methods >> - namespace methods will always be prefixed with * > > Is this a situation where we want to start having special syntax for particular > method calls? If so, we probably want to look at such a feature more > holistically, not just for this use case. I also recall discussions of > something similar, specifically adding Raku-like twigils to Perl, was rejected > in Corinna design discussions in respect to object attributes. Also, how would > this proposed design work in situations where the package name is only known at > runtime, such as because it came from a configuration file? -- Darren Duncan I feel the simplest solution is just alter the original RFC to be builtin::load($package_name) etc rather than unqualified "load". That seems the most appropriate and simplest way to do this. This is the kind of thing that builtin:: is for. -- Darren DuncanThread Previous | Thread Next