* Karan Chaudhary [170928 08:50]:
> I'm trying to find rationale for this: why is "defer foo(x)" treated
> differently than "defer func() { foo(x) }" by the language designers?
Here is what the language spec says:
Each time a "defer" statement executes, the function value and
parameters to
On Thu, Sep 28, 2017 at 2:50 PM Karan Chaudhary wrote:
> I'm trying to find rationale for this: why is "defer foo(x)" treated
differently than "defer func() { foo(x) }" by the language designers?
They are not treated differently. The defered functions are different.
--
-j
--
You received t
I see.
I'm trying to find rationale for this: why is "defer foo(x)" treated
differently than "defer func() { foo(x) }" by the language designers?
On Thursday, 28 September 2017 17:57:45 UTC+5:30, Jan Mercl wrote:
>
> On Thu, Sep 28, 2017 at 2:18 PM Karan Chaudhary > wrote:
>
> That's expected,
On Thu, Sep 28, 2017 at 2:18 PM Karan Chaudhary wrote:
That's expected, the specs say that execution of the defer statement
evaluates the arguments of the deferred function.
--
-j
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscrib