Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #3158
| From | Christopher F Clark <christopher.f.clark@compiler-resources.com> |
|---|---|
| Newsgroups | comp.compilers |
| Subject | Re: Wrestling with phase 1 of a C compiler |
| Date | 2022-09-13 14:55 +0300 |
| Organization | Compilers Central |
| Message-ID | <22-09-006@comp.compilers> (permalink) |
| References | <22-09-001@comp.compilers> <22-09-004@comp.compilers> <22-09-005@comp.compilers> |
I never used the PL/I preprocessor myself. However, at my first job (at SofTech), my mentor (Carl Martin) made some PL/I macros that *loosely* translated a subset of Jovial into Multics PL/I. It was still PL/I semantics, but Jovial syntax. That allowed us to write our Jovial compilers in that subset of Jovial and get it working before it could become self-hosting. But notice that these were mostly minor syntactic changes and no error checking, no semantic changes, etc. It was only used for one project and one team and two compilers (one targeting Multics and the other targeting the Interdata 8/32). So, the fact that it wasn't very robust wasn't an issue. This is very different than trying to make a functional library in an imperative language. ---------- On a related note, I have heard stories from C++ compiler implementors about the various template libraries that have been created which attempt to do "Turing machine" style (NP-complete) computations via types and parameters, where the users wonder why the compilation process takes much longer than running the resultant program. This is the kind of mess one makes when one sees a hammer and treats screws as nails. Yes, with enough force you can pound a screw into wood (or a wall) but the result is NOT a good fastener. Screws are threaded for a reason and nails are not for the complementary reason. Different semantics. I rarely create my own C++ templates nor Rust macros for that reason. It is too easy to create things that look clever but are essentially undecipherable. As the saying goes: "With great power comes great responsibility." Kind regards, Chris -- ****************************************************************************** Chris Clark email: christopher.f.clark@compiler-resources.com Compiler Resources, Inc. Web Site: http://world.std.com/~compres 23 Bailey Rd voice: (508) 435-5016 Berlin, MA 01503 USA twitter: @intel_chris ------------------------------------------------------------------------------
Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar
Wrestling with phase 1 of a C compiler luser droog <luser.droog@gmail.com> - 2022-09-07 09:47 -0700
Re: Wrestling with phase 1 of a C compiler luser droog <luser.droog@gmail.com> - 2022-09-09 20:47 -0700
Re: Wrestling with phase 1 of a C compiler luser droog <luser.droog@gmail.com> - 2022-09-11 20:15 -0700
Wrestling with phase 1 of a C compiler Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2022-09-12 21:45 +0300
Re: Wrestling with phase 1 of a C compiler gah4 <gah4@u.washington.edu> - 2022-09-12 13:01 -0700
Re: Wrestling with phase 1 of a C compiler Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2022-09-13 14:55 +0300
Re: Wrestling with phase 1 of a C compiler gah4 <gah4@u.washington.edu> - 2022-09-14 15:40 -0700
Re: source languages, was Wrestling with phase 1 of a C compiler George Neuner <gneuner2@comcast.net> - 2022-09-14 16:03 -0400
Re: Wrestling with phase 1 of a C compiler luser droog <luser.droog@gmail.com> - 2022-09-14 14:31 -0700
Re: Wrestling with phase 1 of a C compiler luser droog <luser.droog@gmail.com> - 2022-09-15 20:11 -0700
csiph-web