On Sunday, September 30, 2018 at 6:53:47 PM UTC-5, Dave Cheney wrote:
>
> Please don’t take os.File as justification, it’s one of the few uses of a
> finaliser in the std lib. If it were being written today I would argue that
> instead of silently closing the file, it should panic if the
Please don’t take os.File as justification, it’s one of the few uses of a
finaliser in the std lib. If it were being written today I would argue that
instead of silently closing the file, it should panic if the resource falls out
of scope unclosed.
As always, remember that finalisers are not
On Sunday, September 30, 2018 at 4:56:20 PM UTC-5, Kane York wrote:
>
> In Go, it's usually better to use source code analysis to look for
> forgotten Close calls, like the existing tooling for os.File (which does
> have a finalizer, but doesn't need to).
*os.File has a finalizer for the same
In Go, it's usually better to use source code analysis to look for forgotten
Close calls, like the existing tooling for os.File (which does have a
finalizer, but doesn't need to).
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe
On Sunday, September 30, 2018 at 4:00:32 AM UTC-5, Tamás Gulácsi wrote:
>
> 2018. szeptember 30., vasárnap 6:20:37 UTC+2 időpontban Ben Lubar a
> következőt írta:
>>
>> On Saturday, September 29, 2018 at 2:49:19 PM UTC-5, Ian Denhardt wrote:
>>>
>>> Quoting Ben Lubar (2018-09-29 14:40:28)
>>> >
2018. szeptember 30., vasárnap 6:20:37 UTC+2 időpontban Ben Lubar a
következőt írta:
>
> On Saturday, September 29, 2018 at 2:49:19 PM UTC-5, Ian Denhardt wrote:
>>
>> Quoting Ben Lubar (2018-09-29 14:40:28)
>> >[1]https://play.golang.org/p/iBAii-f84Sq
>> >vet is complaining because the
Why do you want a weak pointer? What for?
--
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.
For more options, visit
On Saturday, September 29, 2018 at 2:49:19 PM UTC-5, Ian Denhardt wrote:
>
> Quoting Ben Lubar (2018-09-29 14:40:28)
> >[1]https://play.golang.org/p/iBAii-f84Sq
> >vet is complaining because the unsafe.Pointer usage would normally be
> >dangerous around the garbage collector, but
Quoting Ben Lubar (2018-09-29 14:40:28)
>[1]https://play.golang.org/p/iBAii-f84Sq
>vet is complaining because the unsafe.Pointer usage would normally be
>dangerous around the garbage collector, but since I have a finalizer on
>the "real" pointer and there is no way the code could
https://play.golang.org/p/iBAii-f84Sq
vet is complaining because the unsafe.Pointer usage would normally be
dangerous around the garbage collector, but since I have a finalizer on the
"real" pointer and there is no way the code could access the uintptr with
the same value as the real pointer
10 matches
Mail list logo