14 ms·
I followed the link for the X32VM DOS extender, and landed at one of those generic domain squatter pages. Anyway, the Digital Mars C/C++ compiler looks impress
by mwcampbell 5y ago
I followed the link for the X32VM DOS extender, and landed at one of those generic domain squatter pages.
Anyway, the Digital Mars C/C++ compiler looks impressive.
- ithkuil 5y agoGenuinely curious: why would I choose the digital mars C/C++ compiler over GCC/clang?
- WalterBright 5y agoThe DMC++ compiler is far and away the best C++ compiler on DOS.
- oso2k 5y agoDeming said...“In God we trust; all others must bring data”. Sagan said..."extraordinary claims require extraordinary evidence".
- jdmoreira 5y agoIt must be though to be Walter Bright on HN. He wrote the compiler himself. he wrote dlang. He has been in this game for a lifetime. He would know, right? I don't think he is the boasting type, even though he has enough reasons to boast… being the only person that ever wrote a C++ compiler by himself and all.
- mhh__ 5y agoAlso remember that he says for DOS not any target. Digital Mars is incredibly old but that makes it perfect for DOS.
- WalterBright 5y agoThe backend is also used for the DMD D compiler.
- oso2k 5y agoI have a lot of respect for Walter Bright. And I agree, he's typically not boastful without good evidence. Walter is also very accomplished. However, DigitalMars compilers on DOS haven't been popular in a very long time. And if there are some good tricks or some sort of advantage to using them for building and maintaining DOS apps and FreeDOS, then there would be a few people interested in exploring & understanding that.
- WalterBright 5y agoThe main cause of that is I was slow to make the compiler open source. It is open source now. https://github.com/DigitalMars/Compiler https://github.com/DigitalMars/Compiler
- WalterBright 5y agoOne thing people should be aware of, is that C++ exceptions and RTTI are unworkable for a 16 bit target. Those have to be disabled for 16 bit code gen. The reason is pretty simple - all the support code would exceed 640K. You wouldn't get past a demo program. Templates work, but you have to be pretty cautious in avoiding template bloat. Probably better off just avoiding them.
- viraptor 5y agoOk, but why / in what way is it better?
- WalterBright 5y agoIt's optimized to the way the x86 works, for example, near/far pointer support. AFAIK gcc and clang do not support near/far.
- messe 5y agoHow does it compare to OpenWatcom? (the only other modern(ish) compiler I'm aware of with near/far support)
- Koshkin 5y agoWatcom was (is?) the best optimizing compiler for 80[3]86, and it included a DOS extender (among other things).
- WalterBright 5y agoWatcom ceased development 25(?) years ago. DMC still gets updates and code gen improvements.
- messe 5y agoThe most recent commit for OpenWatcom, which is what I originally asked about, was 4 hours ago[1] at time of writing. [1]: https://github.com/open-watcom/open-watcom-v2/commit/ac10ed31a002211349c31f777633af5153843615 https://github.com/open-watcom/open-watcom-v2/commit/ac10ed3... (FWIW: I'm in agreement with you that DMC++ is likely superior, I'm more curious about what OpenWatcom's deficiencies in relation to it are, and I reckon there are probably only a few people as familiar and qualified than yourself to comment)
- WalterBright 5y ago