in reply to Re^7: Converting Unicode
in thread Converting Unicode

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^9: Converting Unicode
by SankoR (Prior) on Dec 21, 2023 at 00:24 UTC
    Accept your arguments as a hash.
Re^9: Converting Unicode
by eyepopslikeamosquito (Archbishop) on Dec 22, 2023 at 04:27 UTC

    Your flamebait has attracted enough interesting and useful replies that I've just added it to my list of references at On Interfaces and APIs. :)

    As discussed in that node -- and as you have discovered -- the dark art of interface and API design is certainly not an easy one to master!

    > Or maybe, just maybe, you have no clue what I am doing and why I need all the variables in a single subroutine

    Instead of ranting like that in an eight-level deep reply to an old thread started by BernieC, I suggest you start a new thread clearly describing the problem you are trying to solve, along with your proposed API to solve it. Much more likely to elicit useful replies that will improve your initial attempt at an API.

    👁️🍾👍🦟
Ordering of parameters - Re^9: Converting Unicode
by soonix (Chancellor) on Dec 21, 2023 at 09:11 UTC
    Perhaps off-topic, and I don't remember where I have this from, but ordering of parameters is partly conceptual, partly a documentation issue. The suggestion is to put the parameters in a sentence (and use that sentence always in the function help). E.g.
    • search needle in haystack (this variant is probably a "false friend" for non-native speakers) → "needle" parameter goes first, then haystack
    • search haystack for needle → "haystack" parameter goes first, then needle
    Of course, your sentence(s) would be much longer, but once you have a "natural" phrasing, you have a "natural" order of the parameters. And, as the example shows, word use is important…
    This is (programming) language independent, btw.
    A reply falls below the community's threshold of quality. You may see it by logging in.