Python resisted this for a while, depending on it's OR behavior. However, 
the OR behavior has 
a lot of critics and criticisms.  
See https://www.python.org/dev/peps/pep-0308/

The if expression is really nice, and quite clear. I use it a lot. It 
doesn't require null types or
other exotic features.

On Sunday, October 15, 2017 at 3:54:46 PM UTC-4, Ian Lance Taylor wrote:
>
> On Sat, Oct 14, 2017 at 11:50 PM,  <matti....@qvik.fi <javascript:>> 
> wrote: 
> > 
> > In addition (or instead of) the ternary operator; I would very much like 
> to 
> > see an operator like: 
> > 
> > Python's OR for selecting a non-None value: 
> > 
> > foo = bar or baz 
> > 
> > Swift's ?? operator for using a value if non-nil or otherwise another 
> value: 
> > 
> > foo = bar ?? "default" 
>
> Go doesn't have a general None or nil value, so this seems 
> underspecified.  It also doesn't seem to fit well with the language, 
> which is careful to avoid constructs like implicit conversion to bool. 
>
> Ian 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to