[M3devel] religion, philosophy, Posix vs. Win32
Jay
jayk123 at hotmail.com
Mon Jan 14 00:36:40 CET 2008
The conclusion here is:
Just try to convince me otherwise. :)
The gist of the question is:
Just what characteristics of "Posix" and "Win32" should "NT386GNU" have?
Just what characteristics of "Posix" do people notice and like?
You can't say "the whole thing". :)
Restated:
What is Posix? I don't mean, where is the standard document web site.
I mean what is it TO YOU?
Is it open/read/write/close?
Is it fork?
Is it sbrk?
On these previous ones, they are interesting to many programmers,
but Modula-3 already layers over all this, so these are unlikely defining
characteristics here.
Is it sh? Probably somewhat. But if have you sat in Cygwin sh much vs. cmd?
It is annoying. Command line history is flaky. Paths are munged to say /cygdrive.
You lose the critical F8 command line completion against history feature.
You lose a lot of editing capability, but do gain some alternate possibly "portable"
similar.
Is it Perl? No.
Is it X Windows. I doubt it.
Is it pthreads? Probably not.
Or at least vtalarm? Maybe?
Or setjmp/longjmp? Ok.
Longjmp to the same buffer multiple times? Not likely.
Longjmp to a place that has already returned? Not likely.
All full paths starting with a forward slash? Maybe.
Backward slash being a valid non-seperator path character? Maybe.
Think about that last one.
It is valid and occurs in Win32 code to treat forward slash and backward slash the same.
Some code does, some code does not.
What if you just did that unconditionally, like even in Posix?
What is the role of backward slash in Posix paths? It either just doesn't occur,
or is an escape character, or is a regular character. Something at a low level
could replace the backward slashes with forward slashes.
I would like to change the code in m3-sys/cm3/m3path.m3 to treat backward slashes
and forward slashes the same. Backward slashes just won't occur on Posix, right?
So far I have managed without this change, but not having it has bitten me a few times.
I do have the analogous change to the Win32 path code in m3core.
It is the redundant filenames libfoo.a instead of foo.lib and libfoo.so instead of foo.so?
Perhaps. This seems dumb, redundant to me. Why have prefixes and suffixes?
Don't suffixes suffice?
That all said, I remain convinced that a useful intermediate or probably endpoint
is a toolset that targets Windows using cm3cg, ld, as, but otherwise looks like
NT386 as much as possible. MAYBE alter the library names to libfoo.*.
sh and make are needed for building cm3cg.
I did use Cygwin for that. MinGWin sounds promising here too but I haven't tried.
- Jay
_________________________________________________________________
Get the power of Windows + Web with the new Windows Live.
http://www.windowslive.com?ocid=TXT_TAGHM_Wave2_powerofwindows_012008
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20080113/81e611ab/attachment-0001.html>
More information about the M3devel
mailing list