[M3devel] switching to C backend?

Jay K jay.krell at cornell.edu
Sat Jul 18 11:02:03 CEST 2015

 I disagree.  The system is working. This isn't speculation.
  Using his terminology  
  C pros:   - written language (also a con)   - longevity   - does not drive me nuts   - design is very mature    - looks easy and is easy   - huge portability of implementation   - potential portability of object code    - debugability with stock debuggers    - large development teams ("back back end")  - multiple industrial strength "back back ends"   - likely similar compiled performance as anything else   - probably similar compiled performance 

 C cons:   - compiler performance     - debuggability on platforms that have m3gdb support    - cannot always efficiently express things portably,     in particular, portable C has the same inefficient exception      handling; we need to switch to C++ to fix it, or non-portable C      on some platforms (i.e. win32 __try)       
 For garbage collection, I believe C, m3cc, and llvm are currently all equivalent and not good. 
    - Jay

From: dmuysers at hotmail.com
To: jay.krell at cornell.edu; m3devel at elegosoft.com
Subject: Re: [M3devel] switching to C backend?
Date: Sat, 18 Jul 2015 10:42:14 +0200

May I remind you Norman Ramsey’s opinion on the 


Code generation is my business :-)

Comments on a few options:


    Pro: industrial support 
    Con: you have to buy into their type system 
    pretty much completely; depending on what you want to do with types, this 
    may not matter 
    Con: Only Windows platform is really 
    prime-time quality

    Pro: enthusiastic user community with 
    charismatic leader 
    Pro: many interesting performance 
    Con: somewhat complex interface 
    Con: history of holes in the engineering; 
    as LLVM matures expect the holes in the engineering to be plugged by adding 
    to the complexity of the interface

    Pro: target is an actual written language, 
    not an API; you can easily inspect, debug, and edit your C-- code 
    Pro: design is reasonably mature and 
    reasonably clean 
    Pro: supports accurate garbage 
    Pro: most users report it is very easy to 
    Con: very small development team 
    Con: as of early 2009, supports only three 
    hardware platforms (x86, PPC, ARM) 
    Con: does not ship with a garbage 
    Con: future of project is 
  C as target language

    Pro: looks easy 
    Con: nearly impossible to get decent 
    Con: will drive you nuts in the long run; 
    ask the long line of people who have tried to compile Haskell, ML, Modula-3, 
    Scheme and more using this technique. At some point every one of these 
    people gave up and built their own native code 
Summary: anything except C is a 
reasonable choice. For the best combination of flexibility, quality, and 
expected longevity, I'd probably recommend LLVM. But your example code is very 
close to C--, so that may be an advantage.

Full disclosure: I am affiliated with the C-- 


From: Jay K 
Sent: Saturday, July 18, 2015 10:27 AM
To: m3devel 
Subject: [M3devel] switching to C backend?

Any objection if I start switching targets to the C backend? 
In particular, Darwin does not support m3gdb, 
so debuggability is not a factor.
- Jay

M3devel mailing 
M3devel at elegosoft.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20150718/60be99d8/attachment-0002.html>

More information about the M3devel mailing list