|go ahead... be a heretic|
Re: Dualvar via tableby LanX (Archbishop)
|on Jan 17, 2020 at 17:32 UTC||Need Help??|
Concerning your code ... TL;DR ... sorry!
> This code is working. But I would be interested in your opinion. What could I do better?
dualvar means fiddling with internals, especially if you need to tie it with even more magic, too.
I'd reserve this approach for really hard to achieve stuff or temporary tricks (like for debugging)
IMHO using OOP together with overload for stringification and numification (see overload# String, numeric, boolean, and regexp conversions ) offers a much better interface and is easier to maintain. (untested!°)
°) see Cookbook section in overload for an example