monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Re: comments on win32 patches


From: Nathaniel Smith
Subject: Re: [Monotone-devel] Re: comments on win32 patches
Date: Mon, 28 Feb 2005 09:38:51 -0800
User-agent: Mutt/1.5.6+20040907i

On Mon, Feb 28, 2005 at 11:52:56AM +0100, Jon Bright wrote:
> >The goal of things like platform.hh is to shield the rest of the code
> >from having to have platform configury stuff sprinkled all through it.
> >Surely we could just have exists_in_path() defined in both places
> >(maybe _not_ in platform.hh, if it turns out that the implementation
> >would be identical), and leave out iswin32() altogether?
> 
> Can do.  The LUA version of exists_in_path is the simpler for the Unix 
> side, but the C version is much simpler for the Win32 side, hence the 
> way I did it - but it's easy enough to convert the LUA Unix version to C.

This feels like one of those places where special-casing isn't worth
it, because while the special case is simpler, you could just use the
general case, have better test coverage, and simpler code overall.  I
could be wrong though, if Unix's path semantics are very complicated
(which seems unlikely?).

> >>- chmod (at least for current use, only needed for Unix)
> >>- Unfortunately, chmod needs the mode-munching stuff
> >
> >Maybe we could just expose a make_executable(<path>) function?
> 
> Can do.  This function's basically null for Win32.

Right.

> >I don't see anything we're particularly likely to need.
> >
> >http://c2.com/cgi/wiki?YouArentGonnaNeedIt ;-)
> 
> Applies more to implementing code than deleting it :-)

On the contrary.  Deleting code means you don't have to maintain it,
and reduces the interlocking constraints in your system, giving you
more freedom in implementing other things.  Usually, these factors
free up much more time than you (might, possibly, maybe) save by not
having to rewrite the code later... especially since you don't
actually have to rewrite it, seeing as we have this nice VCS all the
code is in ;-).

-- Nathaniel

-- 
"Lull'd in the countless chambers of the brain,
Our thoughts are link'd by many a hidden chain:
Awake but one, and lo! what myriads rise!
Each stamps its image as the other flies"
  -- Ann Ward Radcliffe, The Mysteries of Udolpho




reply via email to

[Prev in Thread] Current Thread [Next in Thread]