Talk:Boolean constants

From Dragon Age Toolset Wiki
Jump to: navigation, search

<snip pasted AxeMurderer content- see this revision for it>

Actually, though it is indeed perhaps a bit wordy and redundant at times, this information does seem quite pertinent to this page. It's the sort of thing that a scripter should be aware of when working with boolean constants in scripts, and since dascript doesn't have an explicit boolean type this seems like the best place for it to me. I'm going to reinstitute it and do some rewriting to make it less of a big block. BryanDerksen 15:47, 26 October 2009 (UTC)

However dascript does have boolean logic and that will be covered in the language definition (under the expressions section in my outline).
Moreover the Example section is highly subjective and in my opinion incorrect. There are quite obviously occasions when testing against TRUE is appropriate: MyFunctionThatReturns2() will equate to true but MyFunctionThatReturns2() == TRUE will equate to false so depending on your requirements one of these is an error. In addition an explicit comparison against TRUE or FALSE may clarify your logic and intent which is invariably worth an extra byte code instruction or two. Consquently the phrases "never necessary" and "only really useful" are at the very least misleading.
The Example section should be removed or completely rewritten to provide more appropriate advice (though as stated above this would be better in the section on boolean expressions).
--Sunjammer 18:40, 26 October 2009 (UTC)
When it's covered elsewhere then by all means there should be cross-links between the various places that discuss it and consolidation of similar content. But at the moment this is the only place where boolean usage in scripting is covered in detail so IMO it's inappropriate to simply delete the contents without having a new home for them. Problems with the example section should also be dealt with by rewriting - if there are situations where testing against TRUE is appropriate they should be described as well. Generally speaking a wiki entry shouldn't be deleted if it's just imperfect. BryanDerksen 19:20, 26 October 2009 (UTC)
The last paragraph now states "TRUE and FALSE are only useful..." which is not correct. There are multitudes of other situations where FALSE is appropriate since it is not ambiguous. It is only the TRUE identifier which, due to its ambiguity, is useful in only those few situations identified. I don't think those should be lumped together like that. Axe Murderer 10:11, 28 October 2009 (UTC)
Can I suggest that we leave this page alone for a while? The Example section is both inaccurate and irrelevant to this page. There is no point wasting any more time on it until it can be removed to a more appropriate part of the scripting framework. Incidentally TRUE isn't ambiguous: true is.
--Sunjammer 18:18, 28 October 2009 (UTC)