Ted Ashton wrote:
> The qc()
> proposal fits in well with the Perl "look-and-feel" and seems pretty
> comfortable to me.  If there are concerns about obfuscatory potential, a
> use strict 'comments' could require that the qc( opening start in column
one.
> Further, if qc were flexible about delimiters, those who prefer /* */
could
> write
>
> qc/*  Here is a comment  */;
>


I think this may be the closest thing to being What Will Make Everyone
Happy, but I'm afraid it fails in two very major ways:
1) Perl can't currently handle quote delimiters of arbitrary length. In
other words the asterisks would currently be treated as part of the quote,
not part of the delimiter. Any idea how to overcome this?

2) Also this proposition fails in one of my goals, which was to allow
arbitrary nesting of multiline comments. I believe this would be true for
any function based solution.

For example, this should be okay but I don't see how it could:

1    qc/*
2        added this comment on 08/02/2000
3        qc/* this is a nested comment */;
4    */;

Under the current Way (using 1-character delimiters) the first qc would end
right after the "08" on line 2 (bad). But even under your Way the first qc
would after line 3, at the first "*/;" encountered (bad too).

Now, if we decide the remedy were to involve special exceptions for "/*"
then I say why do we need the qc function at all. Lets just throw C-style
comments in unchanged! (not a serious suggestion).

I believe the only workable solution is some seldom-used bareword like (#
comment here (#nested here#) #). This could be broken out onto seperate
lines for those who like to do it that way:

(#
    comment here
#)

True it looks unusual, but most every new ideas does!

--Michael



Reply via email to