[Haskell-cafe] Proposal: Shorter Import Syntax

Anthony Cowley acowley at seas.upenn.edu
Thu Jun 4 21:20:07 UTC 2015



> On Jun 4, 2015, at 4:46 PM, Herbert Valerio Riedel <hvr at gnu.org> wrote:
> 
> On 2015-06-04 at 22:23:26 +0200, Bardur Arantsson wrote:
> 
> [...]
> 
>>> Preserving the "qualified" keyword is better than no change at all,
>>> but is, I think, gratuitous preservation of a minor wart. Given the
>>> support for the original proposal, I'd hate to snatch defeat from the
>>> jaws of victory here.
>> 
>> (I thought I'd posted this earlier, but I guess not from my news
>> reader's idea of concensus reality as decided by GMANE.org.)
>> 
>> +1 to whatever syntax is decided upon as long as it doesn't break too
>> much existing code (i.e. published/Hackage code). Down with bikeshedding
>> for its own sake! :)
>> [..]
> 
> Clearly, this new syntax won't be available by default when only
> 
>  {-# LANGUAGE Haskell2010 #-}
> 
> is active. So I assume this is going to be a new language extension
> enabled by a new to-be-named LANGUAGE-pragma (and if it stands the test
> of time, be enabled by default in, say {-# LANGUAGE Haskell2020 #-})? If
> so, why is it a concern if there's code breakage, as this new syntax
> will be an explicit opt-in?
> 
> Cheers,
>  hvr

1) Most language extensions allow new syntax, but don't break existing code. To the extent that there is breakage, it is vastly more minimal than something like disallowing the "qualified" keyword. The original proposal sticks with that tradition: nothing breaks, more is allowed.

2) The notion that Haskell has a standard is a needless drag on usage of the language. GHC can, and probably should, have a compatibility mode for historical reasons, but the language standard hasn't been touched in five years, and the last edition consisted of minor changes to what is now a 17 year old standard. There is no language committee, and no manifest expectation of updating the standard. There is a single compiler in wide use, and common use of that compiler involves manually enabling half a dozen extensions. C++ manages an infinitely healthier update process despite living in a war zone between competing interests. We are simply plagued by intransigence.

3) Enough people disagree with point 2 that ShortImports would be needed as an extension.

Anthony



More information about the Haskell-Cafe mailing list