About 'val's, in cases when 'val' is used only to bind void result of some
expression why can't we omit 'val () =' part ?
And I still don't understand how 'val' helps with explicit notation of
whether a value is recursively defined or not. Could you explain it a bit
further ?
Missed the fact that 'where' is supported, sorry.
вторник, 24 октября 2017 г., 3:36:41 UTC+3 пользователь gmhwxi написал:
>
>
> 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/ab93b57f-f265-4d7c-a93e-437c605a4068%40googlegroups.com.