Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 4 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Updating script support, taking requests
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#39
RE: Updating script support, taking requests

I am against the integer to bool implicit conversion on the grounds of legible code. When the boolean type has been made available, it is best practice to use a boolean to represent a boolean value, rather than stick in some coercion to get around the fact that int isn't bool - especially when the language does not do this by default. Just use !=0 - it is far easier to see what is going on at a glance, and it's 3 extra characters.

See also:
http://msdn.microsoft.com/en-us/library/b6801kcy.aspx
http://stackoverflow.com/questions/55547...-integer-1
http://geosoft.no/development/cppstyle.html#Variables [Not the only standard obviously...]
(This post was last modified: 08-29-2013, 09:42 PM by Apjjm.)
08-29-2013, 08:52 PM
Find


Messages In This Thread
RE: Updating script support, taking requests - by Apjjm - 08-29-2013, 08:52 PM



Users browsing this thread: 1 Guest(s)