develooper Front page | perl.perl6.language.mlc | Postings from August 2000

Re: why not just use C /* ... */ ?

Thread Previous | Thread Next
From:
Michael Mathews
Date:
August 22, 2000 14:07
Subject:
Re: why not just use C /* ... */ ?
Message ID:
023101c00c7c$e2503840$af0c0a0a@ny.oxygen.com
Tom Christiansen said:
> D.N.>I mean, really, why not?
>
> Because we already have comments.

Yes, but they are ever so slightly burdensome to use for very large blocks
of text. We really are talking Oranges and Tangerines here anyway (at least)
since one seems like it is meant to comment A Line while the other seems to
prefer more flexible environments like the center of a line of code, or last
572 lines of your program.

> Because they don't nest.

Nesting is a problem you don't really want to solve, in my opinion. The
world gets real weird, real fast when you can nest and/or overlap comments.
Not worth the trouble.

> Because there are already legal and semilegal sequences that look
> like that.  (No proof that such are used, since /foo/*3 doesn't
> look very common, whereas /*foo/ is illegal, and $foo/*bar makes
> rather little sense.)

You'd have a hard time getting 2 people to show up to this debate since
these all seem to be very obscure examples. And if you are citing examples
of regex or function-argument delimiters that is a problem Perl already
knows how to handle. After all, each of these are already legal in Perl with
no confusion:

    $claim = "We're #2!";
    $claim =~ s/#2/#1/g;
    print qq#Our claim is that $claim#;

> Because #...EOL stands out better.

Says you. You might, however be right.

> Because it's more punctuation syntax added to a language
> already massively despised for the same.

Agreed. However *IF* this is to be adopted I would advocate that the syntax
be an extension or slight variation on one that already exists, and is well
known and loved by all. See the RFC5 for a couple suggestions.

> Because Perl isn't C?

Tell that to the next newbie who first lays eyes on "sprintf()" (or insert
any of the *many* C-like syntaxes Perl already has there)! This isn't really
an argument against his suggestion, anyway. Perl is The Borg of computer
languages (meant in a very good way) -- if we like it we can assimilate it.
Who says we can't?

> Dunno.  Have to ask Larry why he didn't do that in the first place.

Well, he did ask us for suggestions, so maybe he's taking a new look at the
language. It's A Good Thing to reevaluate every so often, you know.

Frankly, since I figured out how to get HomeSite (my employer's standard,
not mine!) to run Perl on code right in the editor, I personally don't feel
the need for MLC so much any more, but the consideration is still worth
discussing.

--Michael


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About