• recommended names

    From SupaPlex@21:1/5 to All on Mon Jun 27 09:55:55 2022
    $file = "abc.txt";

    class Name {
    function format() {}
    }

    In your opinion, instead of $file isn't it better to use $filename?
    In your opinion, instead of Name isn't it better to use NameFormatter?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ben Bacarisse@21:1/5 to SupaPlex on Mon Jun 27 12:12:43 2022
    SupaPlex <old@gamer.s> writes:

    $file = "abc.txt";

    class Name {
    function format() {}
    }

    In your opinion, instead of $file isn't it better to use $filename?
    In your opinion, instead of Name isn't it better to use NameFormatter?

    It's impossible to say without more context. In 6 lines of code the
    names hardly matter at all, but in a real-life situation "file" and
    "filename" may be almost as bad as each other.

    --
    Ben.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jerry Stuckle@21:1/5 to SupaPlex on Mon Jun 27 11:21:26 2022
    On 6/27/2022 3:55 AM, SupaPlex wrote:
    $file = "abc.txt";

    class Name {
        function format() {}
    }

    In your opinion, instead of $file isn't it better to use $filename?
    In your opinion, instead of Name isn't it better to use NameFormatter?

    In my opinion it would be better to have comments describing what each does.

    --
    ==================
    Remove the "x"'s from my email address
    Jerry Stuckle
    stucklex.jerryx@gmail.com
    ==================

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Angel@21:1/5 to All on Mon Jun 27 10:27:01 2022
    Use it, as You want, if it works, then everything is Alright.



    *********************************************
    Telephone: 372 5 3 9 0 0 6 6 0

    SupaPlex kirjutas Esmaspäev, 27. juuni 2022 kl 09:56:05 UTC+2:
    $file = "abc.txt";

    class Name {
    function format() {}
    }

    In your opinion, instead of $file isn't it better to use $filename?
    In your opinion, instead of Name isn't it better to use NameFormatter?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Arno Welzel@21:1/5 to All on Tue Jun 28 09:38:30 2022
    SupaPlex:

    $file = "abc.txt";

    class Name {
    function format() {}
    }

    In your opinion, instead of $file isn't it better to use $filename?
    In your opinion, instead of Name isn't it better to use NameFormatter?

    There is a standard for this:

    <https://www.php-fig.org/psr/>


    --
    Arno Welzel
    https://arnowelzel.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)