Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #18986 > unrolled thread

recommended names

Started bySupaPlex <old@gamer.s>
First post2022-06-27 09:55 +0200
Last post2022-06-28 09:38 +0200
Articles 5 — 5 participants

Back to article view | Back to comp.lang.php


Contents

  recommended names SupaPlex <old@gamer.s> - 2022-06-27 09:55 +0200
    Re: recommended names Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-06-27 12:12 +0100
    Re: recommended names Jerry Stuckle <stuckle.jerry@gmail.com> - 2022-06-27 11:21 -0400
    Re: recommended names Angel <he1983912@gmail.com> - 2022-06-27 10:27 -0700
    Re: recommended names Arno Welzel <usenet@arnowelzel.de> - 2022-06-28 09:38 +0200

#18986 — recommended names

FromSupaPlex <old@gamer.s>
Date2022-06-27 09:55 +0200
Subjectrecommended names
Message-ID<t9bnqb$1oao$1@gioia.aioe.org>
$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?

[toc] | [next] | [standalone]


#18987

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2022-06-27 12:12 +0100
Message-ID<87v8sms6l0.fsf@bsb.me.uk>
In reply to#18986
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.

[toc] | [prev] | [next] | [standalone]


#18988

FromJerry Stuckle <stuckle.jerry@gmail.com>
Date2022-06-27 11:21 -0400
Message-ID<t9chu8$im3m$1@jstuckle.eternal-september.org>
In reply to#18986
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
==================

[toc] | [prev] | [next] | [standalone]


#18989

FromAngel <he1983912@gmail.com>
Date2022-06-27 10:27 -0700
Message-ID<a822a98c-08b9-414d-a142-28fd42ad74a0n@googlegroups.com>
In reply to#18986
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?

[toc] | [prev] | [next] | [standalone]


#18990

FromArno Welzel <usenet@arnowelzel.de>
Date2022-06-28 09:38 +0200
Message-ID<jhvpfmFfa9lU1@mid.individual.net>
In reply to#18986
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

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.php


csiph-web