RFC: "Native -XCPP" Proposal

Kosyrev Serge _deepfire at feelingofgreen.ru
Wed May 6 15:51:51 UTC 2015


Stephen Paul Weber <singpolyma at singpolyma.net> writes:
>>As you may be aware, GHC's `{-# LANGUAGE CPP #-}` language extension
>>currently relies on the system's C-compiler bundled `cpp` program to
>>provide a "traditional mode" c-preprocessor.
>
> Yes.  This is one of my favourite things in GHC-land -- that an existing,
> good-enough, standardised, and widely-deployed solution was chosen over a NiH
> reinvention of preprocessing.

(Note: here I assume that my irony detector is hopelessly broken..)

At the risk of spreading dangerous novelty..

..come on, the C preprocessor *is* a NIH reinvention of proper metaprogramming,
and the word used to denote it ("preprocessing") betrays it so badly.

As an example:

  http://www.lispworks.com/documentation/HyperSpec/Body/24_abaa.htm

Why can't we make TH be more like that?

-- 
respectfully,
Косырев Серёга


More information about the ghc-devs mailing list