[Haskell-cafe] GHC Extension Proposal: ArgumentBlock
ekmett at gmail.com
Tue Sep 8 14:54:09 UTC 2015
On Tue, Sep 8, 2015 at 10:10 AM, Michal Antkiewicz <
mantkiew at gsd.uwaterloo.ca> wrote:
> +1 for the change but not for an extension. Here's why
> 5. The only reason to guard changes behind LANGUAGE pragmas should be when
> they are causing problems with other extensions.
There is a massive downside to this view. It only permits monotonic
progress in one direction. If we later learn about a better thing we could
have done, you can never really retract it.
There are a lot of historically proposed extensions that 'don't break
anything' that you've never heard of that subtly conflict with other
extensions that 'don't break anything'.
Trex-records, half a dozen layout rule variants, I don't know how to
resolve both naked existential types in UHC and type families in GHC...
Each of these chip away at some innocuous corner of our syntax or
semantics, but in aggregate they'd leave us no room to grow, and no ability
to know if we'd written portable, standards compliant, code.
The LANGUAGE pragma is an annoying tax, but I think the long term benefits
in terms of readability of new extensions makes it worth it. Look at
languages like C++ and what horrible things they have to call everything to
avoid conflicting with every random historical idea baked into the
standard. Let's not go down that road.
You can always amortize the cost of those LANGUAGE pragmas by embedding
them in the extensions field of your cabal file if you feel they must be on
at all times in the code you write -- and since the ones you are interested
in are 'just extensions that don't break anything' this causes you no pain
when reading other people's code as they just don't use your favorite
> On Tue, Sep 8, 2015 at 12:56 AM, Andrew Gibiansky <
> andrew.gibiansky at gmail.com> wrote:
>> In order to get a feel for using this extension in real-world Haskell,
>> take a look at the new ghc-reskin package:
>> This allows you to use ArgumentBlock *today* by passing GHC a few
>> parameters to tell it to use ghc-reskin as a preprocessor. Take a look at
>> the README for a full example.
>> -- Andrew
>> On Mon, Sep 7, 2015 at 9:02 PM, Bardur Arantsson <spam at scientician.net>
>>> On 09/08/2015 03:08 AM, Dan Burton wrote:
>>> > +1 people who like it can use it and people who don't like it don't
>>> have to
>>> > use it. Personally I wish it were the default because the superfluous $
>>> > confuses a lot of people coming from other languages like Ruby.
>>> Whether it's "superfluous" depends entirely on one's PoV.
>>> > You can even write in the old style if you have the extension turned
>>> on. It
>>> > doesn't disable the old way of doing things. It just allows a new way.
>>> > entirely backwards compatible with working code when turned on, is it
>>> Except now there are two "dialects" everybody has to read/understand.
>>> That's not progress IMO. (Considering that it's so little gain. I really
>>> don't understand the hatred of $ that some people seem to have.)
>>> Haskell-Cafe mailing list
>>> Haskell-Cafe at haskell.org
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe