Talk:Longest string challenge: Difference between revisions

→‎Intent of Restrictions: Do equality and pattern matching operators count?
(→‎Intent of Restrictions: Do equality and pattern matching operators count?)
Line 37:
: "No comparison operators may be used."
:: This would also cover built-in comparison functions like lt(a,b). Instead of "operators" it should probably read "operators/functions" or "operations" possibly with "built-in" in front. Now if you can write a comparison function that doesn't use these things, that would work. --[[User:Dgamey|Dgamey]] 12:35, 13 August 2011 (UTC)
::: (1) Do equality operators count as comparison operators? In particular, do "pointer-equality" operators which do not even do data-structure-specific examinations count? (2) Do pattern-matching (regular expressions, structural patterns, etc.) operators count? —[[User:Kevin Reid|Kevin Reid]] 14:44, 13 August 2011 (UTC)
 
=== No arithmetic operations ===
Line 45 ⟶ 46:
: "The only datatypes you may are use are integer and string. In particular, you may not use lists."
:: To avoid semantic arguments, "lists" means lists/arrays/vectors in the broader sense. However, clearly in the case of C, where strings are arrays of characters, this needs to be relaxed a bit. Using arrays for other than strings would be a cheat here. --[[User:Dgamey|Dgamey]] 12:35, 13 August 2011 (UTC)
 
== Not pointless ==
I had to chuckle at the comment on the C submission as I think it proves the point quite well. Clearly, I need to document the point better :)