Talk:Strip comments from a string: Difference between revisions

Content added Content deleted
(→‎29 of 36 languages were incorrect?: should clarify shortcomings, too)
Line 38: Line 38:


:As Ledrug and I have stated before, removing '''any''' whitespace outside the comment marker just seems wrong. I guess this task shows the kind of problems that ensue when task goals are changed outside of the draft task status. --[[User:Paddy3118|Paddy3118]] 20:20, 10 September 2011 (UTC)
:As Ledrug and I have stated before, removing '''any''' whitespace outside the comment marker just seems wrong. I guess this task shows the kind of problems that ensue when task goals are changed outside of the draft task status. --[[User:Paddy3118|Paddy3118]] 20:20, 10 September 2011 (UTC)

: To avoid misleading readers, I think the task desc should also stress that, although for this task it's ok to assume the first appearance of a marker unambiguously identifies a line comment, it's definitely not true in a realistic sense. Most languages allow comment markers in literal strings unescaped, while parsing literals is language specific: all kinds of quoting rules; quote marks may appear in a literal, too, and parsing them is not easy even for some braindead languages that try to make it simple -- matlab comes to mind -- not to mention that there are crazy languages like perl where, say, '#' can be used for other purposes (<code>s###</code>, for example). --[[User:Ledrug|Ledrug]] 20:38, 10 September 2011 (UTC)