Talk:String comparison: Difference between revisions

Line 8:
[[User:Markhobley|Markhobley]] 21:08, 23 February 2013 (UTC)
:How's it now? The distinction I'm trying to get across is that some operators <em>MIGHT</em> give you string comparison semantics (or some other semantics), while other operators <em>MUST</em> give you string comparison semantics (or fail). It's an important distinction in some languages, or at least in Perl 6. <tt>:-)</tt> But even for languages that only give you polymorphic operators (Python) or coercive operators (Perl 5--at least in the absence of overloading), it's still an important semantic difference. --[[User:TimToady|TimToady]] 00:41, 24 February 2013 (UTC)
 
:if a string operator operates on a non-string it can:
:# Complain about it.
:# Or if the non-string has an agreed string representation it can convert the non-string then work on the string result.
:Some languages do the former, some the latter. (It's also complicated by some languages having only generic comparison operators, i.e. comparing numbers and strings use the exact same operator). --[[User:Paddy3118|Paddy3118]] 10:56, 24 February 2013 (UTC)
 
== REXX ==
Anonymous user