[M3devel] [M3commit] CVS Update: cm3

Olaf Wagner wagner at elegosoft.com
Thu Feb 21 11:42:25 CET 2008


Quoting Jay <jayk123 at hotmail.com>:

> I have some ideas here that I am pretty certain WILL be acceptable.
> But I'd like to know if the current behavior really isn't.
>
> The ideas are:
> 1)
>  (* A well designed approach might look like this,    however how do  
>  we determine the target behavior?
>   Seps_t = RECORD    (* Whenever a character must be "written",   
> DirSepChar is used.    DirSepChar and DirSepCharAlt compare equal.    
>   *)    DirSepChar    : CHAR;    DirSepCharAlt : CHAR;    VolSep      
>     : CHAR;    DirSepText    : TEXT;  END;
>   SepKind_t = { Unix, Win, Winx };
>
> CONST
>   Seps = ARRAY SepKind_t OF Seps_t {    (* Unix *) Seps_t { '/',    
> '/',  '\000', "/"  },    (* Win  *) Seps_t { '\\', '/',  ':',      
> "\\" },    (* Winx *) Seps_t { '/',  '\\', ':',    "/"  },  };
>   *)
> and then I think m3middle would have to specify the behavior of each  
>  target -- of course most are "Unix".
>
> 2) less work for now, very much like the current behavior, except   
> Colon changes from CONST to VAR and is ':' if the environment   
> variable OS == "Windows_NT", else '\000'. The support for   
> backslashes could key off this too, though I believe it is FAR less   
> controversial.
>
> Also, I want to move m3path.m3 into a lower layer so it useable a   
> little more.
> Like into m3quake (QPath?) or m3middle (M3Path?).
>
> However I worry about the effect on source control history.
> Advise?
>
> For now I've got one path function in one m3quake file, another path  
>  function in another m3quake file, and everything else remaining in   
> cm3/src/M3Path.m3.

I agree that we should have one central abstraction of the pathanme
type. What about pushing it further into libm3/.../Pathname? This would
need carefully checking of compatibility of course. Also I wouldn't
like to see variables exposed in such a module; we should use
functions or procedures for everything there.

Do you see any problem in providing such a globally unique and
compatible abstraction?

Could you provide a complete (documented) Pathname module that could be
discussed on this list and tested by everybody interested?

Olaf
-- 
Olaf Wagner -- elego Software Solutions GmbH
                Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95
    http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194




More information about the M3devel mailing list