>>But I assume you mean more generally that the idea of having a variadic 
function and parsing the first argument to determine the number of 
additional arguments and their types wasn't useful.

It may be useful. But using %s for string, %c for char, etc. does not
look like a good design.

>>Is the variadic function capability what is missing in ATS2? If not, what 
is the difference that ATS1 allows it and ATS2 doesn't?

Variadic functions are supported in ATS2.
To support printf, one needs to parse a constant format string. I did not 
implement such a parser in ATS2.

On Friday, January 12, 2018 at 7:49:45 PM UTC-5, Max Hayden Chiz wrote:
>
> Thank you again for your reply.
>
> On Friday, January 12, 2018 at 5:42:09 PM UTC-6, gmhwxi wrote:
>>
>> ATS1 and ATS2 are very similar modulo minor syntactic differences.
>> There isn't really much point in learning ATS1.
>>
>> I did not implement the printf stuff in ATS2 because it was not 
>> particularly
>> useful.
>>
>
> I agree that printf isn't particularly useful, it was just a toy example 
> that I was playing with.
>
> But I assume you mean more generally that the idea of having a variadic 
> function and parsing the first argument to determine the number of 
> additional arguments and their types wasn't useful.
>  
>
>> I have to say that 'printf' was a poor idea to start with in the first 
>> place.
>> There are a lot more types than letters.
>>
>> >> So printf "%c %f" is of type "Char -> Double -> String"
>>
>> By the say, this is not true printf. The printf supported in ATS1 is a 
>> variadic function
>> (just like in C).
>>
>
> Is the variadic function capability what is missing in ATS2? If not, what 
> is the difference that ATS1 allows it and ATS2 doesn't?
>
>

-- 
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/537ae278-533d-4feb-b99b-ee7728e29737%40googlegroups.com.

Reply via email to