From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA17862; Tue, 8 Apr 2003 18:36:17 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA17824 for ; Tue, 8 Apr 2003 18:36:16 +0200 (MET DST) Received: from relay.pair.com (relay.pair.com [209.68.1.20]) by nez-perce.inria.fr (8.11.1/8.11.1) with SMTP id h38GaE926455 for ; Tue, 8 Apr 2003 18:36:15 +0200 (MET DST) Received: (qmail 56416 invoked from network); 8 Apr 2003 16:36:12 -0000 Received: from arda.pair.com (HELO compaqreview.d6.com) (209.68.1.133) by relay.pair.com with SMTP; 8 Apr 2003 16:36:12 -0000 X-pair-Authenticated: 209.68.1.133 Message-Id: <4.3.2.7.2.20030408091635.037a29b0@localhost> X-Sender: checker@localhost X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Tue, 08 Apr 2003 09:31:12 -0800 To: Nickolay Semyonov-Kolchin , Brian Hurt From: Chris Hecker Subject: Re: [Caml-list] single-line comment request Cc: In-Reply-To: <200304081925.17114.snob@snob.spb.ru> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Spam: no; 0.00; hecker:01 checker:01 caml-list:01 uncomment:01 commenting:01 trickery:01 camlp:01 slows:01 compiles:01 bytecomp:01 compiler:01 chris:01 compilers:01 commands:97 purely:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >Again, this extension is purely stylish. Actually, just to fuel the fire, it's not just stylish. Single-line comments are sometimes easier to work with programmatically (no need to count {[()]} to see where the comment ends, rectangular editing commands can comment and uncomment blocks, end of line is sometimes ragged so commenting out cannot be done linearly without editor macro trickery, wasted characters and movement for single line comments (which I would assume are the majority of comments by number, if not by lines), etc.). Also, using camlp4 for this slows down compiles. I don't think this is the most important feature ever, but it would be nice for more than just stylistic reasons. I would assume there are lots of two-character combinations that are invalid and that don't hose cpp, like "(|" which is even a bit iconographic for the task, in my opinion. Somebody better at compilers than me could probably write a program to parse the .y and .l files and generate all unused and invalid two-character combinations. Hmm, I just did a quick test to check the assumption of whether single-line comments are more common. In my code, 86% of comments are single line. In the compiler bytecomp directory, 89% are single line. Make of that what you will. Chris ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners