Talk:Empty string: Difference between revisions

From Rosetta Code
Content added Content deleted
(already there?)
(not syntax)
Line 1: Line 1:
Can we have an example of a language which has special syntax for empty strings, to justify the first claim in the task description? —[[User:Kevin Reid|Kevin Reid]] 21:51, 4 July 2011 (UTC)
Can we have an example of a language which has special syntax for empty strings, to justify the first claim in the task description? —[[User:Kevin Reid|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). --[[User:Ledrug|Ledrug]] 23:30, 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). --[[User:Ledrug|Ledrug]] 23:30, 4 July 2011 (UTC)
::Those are ''interpretations'' or ''semantics'' of empty strings, not ''syntax for'' empty strings. —[[User:Kevin Reid|Kevin Reid]] 00:16, 5 July 2011 (UTC)

Revision as of 00:16, 5 July 2011

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)