caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Capitalized source file names
@ 2010-12-26 20:37 Lauri Alanko
  2010-12-26 21:09 ` Philippe Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Lauri Alanko @ 2010-12-26 20:37 UTC (permalink / raw)
  To: caml-list

Traditionally, OCaml source files have been named to start with
lowercase letters, even though they define modules whose names begin
with uppercase letters: the definition of module FooBar goes in
fooBar.ml. This has always seemed unintuitive to me.

I'm not sure if this convention has been forced in the past, but
nowadays the entire toolchain seems to support capitalized filenames:
you can put the definition of FooBar in FooBar.ml, and everything just
works. This seems much more natural.

As things stand, is there any reason (besides uniformity with existing
code) why one shouldn't use capitalized source file names nowadays?


Lauri

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Caml-list] Capitalized source file names
  2010-12-26 20:37 [Caml-list] Capitalized source file names Lauri Alanko
@ 2010-12-26 21:09 ` Philippe Wang
  2010-12-27  9:44   ` David Allsopp
  2010-12-26 21:26 ` Lukasz Stafiniak
  2010-12-26 23:21 ` [Caml-list] " Sylvain Le Gall
  2 siblings, 1 reply; 7+ messages in thread
From: Philippe Wang @ 2010-12-26 21:09 UTC (permalink / raw)
  To: Lauri Alanko; +Cc: caml-list

> As things stand, is there any reason (besides uniformity with existing
> code) why one shouldn't use capitalized source file names nowadays?

I feel like saying that people tend to be lazy, especially ml-programmers ;-)
So, unless they are forced to press 'shift' key when giving a name to
a new file, they usually won't.
I believe OCaml will never force programmers to give capitalized
source file names (I might be wrong).
The only way I see for that to happen would be to provide a new
Caml-frontend, which would force that. But then, nothing guarantees
that it'll be used...

Oh, another idea: ask **teachers** to teach this practice! :-)
(I'll try to teach this practice if I teach Caml again, which might happen)

-- 
Philippe Wang
   mail@philippewang.info



On Sun, Dec 26, 2010 at 9:37 PM, Lauri Alanko <la@iki.fi> wrote:
> Traditionally, OCaml source files have been named to start with
> lowercase letters, even though they define modules whose names begin
> with uppercase letters: the definition of module FooBar goes in
> fooBar.ml. This has always seemed unintuitive to me.
>
> I'm not sure if this convention has been forced in the past, but
> nowadays the entire toolchain seems to support capitalized filenames:
> you can put the definition of FooBar in FooBar.ml, and everything just
> works. This seems much more natural.
>
> As things stand, is there any reason (besides uniformity with existing
> code) why one shouldn't use capitalized source file names nowadays?
>
>
> Lauri
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Caml-list] Capitalized source file names
  2010-12-26 20:37 [Caml-list] Capitalized source file names Lauri Alanko
  2010-12-26 21:09 ` Philippe Wang
@ 2010-12-26 21:26 ` Lukasz Stafiniak
  2010-12-27  9:44   ` David Allsopp
  2010-12-26 23:21 ` [Caml-list] " Sylvain Le Gall
  2 siblings, 1 reply; 7+ messages in thread
From: Lukasz Stafiniak @ 2010-12-26 21:26 UTC (permalink / raw)
  To: Lauri Alanko; +Cc: caml-list

On Sun, Dec 26, 2010 at 9:37 PM, Lauri Alanko <la@iki.fi> wrote:
>
> As things stand, is there any reason (besides uniformity with existing
> code) why one shouldn't use capitalized source file names nowadays?
>

Last time I checked, the (native code ocaml) debugger was not working
properly with uppercase file names. But I haven't used the debugger in
a looong while (it's easier to use "printf"s).

Happy New Year.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Caml-list] Re: Capitalized source file names
  2010-12-26 20:37 [Caml-list] Capitalized source file names Lauri Alanko
  2010-12-26 21:09 ` Philippe Wang
  2010-12-26 21:26 ` Lukasz Stafiniak
@ 2010-12-26 23:21 ` Sylvain Le Gall
  2 siblings, 0 replies; 7+ messages in thread
From: Sylvain Le Gall @ 2010-12-26 23:21 UTC (permalink / raw)
  To: caml-list

