Hi Guys, Thanks for the discussion.
As usual I don't fully understand or recall some of the relevant issues.
In the online editor I quickly tried out this:
fun double (n: int) :<1> int = n + n
val () = println! ("double(5) = ", double(5))
Which works. But changing :<1> to :<0> fails to compile; i also tried a
non-polymorphic identity function for ints and had the same result. So what
does :<0> really mean?
I think if we had (1), a way to keep track of purity, i.e., any expressions
returning unit must be equivalent to the expression () (hopefully this
isn't hard to check..), and (2), a way to tell the compiler to assume that
":" assumes :<0> by default, then we might just get purity checking done
for free.
On Tuesday, May 7, 2019 at 3:35:06 AM UTC-4, [email protected] wrote:
>
> On Monday, May 6, 2019 at 10:21:40 AM UTC+3, Richard wrote:
>>
>> Oops, did not see you responded Artyom!
>>
>
> Richard you're very welcome to put your own suggestions! Better to
> reiterate twice than none at all. :-)
>
--
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/4a1919ed-8478-480c-95b1-a0c0653cd81c%40googlegroups.com.