The let-in-end construct is borrowed from ML: ATS can be said
to belong to the ML family of functional programming languages.
In a call-by-value language, one needs to explicitly specify whether
a value is recursively defined or not. If you don't use 'val', then you
need something else. For instance, one may need to have both let and
letrec.
By the way, ATS support 'where', too:
fun f(x: int): int = y where { val y = x + x }
On Monday, October 23, 2017 at 2:59:09 PM UTC-4, Russoul wrote:
>
> It is probably a useless question but why do we have "let in end"
> construct in ats? It is verbose and you have to write a new one in each
> inner scope, for example inside "if else" statement. Haskell goes well
> just with "let in" plus it has "where" which is very neat sometimes.
>
> And also "val _ =..."'s go crazy sometimes.
>
> ATS is very expressive which already leads to increased code size.
>
>
--
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/19f1e0c3-69d4-4915-89e8-90813da99d88%40googlegroups.com.