C++ Logo

std-proposals

Advanced search

Re: [std-proposals] [std-discussion] On P2971R0 and implication operator

From: Matthias Wippich <mfwippich_at_[hidden]>
Date: Thu, 24 Apr 2025 16:45:41 +0200
Sure we could. But should we?
Please don't try to turn C++ into APL

On Thu, Apr 24, 2025 at 2:45 PM Hans Åberg via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> One could allow Unicode names, just as for labels.
>
> As for the precedences, I use in a Bison grammar, from low to high:
> %left "⇔"
> %left "⇐"
> %right "⇒"
>
> %left "∨"
> %left "∧"
> %right "¬"
>
>
> > On 23 Apr 2025, at 23:43, Farid Mehrabi via Std-Discussion <
> std-discussion_at_[hidden]> wrote:
> >
> > Hi,
> >
> > A coffee time alternative missing from the proposal:
> > Boolean "Less than or equal" is implication:
> >
> > bool implies(bool a, bool b){
> > //mathematicaly: a => b
> > return a <= b; // inverted syntax!
> > };
> >
> > The only drawback is absence of shortcut semantics.
> > But given the asymmetry of implication, shortcut semantics may be
> difficult to justify.
> > This, for shortcut semantics, proper disjunction or conjunction
> equivalent can be used.
> >
> > how am I supposed to end the twisted road of your hair in such a dark
> night??
> > unless the candle of your face does shed some light upon my way!!!
> > --
> > Std-Discussion mailing list
> > Std-Discussion_at_[hidden]
> > https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2025-04-24 14:46:16