Re: not_null function
| From: | Tjerk Meesters | Date: | Thu, 03 Jul 2014 11:56:26 +0000 |
| Subject: | Re: not_null function | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-75224@lists.php.net to get a copy of this message | ||
On Thu, Jul 3, 2014 at 7:47 PM, Xen <xen@dds.nl> wrote:
> On Thu, 3 Jul 2014, Pierre Joye wrote:
>
> that's why we have is_null, and NULL is a type, not a value btw.
>>
>> also isset is an operator, not a function. (referred in other replies).
>>
>
> Alright, I stand corrected. But if NULL or null is a type, then comparing
> against it with == or === would also be wrong, right?
Technically, yes; but in an expression
null is also the representative
value for the type null as a convenient way to check whether something is
of the type null.
>
>
> is_null is consistent with the other is_* functions. A programming
>> language is not a natural language so grammatical or semantic
>> imperfections are totally valid.
>>
>
> That is just your unfounded opinion. In my view, which I believe is based
> on the reasoning that I have espoused today, and just now, semantics are
> important because when things are meaningless they confuse us people. And
> us programmers are people who use language. And we require language to be
> natural and congruent so we can easily grasp it and avoid making errors. 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).
>
>
> between the is_* functions, isset or ?:, I do not see a need to add
>> the exact same features for a non technical reason.
>>
>
> That is find if you see it that way, but I would rather have you answer
> with reasoning and arguments instead of just opinions and statements.
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
--
Tjerk