In ML, 'let' is for introducing a local scope for an expression while
'local' is for
introducing a local scope for declarations.

On Sat, Apr 13, 2019 at 6:20 PM aditya siram <[email protected]> wrote:

> Am I right in thinking that the difference between a let/where and local
> is that the latter allows sharing scope across multiple declarations
> whereas the former only allows one?
>
> For example if I wanted local bindings for some 'val a' I could do:
>
> val a = ... where { ... some bindings ... }
>
>
>
> or:
>
> local
>   ... some bindings ...
> in
>   val a = ...
> end
>
>
>
> but if I wanted share a local scope between 'val a' and 'val b' I'd have
> to do:
>
> l
> ocal
>   ...
> in
>   val a = ...
>   val b = ...
> end
>
>
>
> since there is no way to do that with 'let' or 'where'.
>
> Is it correct that this is the only difference?
>
> Thanks!
> -deech
>
> --
> You received this message because you are subscribed to the Google Groups
> "ats-lang-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/ats-lang-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ats-lang-users/f0ddb692-7b08-4019-868d-cdf697994bf5%40googlegroups.com
> <https://groups.google.com/d/msgid/ats-lang-users/f0ddb692-7b08-4019-868d-cdf697994bf5%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLrbEyV7GhFQaF0EX-axw_3OoNZg0gJMaePznizoCZtLuQ%40mail.gmail.com.

Reply via email to