"be consistent" | |
PerlMonks |
Re^2: Thx, St. Larry, for the Beauty of Sigilsby daxim (Curate) |
on Jul 29, 2019 at 08:56 UTC ( [id://11103555]=note: print w/replies, xml ) | Need Help?? |
Yes, but the bracket subscript trick works for dynamic class names, thus: globals()["CLASSNAME"] 🤢
I wrote about this before at http://redd.it/6epqi5#did1j9b and I also have a collection for several programming languages at https://stackoverflow.com/q/26402047. ES6 classes are missing, and eval('CLASSNAME') is the answer. tl;dr if the language does not have sigils on identifiers, this topic is a pain in the butt.
In Section
Meditations
|
|