comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Separate Compilation in Programming Languages
Date: Sat, 23 Feb 2008 15:03:46 +0200
Date: 2008-02-23T15:03:46+02:00	[thread overview]
Message-ID: <47c0154f$0$23852$4f793bc4@news.tdc.fi> (raw)
In-Reply-To: <fpp41t$k8q$1@online.de>

Dirk Heinrichs wrote:
> Niklas Holsti wrote:
> 
> 
>>Separate version tracking per subprogram (as mentioned by Dirk
>>Heinrichs) could be an advantage, but I would prefer to get this
>>from a subprogram-aware version control system, without the
>>proliferation of source files that "separate" causes.
> 
> 
> The only problem is that there is no subprogram-aware version control system
> today. (My main job is doing SCM, btw., so I know what I'm talking about.)

Agreed. (I did say I *would* prefer it, not that I *can* do it :-)

Several years ago I implemented something of the sort, by writing 
some scripts to chop version "diff" reports per Ada subprogram, 
using fairly simple patterns to match the start and end of 
subprograms (greatly helped by a coding rule that forbade nested 
subprograms).

The result showed version history per subprogram, and I found it 
very useful, especially for maintaining unit tests.

> And IMHO there doesn't need to be one. It would have to know the syntax of
> the program's language(s) to find out when particular subprograms change so
> that it can raise their versions. That's next to impossible because people
> always want to put something under version control which is written exactly
> in the single one language the system isn't aware of.

Well, it is a little like syntax coloring in editors, isn't it? 
Editors do it for the major languages, but not for every little 
language someone has invented. I admit that it is harder to 
identify subprogram boundaries than tokens and keywords, of course, 
and then there is the nesting problem.

> So the solution is to keep putting just files under version control, and if
> each of those files represent exactly one subprogram, your version control
> _is_ (sort of) subprogram-aware, but still language independant.

At the cost of a great number of files, and some language-specific 
means to combine the files into a program (eg. "is separate" for 
Ada). Ugh. Perhaps something could be done with a language-specific 
intermediate tool, similar to "gnatchop", that would mediate 
between the view that I want (one file per package, but version 
history per subprogram, or other segment of a file) and the view of 
the version control system.

But in my context, the need is not so great. I'm just day-dreaming.

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
       .      @       .



  reply	other threads:[~2008-02-23 13:03 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-22 17:35 Separate Compilation in Programming Languages adaworks
2008-02-22 17:52 ` Dirk Heinrichs
2008-02-23  0:23   ` adaworks
2008-02-22 18:10 ` Ray Blaak
2008-02-22 23:53   ` adaworks
2008-02-23  1:40     ` Ray Blaak
2008-02-23  7:29       ` adaworks
2008-02-23 18:42         ` Ray Blaak
2008-02-22 18:18 ` Niklas Holsti
2008-02-23  0:14   ` adaworks
2008-02-23  7:23     ` Niklas Holsti
2008-02-23  7:31       ` Niklas Holsti
2008-02-23 16:00         ` adaworks
2008-02-23 12:27     ` Georg Bauhaus
2008-02-23 12:37   ` Dirk Heinrichs
2008-02-23 13:03     ` Niklas Holsti [this message]
2008-02-22 19:11 ` Dmitry A. Kazakov
2008-02-23  0:16   ` adaworks
2008-02-22 19:33 ` Larry Kilgallen
2008-02-22 20:47 ` Simon Wright
2008-02-22 21:27 ` Robert A Duff
2008-02-23  0:12   ` adaworks
2008-02-23 10:28     ` framefritti
2008-02-23 12:45     ` Dirk Heinrichs
2008-02-23 15:16     ` Robert A Duff
2008-02-23 16:47       ` adaworks
2008-02-23 18:47         ` Ray Blaak
2008-02-24  7:40           ` adaworks
2008-02-24  9:42             ` Ray Blaak
2008-02-24 20:41               ` adaworks
2008-02-25  2:37                 ` Ray Blaak
2008-02-25  7:06                   ` adaworks
2008-02-25 13:12                     ` Robert A Duff
2008-02-25 17:44                     ` Ray Blaak
2008-02-25 22:16                       ` Ray Blaak
2008-02-26  5:10                         ` John W. Kennedy
2008-02-26 19:08                           ` Ray Blaak
2008-02-26  7:11                         ` adaworks
2008-02-26 13:38                           ` Stephen Leake
2008-02-26 14:56                             ` adaworks
2008-02-26 19:15                               ` Ray Blaak
2008-02-26 19:13                           ` Ray Blaak
2008-02-26 21:25                             ` Ray Blaak
2008-02-27  1:15                               ` Robert A Duff
2008-02-26  7:06                       ` adaworks
2008-02-26 11:42                       ` Alex R. Mosteo
2008-02-26 15:05                         ` adaworks
2008-02-26 15:15                           ` Alex R. Mosteo
2008-02-24 17:26             ` Robert A Duff
2008-02-23 20:46         ` Robert A Duff
2008-02-24  7:31           ` adaworks
2008-02-24 17:20             ` Robert A Duff
2008-02-24 20:33               ` adaworks
2008-02-25  1:07                 ` Robert A Duff
2008-02-26  7:29                   ` adaworks
2008-02-26 19:22                     ` Ray Blaak
2008-02-27  1:58                       ` adaworks
2008-02-27 20:34                         ` Ray Blaak
2008-02-27 22:31                           ` Robert A Duff
2008-02-27 23:35                             ` Ray Blaak
2008-02-28  0:19                               ` Randy Brukardt
2008-02-28  9:18                               ` Georg Bauhaus
2008-02-29  5:57                             ` adaworks
2008-02-29  6:04                               ` Ray Blaak
2008-02-29 10:48                                 ` Alex R. Mosteo
2008-02-29 17:05                                 ` adaworks
2008-02-29 18:33                                   ` Ray Blaak
2008-02-29  6:10                           ` adaworks
2008-02-22 22:16 ` Jeffrey R. Carter
2008-02-23 13:44 ` Brian Drummond
2008-02-23 17:19   ` adaworks
2008-02-25  7:53 ` Jean-Pierre Rosen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox