Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Passwords are implemented as a result of insecurity.


devel / comp.lang.php / Always use class aliases?

SubjectAuthor
* Always use class aliases?Flash
+* Re: Always use class aliases?Ace of diamonds
|`- Re: Always use class aliases?De ongekruisigde
+* Re: Always use class aliases?Arno Welzel
|`* Re: Always use class aliases?Flash
| `- Re: Always use class aliases?Arno Welzel
`- Re: Always use class aliases?He, who travels time to time

1
Always use class aliases?

<t9rjld$tja$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=600&group=comp.lang.php#600

  copy link   Newsgroups: comp.lang.php
Path: i2pn2.org!rocksolid2!i2pn.org!aioe.org!mE2H2n/6WJtgtBPTmvRY2w.user.46.165.242.91.POSTED!not-for-mail
From: new@flash.foto (Flash)
Newsgroups: comp.lang.php
Subject: Always use class aliases?
Date: Sun, 3 Jul 2022 10:23:09 +0200
Organization: Aioe.org NNTP Server
Message-ID: <t9rjld$tja$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="30314"; posting-host="mE2H2n/6WJtgtBPTmvRY2w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.9.1
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: it-IT
 by: Flash - Sun, 3 Jul 2022 08:23 UTC

https://www.exakat.io/en/6-good-practices-for-use/
"Any call to a fully namespaced should be avoided, and at least aliased.
Firstly, this shorten the code, keep it easier to read. This may also be
called ‘Avoid long classes name in code’.
...........
..............
......"

But in some cases, I consider it something a little excessive.
For example

--- SCRIPT ---
<?php
use MyClass as MyClass; // little excessive?
// ...
--- END SCRIPT ---

What do you think?

Re: Always use class aliases?

<fb7e2a5d-4cff-4a83-9e1c-b5af837af4c1n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=606&group=comp.lang.php#606

  copy link   Newsgroups: comp.lang.php
X-Received: by 2002:a37:5504:0:b0:6b2:44f2:7d59 with SMTP id j4-20020a375504000000b006b244f27d59mr23271265qkb.495.1657124353423;
Wed, 06 Jul 2022 09:19:13 -0700 (PDT)
X-Received: by 2002:a81:4eca:0:b0:31c:7a6a:f6d3 with SMTP id
c193-20020a814eca000000b0031c7a6af6d3mr29479713ywb.82.1657124352905; Wed, 06
Jul 2022 09:19:12 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.php
Date: Wed, 6 Jul 2022 09:19:12 -0700 (PDT)
In-Reply-To: <t9rjld$tja$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=82.131.37.215; posting-account=HfIszAoAAAC8ch6q3uChpTWUALHCfEoF
NNTP-Posting-Host: 82.131.37.215
References: <t9rjld$tja$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fb7e2a5d-4cff-4a83-9e1c-b5af837af4c1n@googlegroups.com>
Subject: Re: Always use class aliases?
From: he12091983@gmail.com (Ace of diamonds)
Injection-Date: Wed, 06 Jul 2022 16:19:13 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 26
 by: Ace of diamonds - Wed, 6 Jul 2022 16:19 UTC

Hey guy. Would You want to get rich with me doing programming? If yes, call me !!!!!!!!!

✆☎☏📱📞 : 372 53900660

Flash kirjutas Pühapäev, 3. juuli 2022 kl 10:23:18 UTC+2:
> https://www.exakat.io/en/6-good-practices-for-use/
> "Any call to a fully namespaced should be avoided, and at least aliased.
> Firstly, this shorten the code, keep it easier to read. This may also be
> called ‘Avoid long classes name in code’.
> ..........
> .............
> ....."
>
> But in some cases, I consider it something a little excessive.
> For example
>
> --- SCRIPT ---
> <?php
> use MyClass as MyClass; // little excessive?
> // ...
> --- END SCRIPT ---
>
> What do you think?

Re: Always use class aliases?

<jim11eFs1maU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=610&group=comp.lang.php#610

  copy link   Newsgroups: comp.lang.php
