To clarify I am suggesting a single, multi equals let as the way it should
be done, not necessarily the way other people do it.

REPL loops are by definition not expressions. Each expression that returns
a result is a command or a statement and is imperative.

In a pure functional language like Haskell you would need to be in the IO
monad to write a REPL loop.

Keean.
On 3 May 2015 15:06, "Matt Rice" <[email protected]> wrote:

> On Sun, May 3, 2015 at 6:42 AM, Keean Schupke <[email protected]> wrote:
> >The syntax usually used
> > for your example is:
> >
> > let x = 3,
> >      y = 4
> > in x + y
>
> afaict they don't have multiple = let, so they would have to use
> let (x, y) = (3, 4)
> in x + y
>
> or the long form of
> let x = 3 in
>    let y = 4 in x + y
>
> I don't find that a compelling reason
>
> the only reason which i find might be (potentially) compelling is
> replacing:
>
> let x = someList
>      y = someOtherList
> in
>    let foo = someSlowOperationOn(someList)
>         bar = someSlowOperationOn(someOtherList) in
>    in someResult(foo,bar)
>
> into:
> let x = someList
>      y = someOtherList
> in let foo = someSlowOperationOn(someList)
>      & let bar = someSlowOperationOn(someOtherList)
>       in  someResult(foo, bar)
>
> rather than:
> let x = someList
>      y = someOtherList
>  in let foo =  someSlowOperationOn(someList) in fn result(x) =>
> someResult(foo, x) let bar = someSlowOperationOn(someList) in bar
>
> that is that two let declarations only use parameters from their
> parent environments, and not from every leaf in the sequential
> evaluation which multiple let assignments use...
> _______________________________________________
> bitc-dev mailing list
> [email protected]
> http://www.coyotos.org/mailman/listinfo/bitc-dev
>
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to