in reply to RFC: Export tags for builtin pragma

I love the idea! Thank you for moving it forward.

If I had to nitpick, it would probably be about the chosen names:

  1. I'm not sure about the :ref, as :weak are also about references, so someone could be surprised :ref doesn't include :weak.
  2. :round is usually a function of its own (see POSIX) but it's not part of :round, which might again be confusing. Maybe :rounding? It's a bit longer than the rest, though...

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: RFC: Export tags for builtin pragma
by kcott (Archbishop) on Oct 19, 2023 at 18:53 UTC

    G'day choroba,

    ++ Thanks for the feedback.

    None of those tag names are set in stone. I'm certainly open to suggestions for alternatives.

    For your point 1, maybe:

    • :weak - weaken, unweaken, is_weak
    • :refinfo - blessed, refaddr, reftype
    • :ref - :weak, :refinfo

    For point 2, I wasn't entirely sold on :round myself but couldn't think of anything better. Perhaps await suggestions from others.

    — Ken

      Maybe :numeric instead of :round? That provides some future proofing in the event functions like looks_like_number are added at a later date.

      Although maybe that causes issues as then different module versions would load different subs.

        G'day swl,

        ++ Thanks for your suggestion.

        If builtin::round were added, I think that would still be suitable for :round. If builtin::looks_like_number were added, that might go in :numeric; however, perhaps :string would be better (and could include built::trim).

        I feel like I've opened a can of worms and they're all escaping in different directions.
        🥫 🪱 ↖️ 🪱 ↗️ 🪱 ↘️ 🪱 ↙️

        — Ken