r/interestingasfuck Jul 21 '21

Chicken with genetic defect /r/ALL

https://i.redd.it/98g39eh4pjc71.jpg
53k Upvotes

View all comments

Show parent comments

15

u/chrstphd Jul 21 '21

return Humans.eatingChicken() ? dinosaur : chicken;

but I already fear the integration tests :-D

2

u/truevelvet Jul 21 '21

Why? It's literally the same

Also the correct python syntax is dinosaur if Humans.eatingChicken() else chicken

1

u/chrstphd Jul 21 '21

I just wrote a possible different syntax, nothing more. And probably not python since I do not write python quite often (but I should probably)

0

u/truevelvet Jul 21 '21

Yup it's definitely not python, I just told you

I was asking why you fear the integration tests but maybe that wasn't related to your code

3

u/chrstphd Jul 21 '21

Sorry, it was a loose try about the fact the integration tests based on "regular" chicken will probably raise some funny results around Butcher.class, MealPackage.class, ChickenWings.class...

;-)

1

u/[deleted] Jul 21 '21

His is c# and maybe java but it could be different in java I'm not sure

1

u/truevelvet Jul 21 '21

Yup that syntax is the same in a lot of languages

Java and javascript share it too

1

u/rockrocka Jul 21 '21

That's the C version

condition ? value_if_true : value_if_false

1

u/chrstphd Jul 21 '21

My example was the Java rendition that picks the "Elvis" operator from C, indeed.

1

u/My_name_is_Chalula Jul 21 '21

Did this animal survive?