Re:The ups and downs of porting 50k lines of C++ to Go (2015)
by networkimprov on Thursday March 14, 2019 @02:26AM
(#19386906)
The main rationale for the lack of ternary, "We don't do control flow with symbols" should also disallow this:
Admittedly tho, nested ternaries are tedious to parse by eye.
[ Parent
| on HN ]
Re:The ups and downs of porting 50k lines of C++ to Go (2015)
by simonask on Thursday March 14, 2019 @06:50AM
(#19388047)
They're nothing against nested applications of the above, though. :-)
t && a() || (u && b() || c())
Personally, I enjoy Rust's choice of letting `if` be an expression.
Re:The ups and downs of porting 50k lines of C++ to Go (2015)
by paulddraper on Thursday March 14, 2019 @02:34PM
(#19392046)
> I enjoy Rust's choice
As a Scala user, I agree it really is the best
val a = if (t) a() else b()