in reply to Re: Thx, St. Larry, for the Beauty of Sigils
in thread Thx, St. Larry, for the Beauty of Sigils

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.

Replies are listed 'Best First'.
Re^3: Thx, St. Larry, for the Beauty of Sigils
by LanX (Saint) on Jul 29, 2019 at 16:09 UTC
    I like sigils, probably also because my first language was BASIC.

    But I still think they make code more readable, kind of Hungarian Notation

    Parsing non sigil languages is hard without syntax highlighting. *

    And isn't readability part of the Zen(terfold) of Python? ;)

    But some things are unfortunately solved in Perl 5.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

    *) On a side note: I remember having problems with English too, where the same word can sometimes be a verb, adjective and noun, where other languages have grammatical suffices.

    Headlines in the English newspapers are still a riddle...

        > nother story about the Hungarian_Notation:

        LOL, interesting read. :)

        I earned my fist hacker coins with 68000 Assembler, but I seem to remember our identifiers were allowed to be longer on the Atari-ST.

        No wonder no one ever heard of the Mcntsh again. ;-)

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery FootballPerl is like chess, only without the dice