[Haskell-cafe] Proposal: Shorter Import Syntax

Kosyrev Serge _deepfire at feelingofgreen.ru
Sun Jun 7 00:46:57 UTC 2015


Alexander Kjeldaas <alexander.kjeldaas at gmail.com> writes:
> On Sat, Jun 6, 2015 at 10:26 AM, Vlatko Basic <vlatko.basic at gmail.com> wrote:
>     Maybe a slightly changed syntax like this could be less confusing
>     
>     import Data.Map (Map) andAs M (...)
>     
>     or
>     
>     import Data.Map (Map) and as M (...)
>     
>     
>     It is clear (IMHO) what is coming from where, and both lists are at the end of
>     their part, so can be written nicely in several rows, if needed.
>     
>     
>     import Data.Map (Map)
>     andAs M (lengthy,
>     list)
>
> I much prefer a syntax with a bit more words, like this one. The original proposal
> is simply impossible to understand without reading a manual. It has at least two
> equally valid interpretations.
>
> Adding one or two words like in this examples makes it possible, without reading a
> manual, to distinguish between possible interpretations. I think that must be a
> minimal requirement for such a syntax extension. Nobody needs to hire a language
> lawyer to understand a python import statement. That shouldn't be needed for
> Haskell either.

In the seemingly prevalent spirit of vote-counting, an empathic +1.

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


More information about the Haskell-Cafe mailing list