Trent W. Buck wrote:
> Kari Hoijarvi <[email protected]> writes:
> 
>> Dan Pascu wrote:
>> Program is stored as a tree, and the IDE pretty prints it, the way you
>> choose to.
> 
> I believe Smalltalk and Factor do something like this.
> 
> To handle arbitrary source formats in this way (which is what Darcs
> would need to do), you need two steps:
> 
>   - a READ procedure, which converts the working tree into a normal
>     form.  For example, a C language READ might utilize gccxml, and a
>     ReStructured Text READ would use rst2xml.
> 
>   - a SHOW procedure, which converts the internal representation (normal
>     form) to something the user can edit without going insane.
> 
> Each user can then customize SHOW so that the working tree uses their
> preferred "style", e.g. literal tabs vs. spaces.
> 
> This is a non-trivial task to implement.  In particular, if your READ
> procedure has a bug, you can easily get completely screwed.  I spoke
> once to someone who tried to use lint (with svn, IIRC) for this purpose,
> and they discovered that it would break some of their more complex cpp
> macros.

... and then there is the fun that David Roundy liked to point out: how 
many of us program in complete compilable (and thus 
deconstructable/reconstructable) code *all the time*?  What if you want 
to save a non-working fragment in progress?  What if you make a tiny 
mistake and the file fails to parse correctly?

You need either extremely hardened parsers that can withstand and well 
recover from error...  or separate patch types/source control systems 
for works in progress versus tested/compiled files...

--
--Max Battcher--
http://worldmaker.net
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to