Re: not_null function
| From: | Andrey Andreev | Date: | Thu, 03 Jul 2014 12:17:53 +0000 |
| Subject: | Re: not_null function | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-75228@lists.php.net to get a copy of this message | ||
Hi,
On Thu, Jul 3, 2014 at 2:47 PM, Xen <xen@dds.nl> wrote:
> As
> to the "practical" implications that Andrey Andreeve mentioned in his reply.
>
> I shall not reply to that message, but if you insist on arguing that
> semantics are irrelevant to any degree, you are basically arguing that there
> is a good reason to make language harder to understand, read and write
> because of some other reason that has nothing to do with it (like how many
> constructs already exist).
This is exactly what I meant by "extreme". I've never said that
semantics are irrelevant, yet you're taking something that you don't
like about my opinion and you're twisting it into something completely
different. You can do "not_null" in any of the following ways:
$var !== null
! is_null($var)
isset($var)
! empty($var)
I said, in the context of this thread, that semantics alone can't
justify the existance of yet another way to achieve the same goal.
Quite frankly, the idea that a programmer, regardless of knowledge or
experience, wouldn't be able to easily understand any of the above 4
expressions is absurd.
Cheers,
Andrey.