Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
DjSall15638yBecause you don't learn a language.
You learn the concept of transofrming your ideas to code, and later learn the language by yourself. -
It all depends on the language used, some languages can not use an int as a bool.
-
@lukegv oh yeah, that's true... Didn't thought of that. Luckly I never use a ? : statment thingy...
-
@papierbouwer thought that the OP's rant was more on the evaluation of a 0 or not. In C and some other languages you could write it like: value? true: false; which basicly is a int to bool cast.
-
Awlex177478y@papierbouwer When used wisely it can save some lines of code, but sometimes people fail to realize the simple answer infront of them
-
@Awlex Lines of code aren't everything. The real question I think that you should ask is: which one of the two is more effecient during runtime.
Our Professor gave us a predefined Datebase with access methods. The whole database is full of
value == 0 ? false : true
How can this guy teach programming languages when he can't apply a simple != operand
undefined