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

I suppose that by "check the type" you mean try to use the value and hopefully catch the error if it didn't work :P

I'm not sure what your point is, are you saying that there are cases where the idiom is useful? Sure, so are some of the things strict complains about, that's what no strict is for. But if you only used it for one object, there's a chance you only used the idiom once right? If a language has a syntax that is a little cumbersome for a bad practice that can be useful in some rare edge cases, that's not really a language flaw.

  • Comment on Re^4: Thx, St. Larry, for the Beauty of Sigils

Replies are listed 'Best First'.
Re^5: Thx, St. Larry, for the Beauty of Sigils
by LanX (Saint) on Jul 30, 2019 at 16:01 UTC
    > I suppose that by "check the type" you mean try to use the value and hopefully catch the error if it didn't work :P

    Python doesn't have separated namespaces for scalar, array, hash or function attributes for classes.

    Perl does have separated slots in a package STASH.

    So ->can() will only return valid coderefs.

    I suppose getattr() returns on them all.

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