Varargs functions?

43 views
Skip to first unread message

Shea Levy

unread,
Sep 13, 2014, 11:47:44 AM9/13/14
to ats-lan...@googlegroups.com
Hi all,

Does ATS support varargs functions? What about macros or templates with
variable template arguments?

~Shea

Hongwei Xi

unread,
Sep 13, 2014, 1:09:17 PM9/13/14
to ats-lan...@googlegroups.com
Actually, I am not sure whether ATS2 supports varargs. ATS1 does support.
I need to read the code.

Macros with varargs: Yes, I think it is implemented. I need to read the code
to see how the feature can be used.

Templates with variable template arguments: No, it is not supported


~Shea

--
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 ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/20140913154741.GE2275%40nixos.hsd1.nh.comcast.net.

Shea Levy

unread,
Sep 13, 2014, 2:33:47 PM9/13/14
to Hongwei Xi, ats-lan...@googlegroups.com
I see, thanks. Where in the code should I look to find these kinds of things?

~Shea

gmhwxi

unread,
Sep 13, 2014, 3:15:23 PM9/13/14
to ats-lan...@googlegroups.com, gmh...@gmail.com
I had to read the source code for ATS1 and ATS2.

Support for varargs in ATS2 is not finished yet. I may just support typechecking
variadic functions in ATS2 but implementing such functions needs to be done elsewhere.
In ATS1, you can implement variadic functions, but the mechanism is very complex
and thus of little value.

Shea Levy

unread,
Sep 20, 2014, 2:43:11 PM9/20/14
to ats-lan...@googlegroups.com, gmh...@gmail.com
Is something like C's stdarg.h not applicable?

~Shea
> >> email to ats-lang-user...@googlegroups.com <javascript:>.
> >> To post to this group, send email to ats-lan...@googlegroups.com
> >> <javascript:>.
> > --
> > 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 ats-lang-user...@googlegroups.com <javascript:>.
> > To post to this group, send email to ats-lan...@googlegroups.com
> > <javascript:>.
> > Visit this group at http://groups.google.com/group/ats-lang-users.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLrmFNwvVOtCfvc0%2BytH7LoQHVCtp%3DKUTS72oFtxFjVpsg%40mail.gmail.com
> > <https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLrmFNwvVOtCfvc0%2BytH7LoQHVCtp%3DKUTS72oFtxFjVpsg%40mail.gmail.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 ats-lang-user...@googlegroups.com.
> To post to this group, send email to ats-lan...@googlegroups.com.
> Visit this group at http://groups.google.com/group/ats-lang-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/84630ec2-0de0-4d68-b9d9-32445fcd36c6%40googlegroups.com.

gmhwxi

unread,
Sep 20, 2014, 5:04:20 PM9/20/14
to ats-lan...@googlegroups.com, gmh...@gmail.com
I will add stdarg.sats into ${PATSHOME}/libc/. at some point.
Given my past experience,  I would say that it can be quite complicated to
use functions in stdarg.sats. One may just want to use stdarg.h directly instead.
Reply all
Reply to author
Forward
0 new messages