* Re: [Caml-list] Preferred layout for new packages [not found] ` <fa.LQofvqHUt8xj1kM1rvmQZF+Z7rw@ifi.uio.no> @ 2012-11-15 8:13 ` vincent.hugot 2012-11-15 8:31 ` Francois Berenger 2012-11-15 9:20 ` rixed 0 siblings, 2 replies; 6+ messages in thread From: vincent.hugot @ 2012-11-15 8:13 UTC (permalink / raw) To: fa.caml; +Cc: caml-list Hello, > In my opinion I dislike unit tests in comments, also because you throw > away editor support In the case of qtest2 (iTeML), so far there is syntax highlighting for Emacs (maybe outdated) and Kate. ... but neither of them is in the repository so far... I'll fix that sometime soon. I for one like the (short-)tests-as-comments approach: being near the function, they serve as short specifications, and being comments, they don't alter the compilation process in the least. regards, Vincent Hugot ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] Preferred layout for new packages 2012-11-15 8:13 ` [Caml-list] Preferred layout for new packages vincent.hugot @ 2012-11-15 8:31 ` Francois Berenger 2012-11-15 9:20 ` rixed 1 sibling, 0 replies; 6+ messages in thread From: Francois Berenger @ 2012-11-15 8:31 UTC (permalink / raw) To: caml-list On 11/15/2012 05:13 PM, vincent.hugot@gmail.com wrote: > Hello, > >> In my opinion I dislike unit tests in comments, also because you throw >> away editor support > > In the case of qtest2 (iTeML), so far there is syntax highlighting for Emacs (maybe outdated) and Kate. > > ... but neither of them is in the repository so far... I'll fix that sometime soon. > > > I for one like the (short-)tests-as-comments approach: being near the function, they serve as short specifications, and being comments, they don't alter the compilation process in the least. I also like this approach. Short tests also serve as usage examples. Also, I like things to be centralised. Regards, F. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] Preferred layout for new packages 2012-11-15 8:13 ` [Caml-list] Preferred layout for new packages vincent.hugot 2012-11-15 8:31 ` Francois Berenger @ 2012-11-15 9:20 ` rixed 2012-11-15 9:59 ` [Caml-list] " Dawid Toton 2012-11-15 17:22 ` [Caml-list] " Aleksey Nogin 1 sibling, 2 replies; 6+ messages in thread From: rixed @ 2012-11-15 9:20 UTC (permalink / raw) To: caml-list -[ Thu, Nov 15, 2012 at 12:13:58AM -0800, vincent.hugot@gmail.com ]---- > I for one like the (short-)tests-as-comments approach: being near the > function, they serve as short specifications, and being comments, they don't > alter the compilation process in the least. The only drawback I saw is that adding or modifying a test triggers the recompilation of the whole unit when using makefiles (since the file changed). I wonder if there exist a tool that's able to find out that since only comments where changed the module need not be recompiled. Maybe omake can do this ? ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Caml-list] Re: Preferred layout for new packages 2012-11-15 9:20 ` rixed @ 2012-11-15 9:59 ` Dawid Toton 2012-11-15 16:09 ` rixed 2012-11-15 17:22 ` [Caml-list] " Aleksey Nogin 1 sibling, 1 reply; 6+ messages in thread From: Dawid Toton @ 2012-11-15 9:59 UTC (permalink / raw) To: caml-list On 11/15/2012 10:20 AM, rixed@happyleptic.org wrote: > -[ Thu, Nov 15, 2012 at 12:13:58AM -0800, vincent.hugot@gmail.com ]---- >> I for one like the (short-)tests-as-comments approach: being near the >> function, they serve as short specifications, and being comments, they don't >> alter the compilation process in the least. > > The only drawback I saw is that adding or modifying a test triggers the > recompilation of the whole unit when using makefiles (since the file changed). > I wonder if there exist a tool that's able to find out that since only comments > where changed the module need not be recompiled. Maybe omake can do this ? > You usually want correct line numbers to be preserved in the executable for e.g. assertion failures. So, in general, it's not possible to save time in the way you describe unless the compiler itself works in an incremental manner. Dawid ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] Re: Preferred layout for new packages 2012-11-15 9:59 ` [Caml-list] " Dawid Toton @ 2012-11-15 16:09 ` rixed 0 siblings, 0 replies; 6+ messages in thread From: rixed @ 2012-11-15 16:09 UTC (permalink / raw) To: caml-list -[ Thu, Nov 15, 2012 at 10:59:38AM +0100, Dawid Toton ]---- > On 11/15/2012 10:20 AM, rixed@happyleptic.org wrote: > >-[ Thu, Nov 15, 2012 at 12:13:58AM -0800, vincent.hugot@gmail.com ]---- > >>I for one like the (short-)tests-as-comments approach: being near the > >>function, they serve as short specifications, and being comments, they don't > >>alter the compilation process in the least. > > > >The only drawback I saw is that adding or modifying a test triggers the > >recompilation of the whole unit when using makefiles (since the file changed). > >I wonder if there exist a tool that's able to find out that since only comments > >where changed the module need not be recompiled. Maybe omake can do this ? > > > > You usually want correct line numbers to be preserved in the > executable for e.g. assertion failures. So, in general, it's not > possible to save time in the way you describe unless the compiler > itself works in an incremental manner. > Dawid Good catch. Thank you. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] Preferred layout for new packages 2012-11-15 9:20 ` rixed 2012-11-15 9:59 ` [Caml-list] " Dawid Toton @ 2012-11-15 17:22 ` Aleksey Nogin 1 sibling, 0 replies; 6+ messages in thread From: Aleksey Nogin @ 2012-11-15 17:22 UTC (permalink / raw) To: caml-list On 15.11.2012 01:20, rixed@happyleptic.org wrote: > -[ Thu, Nov 15, 2012 at 12:13:58AM -0800, vincent.hugot@gmail.com ]---- >> I for one like the (short-)tests-as-comments approach: being near >> the function, they serve as short specifications, and being >> comments, they don't alter the compilation process in the least. > > The only drawback I saw is that adding or modifying a test triggers > the recompilation of the whole unit when using makefiles (since the > file changed). I wonder if there exist a tool that's able to find out > that since only comments where changed the module need not be > recompiled. Maybe omake can do this ? OMake will do this - when compilation of the source file results in a binary file that's identical to what you had before, the recompilation stops there. E.g. when compilation of a changed .ml results in .cmx/.cmo/.o identical to the one you had before, it knows not to recompile/relink further. Aleksey ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-11-15 17:22 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <fa.38rAsBvHd+quECbtcbTH9HW+J6U@ifi.uio.no> [not found] ` <fa.YCrkHurCi6yY5s0Qg1r6uLWNQdY@ifi.uio.no> [not found] ` <fa.oeqp0ymFFL+o76ut/LjBeQhUcjQ@ifi.uio.no> [not found] ` <fa.pEDV80ILnW8x1YQyKuF3NBsK3Kw@ifi.uio.no> [not found] ` <fa.LQofvqHUt8xj1kM1rvmQZF+Z7rw@ifi.uio.no> 2012-11-15 8:13 ` [Caml-list] Preferred layout for new packages vincent.hugot 2012-11-15 8:31 ` Francois Berenger 2012-11-15 9:20 ` rixed 2012-11-15 9:59 ` [Caml-list] " Dawid Toton 2012-11-15 16:09 ` rixed 2012-11-15 17:22 ` [Caml-list] " Aleksey Nogin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox