Talk:Empty string

Revision as of 08:32, 5 July 2011 by rosettacode>Markhobley (demonstrate how to achieve the task)

Can we have an example of a language which has special syntax for empty strings, to justify the first claim in the task description? —Kevin Reid 21:51, 4 July 2011 (UTC)

The Perl 6 and Python examples both mentioned how empty strings are treated as boolean false, while nonempty ones are true (well in Perl if nonempty string looks like number "0" it's again treated as false, but that's more exception than rule). --Ledrug 23:30, 4 July 2011 (UTC)
Those are interpretations or semantics of empty strings, not syntax for empty strings. —Kevin Reid 00:16, 5 July 2011 (UTC)
There are lots of examples of languages with special semantics around null strings. Syntax, I'm not so sure. SNOBOL was one, variables are NULL strings by default and they get reinterpreted depending on the operation. Add a null string and it treats it as a zero. Icon/Unicon have special syntax for a null type but that's not the same as a null string. What's expected where a language doesn't have special syntax? --Dgamey 03:26, 5 July 2011 (UTC)
Just demonstrate how to achieve the task would be achieved within the language. Markhobley 08:32, 5 July 2011 (UTC)
Return to "Empty string" page.