Path: i2pn2.org!i2pn.org!news.uzoreto.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: usenet@arnowelzel.de (Arno Welzel)
Newsgroups: comp.lang.php
Subject: Re: Always use class aliases?
Date: Wed, 6 Jul 2022 20:02:22 +0200
Lines: 40
Message-ID: <jim11eFs1maU1@mid.individual.net>
References: <t9rjld$tja$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net yzDAhsjMeXqK0hOuIepgBgN5C+FJtnGuxZE9OlLWeibMLF6rl6
Cancel-Lock: sha1:iB/wO3G3a5yIWpDh5B67uGtMHis=
Content-Language: de-DE
In-Reply-To: <t9rjld$tja$1@gioia.aioe.org>
 by: Arno Welzel - Wed, 6 Jul 2022 18:02 UTC

Flash:

> https://www.exakat.io/en/6-good-practices-for-use/
> "Any call to a fully namespaced should be avoided, and at least aliased.
> Firstly, this shorten the code, keep it easier to read. This may also be
> called ‘Avoid long classes name in code’.
> ..........
> .............
> ....."
>
> But in some cases, I consider it something a little excessive.
> For example
>
> --- SCRIPT ---
> <?php
> use MyClass as MyClass; // little excessive?
> // ...
> --- END SCRIPT ---
>
> What do you think?

This makes no sense at all. You don't need an alias if you use the class
at it is:

<?php
use MyClass;

Aliases are only needed if you want to use a class as *another* name in
your code:

<?php
use SomeNamespace\SomotherNamespace\LongClassName as MyClass;

--
Arno Welzel
https://arnowelzel.de

Re: Always use class aliases?

<ta6a21$pqn$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=611&group=comp.lang.php#611

  copy link   Newsgroups: comp.lang.php
Path: i2pn2.org!i2pn.org!aioe.org!UCq2ihn6J7Z7Gl54/h1DsA.user.46.165.242.91.POSTED!not-for-mail
From: new@flash.foto (Flash)
Newsgroups: comp.lang.php
Subject: Re: Always use class aliases?
Date: Thu, 7 Jul 2022 11:46:41 +0200
Organization: Aioe.org NNTP Server
Message-ID: <ta6a21$pqn$1@gioia.aioe.org>
References: <t9rjld$tja$1@gioia.aioe.org> <jim11eFs1maU1@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="26455"; posting-host="UCq2ihn6J7Z7Gl54/h1DsA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.9.1
Content-Language: it-IT
X-Notice: Filtered by postfilter v. 0.9.2
 by: Flash - Thu, 7 Jul 2022 09:46 UTC

Il 06/07/22 20:02, Arno Welzel ha scritto:
> This makes no sense at all. You don't need an alias if you use the class
> at it is:
>
> <?php
> use MyClass;

~$ php -r 'use stdClass;'

Warning: The use statement with non-compound name 'stdClass' has no
effect in Command line code on line 1

Re: Always use class aliases?

<ta6ge7$c5h4$3@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=612&group=comp.lang.php#612

  copy link   Newsgroups: comp.lang.php
Path: i2pn2.org!i2pn.org!paganini.bofh.team!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ongekruisigde@news.eternal-september.org (De ongekruisigde)
Newsgroups: comp.lang.php
Subject: Re: Always use class aliases?
Date: Thu, 7 Jul 2022 11:35:35 -0000 (UTC)
Organization: Ongekruisigden
Lines: 33
Message-ID: <ta6ge7$c5h4$3@dont-email.me>
References: <t9rjld$tja$1@gioia.aioe.org>
<fb7e2a5d-4cff-4a83-9e1c-b5af837af4c1n@googlegroups.com>
Reply-To: ongekruisigde@holymenandwomen.catholic
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 7 Jul 2022 11:35:35 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="31a00deb1afcda92267b24bcac6e61b2";
logging-data="398884"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18kqBfAcUcdU4PP8AdpZXZ8jCiFazfBlpc2rXPAY0ufQQ=="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:iI8ACUFMSiBaablupXZfZlODLYM=
 by: De ongekruisigde - Thu, 7 Jul 2022 11:35 UTC

On 2022-07-06, Ace of diamonds <he12091983@gmail.com> wrote:
> Hey guy. Would You want to get rich with me doing programming? If yes, call me !!!!!!!!!
>
> ✆☎☏📱📞 : [0-9]{3} [0-9]{8}

No ace, you read like a script kiddie.

