caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Brian Hurt <brian.hurt@qlogic.com>
To: Chris Hecker <checker@d6.com>
Cc: Brian Hurt <brian.hurt@qlogic.com>,
	Nickolay Semyonov-Kolchin <snob@snob.spb.ru>,
	Ocaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] single-line comment request
Date: Tue, 8 Apr 2003 14:04:14 -0500 (CDT)	[thread overview]
Message-ID: <Pine.LNX.4.33.0304081339100.2225-100000@eagle.ancor.com> (raw)
In-Reply-To: <4.3.2.7.2.20030408110617.0389bde8@localhost>

On Tue, 8 Apr 2003, Chris Hecker wrote:

> 
> > > Actually, just to fuel the fire, it's not just stylish.  Single-line
> > > comments are sometimes easier to work with programmatically
> >Not noticeably in my experience.
> 
> Hmm, well I guess I have different experiences from you on this front.
> 
> This is starting to become a "you don't need that" argument.  

No, it's a "this doesn't give us anything" argument.  Well, except for a) 
it saves having to type three whole extra characters in single line 
comments, and b) it shuts up the people who demand single-line comments.

> The backwards 
> compatibility argument is the only one you've given that has any actual 
> technical objectivity behind it, and it's pretty weak because almost every 
> iteration of caml isn't backwards compatible (if not in core language, then 
> library functions, etc.) and I want it that way and think they should 
> accelerate that.  Much better to get changes out of the way now than later 
> when caml is more popular.

If we're going to be introducing gratuitous backwards incompatiblities, 
can we please do it for something usefull?  Like say replacing begin/end 
with { and }.  This would be incredibly usefull, allowing vi users to yank 
and put whole code branchs with y% and d%.  Of course, we'd need a new 
syntax for structures.  But hey, it's all just cosmetic changes anyways- 
just use an awk script if you need to back port.

I'm half joking here, but only half.

As for having arguments with technical objectivity, I'll agree they've 
been light on the ground.  Backwards compatibility is the only one I've 
seen/made against.  Saving the three keystrokes is the only one I've 
see in favor.

> 
> As for editor macros and parsing, I'm familiar with my editor, thanks.  The 
> point is you need to write no macros when doing a lot of operations with 
> single line comments, versus having to write macros to handle things as 
> easily with multiline.  

Bwuh?  What macros do you need?  Oh sorry.  Yes, if you want to save those 
last three keystrokes.  Generally not worth the effort.

Maybe this is my problem.  I'm a fast enough typer that another 2-3 
characters aren't even noticed.  Not to mention the fact that in my 
experience programmers spend more time not typing than they do typing.  So 
I don't bother to macroize anything.  Maybe you could give me some 
examples?

> That indicates a complexity for operations that you 
> don't seem to acknowledge.  If you're at a different editor and don't have 
> your macros, who's better off?  

I program in so many different languages that I don't bother to have
special macros for any of them.

> And, the macros are nontrivial in the cases 
> of mixed length code and nested comments and whatnot.  A lot of operations 
> are just more complicated with bracketed comments since you have to keep 
> state [that standard regexs can't handle].  I don't see how you can argue 
> the contrary.

So are we arguing that we should do away with (* *) comments?  Because as 
long as (* *) still exists in the language, you have to deal with these 
problems anyways.

> 
> There's really no downside that I can see to supporting them besides minor 
> backwards compatibility (but hey, if you want to port back, just write an 
> editor macro to convert them since you argue they're so easy! :), 

Knowing the issue even exists is 99% of the problem.

> using 
> another token, and somebody has to go implement them.  There are many minor 
> upsides, including a bunch that haven't been listed like avoiding questions 
> about this topic on the list, and matching people's intuition from C++, 
> etc.  It seems like a clear win to me.

Ocaml is such a fundamentally radically different programming paradigm
from C++, that I don't think matching people's C++ intuitions (or Java
intuitions) is a benefit.  In fact, it might even be a detriment.  
Consider for a few seconds a.(i) <- 3 vr.s a[i] = 3.  Or 31-bit ints, for
that matter.

FAQs are how you deal with questions to the list.

Brian

-------------------
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


  parent reply	other threads:[~2003-04-08 19:00 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-08 12:56 Nickolay Semyonov-Kolchin
2003-04-08 15:17 ` Samuel Lacas
2003-04-08 14:27   ` Nickolay Semyonov-Kolchin
2003-04-08 16:21     ` Samuel Lacas
2003-04-09 15:15   ` Thierry SALSET
2003-04-08 15:19 ` Brian Hurt
2003-04-08 14:25   ` Nickolay Semyonov-Kolchin
2003-04-08 16:08     ` Brian Hurt
2003-04-08 15:38       ` Nickolay Semyonov-Kolchin
2003-04-08 17:42         ` Brian Hurt
2003-04-08 17:31     ` Chris Hecker
2003-04-08 16:29       ` Nickolay Semyonov-Kolchin
2003-04-08 19:26         ` Basile STARYNKEVITCH
2003-04-08 20:22           ` Brian Hurt
2003-04-08 21:37             ` Michal Moskal
2003-04-08 17:13       ` Brian Hurt
2003-04-08 19:23         ` Chris Hecker
2003-04-08 18:49           ` Karl Zilles
2003-04-08 19:04           ` Brian Hurt [this message]
2003-04-08 21:57             ` Daniel Andor
2003-04-08 22:07               ` Michal Moskal
2003-04-08 22:09               ` Brian Hurt
2003-04-10  2:59                 ` cashin
2003-04-10  7:58                   ` [Caml-list] { ... } vs ( ... ) vs begin ... end Frederic van der Plancke
2003-04-08 19:42           ` [Caml-list] single-line comment request Daniel M. Albro
2003-04-08 18:53             ` Alexander V. Voinov
2003-04-08 18:19               ` Nickolay Semyonov-Kolchin
2003-04-08 22:40             ` Joshua Scholar
2003-04-13 19:46             ` Andreas Rossberg
2003-04-13 22:57               ` Daniel M. Albro
2003-04-08 19:53           ` Jeff Henrikson
2003-04-08 20:31             ` Brian Hurt
2003-04-13 14:07     ` John Max Skaller
2003-04-08 15:28 ` Damien
2003-04-08 14:49   ` Nickolay Semyonov-Kolchin
2003-04-08 15:39   ` Brian Hurt
2003-04-08 15:45   ` malc
2003-04-08 15:45   ` Samuel Lacas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.33.0304081339100.2225-100000@eagle.ancor.com \
    --to=brian.hurt@qlogic.com \
    --cc=caml-list@inria.fr \
    --cc=checker@d6.com \
    --cc=snob@snob.spb.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).