On Wed, Aug 7, 2019 at 6:45 AM <lgod...@gmail.com> wrote:
>
> f( g() ) compiles  when g returns exactly the number of args that f() 
> requires, but if g() returns only 1/2 that number  f (g(), g() ) wont compile 
> !! ...Is this not a Golang absurdity  ??

No.  It avoids confusion.  In case you missed Adrian's reply which was
sent to the list, I quote:

    Jan Mercl has already posted the part of the Go language spec that
    mentions this, so I'll just note that this was raised almost 10 years
    ago, and Rob Griesemer explained why it was a Bad Idea to allow it here:
    https://github.com/golang/go/issues/973#issuecomment-142733515

Ian

> On Tuesday, August 6, 2019 at 7:26:46 PM UTC-4, Ian Lance Taylor wrote:
>>
>> On Tue, Aug 6, 2019 at 4:14 PM <lgo...@gmail.com> wrote:
>> >
>> > ?? Am I wrong in saying that the statements I've submitted conform to "As 
>> > a special case, if the return values..."
>>
>> The special case applies to f(g()) only.  It does not apply to f(g1(), g2()).
>>
>> Ian
>>
>>
>> > On Monday, August 5, 2019 at 11:38:24 PM UTC-4, L Godioleskky wrote:
>> >>
>> >> For f1 defined as func f1(k1, k2, k3 int) (x1, x2 int) {..}
>> >> and f2 defined as func f2(x,y int)           (xR int)       {..}
>> >>
>> >> Why does the compiler complain about the call stmt
>> >> f2 ( f1 (1,2,3)  )   ??
>> >
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "golang-nuts" group.
>> > To unsubscribe from this group and stop receiving emails from it, send an 
>> > email to golan...@googlegroups.com.
>> > To view this discussion on the web visit 
>> > https://groups.google.com/d/msgid/golang-nuts/d8cd287f-2a18-4143-8579-c92fdd6a3fa6%40googlegroups.com.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/013d64ed-1048-4121-8930-bd25909ef96d%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcUVw0-CaFx6ZQT-WkiMGjeuk0By5njBDbufxoFiS2YgpQ%40mail.gmail.com.

Reply via email to