modula3 / cm3

Critical Mass Modula-3
http://modula3.github.io/cm3/
Other
138 stars 25 forks source link

Reimplement Win32 threads to depends on Vista or Windows 7 or newer. #987

Open jaykrell opened 2 years ago

jaykrell commented 2 years ago

Windows Vista added condition variables. These likely could make for a much better Modula-3 thread implementation than we have presently.

SRWLOCK might help too.

If this is done I have a few requests:

VictorMiasnikov commented 2 years ago

} Do it mostly in C or C++ IMHO, better way is "as minimum C or C++ as possible", i.e. "Do it mostly in Modula-3".

Or even, may be, implement "Modula-2 subset of M3 language" layer, i.e. "Modula-2 with Modula-3 syntax"

jaykrell commented 2 years ago

No. There are distinct significant advantages to C and C++:

They have disadvantages too, granted.

VictorMiasnikov commented 2 years ago

} They can read the system headers.

We can use "SWIG for Modula-3"

} They can be ifdefed.

"C language" haven't "monopoly" for this. See, for example:

GitHub - redstar/m2lang: The LLVM-based Modula-2 compiler ( https://github.com/redstar/m2lang/ )

~ The preprocessor (for handling of directives) is is based on the draft technical report "Interfacing Modula-2 to C", Annex B and aims to be compatible to the Macintosh p1 compiler. Parsing of directives is implemented, with mostly no functionality. ~

P.S.

Minimizing "C language" usage is more "question of beautiful", of course