[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

tfw you know that Golang doesn't even have a ternary operator

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 22
Thread images: 3

File: 1500393457922.png (12KB, 246x200px) Image search: [Google]
1500393457922.png
12KB, 246x200px
tfw you know that Golang doesn't even have a ternary operator
>>
tfw you realize a thread died for this
>>
>>61457149
That's a dumb fucking reason to dislike Go. There are loads of shitty things about Go, but that's a stupid thing. This is like when 2nd year CS students say "C is bad, it doesn't even have class".
>>
>>61458116
because no one was thinking in terms of OOP in 1969 and programs weren't that super complicated at the time
>>
>>61457149
>Golang
Found your problem
>>
Don't you guys think that ternary operators just fuck up readibility ?
>>
>>61458440
If they're chained together they fuck up readability. That doesn't mean the language shouldn't have them.
>>
>>61457149
if OP==fag { OP = fag } else { OP = still fag }
>>
File: Screenshot_20170710-103121_1.jpg (61KB, 1074x1361px) Image search: [Google]
Screenshot_20170710-103121_1.jpg
61KB, 1074x1361px
>>61458547
>>
>>61458116
>>61458242
this, you can't really excuse go, at this point ternary operators are standard.
>>
>>61457149
? what he mean by that
>>
>>61458547
(anon.canCode())? "No" : "Absolutely not";
>>
>>61458025
>Muh threads!

Go blacked to plebbit if you want archival.
>>
>>61458726
>anon.canCode()
can I see the details of that function pls?
>>
>>61458860
(trace (canCode))
>>
>>61458890
>trace
2l33t4m3
>>
File: efd.jpg (47KB, 403x392px) Image search: [Google]
efd.jpg
47KB, 403x392px
>checking only the return value of a function without writing the customary
if err != nil {...}
>>
>>61458920
>not writing a helper function
check(err)
>>
>>61457149
Now back to actual reasons for bashing golang, the lack of a decent type system and metaprogramming features.
>>
Having none is better than the Python Version
X if y else Z
>>
>>61458547
>>61458726
>>61458860
public bool Anon::canCode(void){
// Use is retarded when anon replaces ternary for a fucking if else clause
return (lovesDicks || isRetarded);
>>
>>61460038
>Not replacing single if-else with a switch
Thread posts: 22
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.