[Haskell-cafe] Proposal: New syntax for Haskell

Alberto G. Corona agocorona at gmail.com
Tue Sep 10 13:43:16 CEST 2013


That was done around 100 years ago with COBOL.


2013/9/10 Vo Minh Thu <noteed at gmail.com>

> The syntax is actually used by non-technical people to write tests.
> Using it to write Haskell code is a joke. (Using it for business
> specification is not, even if for technical people this seems
> overkill.)
>
> Thu
>
> 2013/9/10 Ian Ross <ian at skybluetrades.net>:
> > Me too, but I wasn't brave enough to say so after people seemed to be
> taking
> > it seriously...
> >
> >
> > On 10 September 2013 13:33, Roman Cheplyaka <roma at ro-che.info> wrote:
> >>
> >> * John Wiegley <johnw at fpcomplete.com> [2013-09-10 04:48:36-0500]
> >> > >>>>> Niklas Hambüchen <mail at nh2.me> writes:
> >> >
> >> > > Code written in cucumber syntax is concise and easy to read
> >> >
> >> >     concise |kənˈsīs|, adj.
> >> >
> >> >     giving a lot of information clearly and in a few words; brief but
> >> >     comprehensive.
> >> >
> >> > Compare:
> >> >
> >> >     Scenario: Defining the function foldl
> >> >       Given I want do define foldl
> >> >       Which has the type (in brackets) a to b to a (end of brackets),
> >> >                          to a, to list of b, to a
> >> >       And my arguments are called f, acc, and l
> >> >       When l is empty
> >> >       Then the result better be acc
> >> >       Otherwise l is x cons xs
> >> >       Then the result should be foldl f (in brackets) f acc x
> >> >                                 (end of brackets) xs
> >> >
> >> > To:
> >> >
> >> >     foldl :: (a -> b -> a) -> a -> [b] -> a
> >> >     foldl f z []     = z
> >> >     foldl f z (x:xs) = foldl f (f z x) xs
> >> >
> >> > How is that more concise or preferable?
> >>
> >> I thought it was a joke.
> >>
> >> Roman
> >>
> >> _______________________________________________
> >> Haskell-Cafe mailing list
> >> Haskell-Cafe at haskell.org
> >> http://www.haskell.org/mailman/listinfo/haskell-cafe
> >>
> >
> >
> >
> > --
> > Ian Ross   Tel: +43(0)6804451378   ian at skybluetrades.net
> > www.skybluetrades.net
> >
> > _______________________________________________
> > Haskell-Cafe mailing list
> > Haskell-Cafe at haskell.org
> > http://www.haskell.org/mailman/listinfo/haskell-cafe
> >
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
Alberto.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130910/f70f73b1/attachment.htm>


More information about the Haskell-Cafe mailing list