>
> Flash kirjutas Pühapäev, 3. juuli 2022 kl 10:23:18 UTC+2:
>> https://www.exakat.io/en/6-good-practices-for-use/
>> "Any call to a fully namespaced should be avoided, and at least aliased.
>> Firstly, this shorten the code, keep it easier to read. This may also be
>> called ‘Avoid long classes name in code’.
>> ..........
>> .............
>> ....."
>>
>> But in some cases, I consider it something a little excessive.
>> For example
>>
>> --- SCRIPT ---
>> <?php
>> use MyClass as MyClass; // little excessive?
>> // ...
>> --- END SCRIPT ---
>>
>> What do you think?

--
Without followers, evil cannot spread.
[Spock, "And The Children Shall Lead", stardate 5029.5]

Re: Always use class aliases?

<jiusffFa913U1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=624&group=comp.lang.php#624

  copy link   Newsgroups: comp.lang.php
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: usenet@arnowelzel.de (Arno Welzel)
Newsgroups: comp.lang.php
Subject: Re: Always use class aliases?
Date: Sun, 10 Jul 2022 04:39:43 +0200
Lines: 40
Message-ID: <jiusffFa913U1@mid.individual.net>
References: <t9rjld$tja$1@gioia.aioe.org> <jim11eFs1maU1@mid.individual.net>
<ta6a21$pqn$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Trace: individual.net 99Ejd085iUbRKU0HaKxpFwGPB5mRlLOPzQlC59JIiiodzuH9qw
Cancel-Lock: sha1:dp8Wa+gOPeMa60x1NUmvzY7VNJs=
Content-Language: de-DE
In-Reply-To: <ta6a21$pqn$1@gioia.aioe.org>
 by: Arno Welzel - Sun, 10 Jul 2022 02:39 UTC

Flash:

> Il 06/07/22 20:02, Arno Welzel ha scritto:
>> This makes no sense at all. You don't need an alias if you use the class
>> at it is:
>>
>> <?php
>> use MyClass;
>
>
> ~$ php -r 'use stdClass;'
>
> Warning: The use statement with non-compound name 'stdClass' has no
> effect in Command line code on line 1

Yes, I forgot that you need the namespace as well, either defined in the
use statement:

<?php
use SomeNamespace\MyClass;

Or in your code:

<?php
namespace SomeNamespace;

use MyClass;

But then you don't have to add an alias if you want to use the class as
"MyClass", so - this is not needed:

<?php
use SomeNamespace\MyClass as MyClass;

Also see <https://www.php.net/manual/en/language.namespaces.importing.php>

--
Arno Welzel
https://arnowelzel.de

Re: Always use class aliases?

<d77d7c4e-b875-4882-bcbf-dd25ff0566d2n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=677&group=comp.lang.php#677

  copy link   Newsgroups: comp.lang.php
X-Received: by 2002:a37:e319:0:b0:6cd:f643:b6d6 with SMTP id y25-20020a37e319000000b006cdf643b6d6mr2260960qki.616.1663856005071;
Thu, 22 Sep 2022 07:13:25 -0700 (PDT)
X-Received: by 2002:a81:a17:0:b0:349:8bbe:5ef with SMTP id 23-20020a810a17000000b003498bbe05efmr3373425ywk.468.1663856004625;
Thu, 22 Sep 2022 07:13:24 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.php
Date: Thu, 22 Sep 2022 07:13:24 -0700 (PDT)
In-Reply-To: <t9rjld$tja$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=82.131.36.130; posting-account=gin_zAoAAAAxFoHHJeGbYqdKpQ_tFzq7
NNTP-Posting-Host: 82.131.36.130
References: <t9rjld$tja$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d77d7c4e-b875-4882-bcbf-dd25ff0566d2n@googlegroups.com>
Subject: Re: Always use class aliases?
From: he1983912@aol.com (He, who travels time to time)
Injection-Date: Thu, 22 Sep 2022 14:13:25 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1854
 by: He, who travels time - Thu, 22 Sep 2022 14:13 UTC

Hey... Want to talk? Call me.... My telephone number >>>>

(+372) 56330687

Flash kirjutas Pühapäev, 3. juuli 2022 kl 11:23:18 UTC+3:
> https://www.exakat.io/en/6-good-practices-for-use/
> "Any call to a fully namespaced should be avoided, and at least aliased.
> Firstly, this shorten the code, keep it easier to read. This may also be
> called ‘Avoid long classes name in code’.
> ..........
> .............
> ....."
>
> But in some cases, I consider it something a little excessive.
> For example
>
> --- SCRIPT ---
> <?php
> use MyClass as MyClass; // little excessive?
> // ...
> --- END SCRIPT ---
>
> What do you think?

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor