Unicode operators
Bent Rasmussen
IncredibleShrinkingSphere at Gmail.com
Sun Oct 26 21:54:02 PDT 2008
This is a matter of taste and habbit, but my preference is
(A1) ¬(p ʌ q)
(A2) not (p and q)
(A3) !(p && q)
Eiffel also uses (A2) and it looks much better than (A3).
Still, in my oppinion your preference is still better than the status quo.
Also, consider
(B1) p ≠ (d ≤ q)
Relational operators also look much better and look more homogeneous and
consistent with logical operators in (A1).
- Bent
"Bill Baxter" <wbaxter at gmail.com> skrev i meddelelsen
news:mailman.289.1225071455.3087.digitalmars-d at puremagic.com...
> On Mon, Oct 27, 2008 at 10:16 AM, Bent Rasmussen
> <IncredibleShrinkingSphere at gmail.com> wrote:
>> Agreed.
>>
>> As an example: what domain does not include boolean expressions? And how
>> many domains include vector and matrix operations? Quite many.
>
>> It would be a massive boost for readability in those domains (and in all
>> domains, with boolean expressions).
>
> I don't know about you, but to me 'and' and 'or' make for much more
> readable boolean expressions than the standard mathematical symbols ^
> and v. Heck, && and || are more readable to me than the math symbols.
>
>> The problem is not the operators themselves; a language does not loose
>> anything by extension, it is how exactly to best arrive at the goal of
>> having the code look nice and readable with those operators.
>>
>> - Bent
>>
>> Hm, anyone fancy the |> operator?
>
> What would that mean?
>
> --bb
More information about the Digitalmars-d
mailing list