Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
wazzaps
on Sept 19, 2023
|
parent
|
context
|
favorite
| on:
Fixing for loops in Go 1.22
Copying a mutex by value (thus duplicating the lock, causing deadlocks or worse) is far too easy
icholy
on Sept 19, 2023
|
next
[–]
`go vet` catches this.
mhh__
on Sept 19, 2023
|
parent
|
next
[–]
I use a tool called "type theory"
icholy
on Sept 19, 2023
|
root
|
parent
|
next
[–]
Keep posting about D, I'm sure it will catch on soon.
erik_seaberg
on Sept 19, 2023
|
parent
|
prev
|
next
[–]
Is there a way to declare any type uncopyable? This is something I always thought Ada got right.
smasher164
on Sept 19, 2023
|
root
|
parent
|
next
[–]
you stick this in your struct
type noCopy struct{} func (*noCopy) Lock() {} func (*noCopy) Unlock() {}
usefulcat
on Sept 19, 2023
|
prev
[–]
Wow, even c++ won't let you do that (without invoking undefined behavior, anyway).
Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: