Replies to message #5,069

  • 🔧 Chat is under maintenance.
    🧊 New server is in an office waiting on a mexican.
3

Programming thread

Most languages have it as try-finally, but this is typically paired with exceptions, which Go doesn't have.
Anti Snigger

Programming thread

It's useful for that, but at its core, it allows you to queue up tasks to run upon the scope wrapping up
y a t s

Programming thread

It's the same core idea, but defer is more flexible since you can defer any function, including anonymous ones. You can see my chat client example...
Back
Top Bottom