On 26-12-2010, Lauri Alanko <la@iki.fi> wrote:
> Traditionally, OCaml source files have been named to start with
> lowercase letters, even though they define modules whose names begin
> with uppercase letters: the definition of module FooBar goes in
> fooBar.ml. This has always seemed unintuitive to me.
>
> I'm not sure if this convention has been forced in the past, but
> nowadays the entire toolchain seems to support capitalized filenames:
> you can put the definition of FooBar in FooBar.ml, and everything just
> works. This seems much more natural.
>
> As things stand, is there any reason (besides uniformity with existing
> code) why one shouldn't use capitalized source file names nowadays?
>

Now, I try to use module name as file name (i.e. uppercase version).
This is much more intuitive. But there is nothing to enforce here, this
is just a matter of taste.

Regards,
Sylvain Le Gall


^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [Caml-list] Capitalized source file names
  2010-12-26 21:09 ` Philippe Wang
@ 2010-12-27  9:44   ` David Allsopp
  0 siblings, 0 replies; 7+ messages in thread
From: David Allsopp @ 2010-12-27  9:44 UTC (permalink / raw)
  To: Philippe Wang, Lauri Alanko; +Cc: caml-list

Philippe Wang wrote:
> > As things stand, is there any reason (besides uniformity with existing
> > code) why one shouldn't use capitalized source file names nowadays?
> 
> I feel like saying that people tend to be lazy, especially ml-programmers
> ;-) So, unless they are forced to press 'shift' key when giving a name to
> a new file, they usually won't.

I'd always assumed it was a UNIX-y "thing" - people don't tend to use capitalised filenames. Coming from a more Windows-background, when I started OCaml I just intuitively used capital letters for filenames (as that's more natural there anyway - and tab completion is of course case-agnostic so I never have to press shift!)

> I believe OCaml will never force programmers to give capitalized source
> file names (I might be wrong).

I think that the team's preferences can be seen by the number of capitalised ML source files in the OCaml sources tree ;o)


David 



^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [Caml-list] Capitalized source file names
  2010-12-26 21:26 ` Lukasz Stafiniak
@ 2010-12-27  9:44   ` David Allsopp
  2010-12-30 12:52     ` Florent Ouchet
  0 siblings, 1 reply; 7+ messages in thread
From: David Allsopp @ 2010-12-27  9:44 UTC (permalink / raw)
  To: Lukasz Stafiniak, Lauri Alanko; +Cc: caml-list

Lukasz Stafiniak wrote:
> On Sun, Dec 26, 2010 at 9:37 PM, Lauri Alanko <la@iki.fi> wrote:
> >
> > As things stand, is there any reason (besides uniformity with existing
> > code) why one shouldn't use capitalized source file names nowadays?
> >
> 
> Last time I checked, the (native code ocaml) debugger was not working
> properly with uppercase file names.

If that's still the case, then it's a bug (see section 8.3 of the manual) - all areas of the toolchain are supposed to ignore the first letter of a module filename.

> But I haven't used the debugger in a looong while (it's easier to use "printf"s).

But for the same reason, I have no idea if this is the case ;o)


David 



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Caml-list] Capitalized source file names
  2010-12-27  9:44   ` David Allsopp
@ 2010-12-30 12:52     ` Florent Ouchet
  0 siblings, 0 replies; 7+ messages in thread
From: Florent Ouchet @ 2010-12-30 12:52 UTC (permalink / raw)
  To: David Allsopp, caml users

David Allsopp a écrit :
> Lukasz Stafiniak wrote:
>   
>> Last time I checked, the (native code ocaml) debugger was not working
>> properly with uppercase file names.
>>     
>
> If that's still the case, then it's a bug (see section 8.3 of the manual) - all areas of the toolchain are supposed to ignore the first letter of a module filename.
>   

I've never encountered such an issue with OCaml 3.9 and newer. My source 
file names are all "smart" case and the debugger nicely handles them.

Cheers,

-- 
Florent Ouchet
PhD Student
CIS/VDS Team - TIMA Laboratory



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-12-30 12:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-26 20:37 [Caml-list] Capitalized source file names Lauri Alanko
2010-12-26 21:09 ` Philippe Wang
2010-12-27  9:44   ` David Allsopp
2010-12-26 21:26 ` Lukasz Stafiniak
2010-12-27  9:44   ` David Allsopp
2010-12-30 12:52     ` Florent Ouchet
2010-12-26 23:21 ` [Caml-list] " Sylvain Le Gall

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