Lemmy.World
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
eifachposteBM to Kagi Small Web Appreciated RSS FeedEnglish · 23 days ago

The select Statement

internals-for-interns.com

external-link
message-square
0
link
fedilink
  • cross-posted to:
  • [email protected]
2
external-link

The select Statement

internals-for-interns.com

eifachposteBM to Kagi Small Web Appreciated RSS FeedEnglish · 23 days ago
message-square
0
link
fedilink
  • cross-posted to:
  • [email protected]
The select Statement | Internals for Interns
internals-for-interns.com
external-link
In the previous article we walked through slices, maps, and channels, and how each of them is structured under the hood. Out of those three, channels are probably the most involved one in terms of how you actually use them — and there’s one language construct that really stands out when working with channels: the select statement. That’s what we’re going to be talking about in this post. And maybe I’m cheating a little here, because this article isn’t strictly about the runtime — select falls in between the runtime and the compiler — but that’s exactly what makes it an interesting corner of Go: it looks like a switch, behaves like a switch, and yet underneath it’s a coordinated dance between the compiler and the runtime.
alert-triangle
You must log in or # to comment.

Kagi Small Web Appreciated RSS Feed

kagismallweb

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 30 users / day
  • 168 users / week
  • 438 users / month
  • 1.14K users / 6 months
  • 96 local subscribers
  • 121 subscribers
  • 12.3K Posts
  • 282 Comments
  • Modlog
  • mods:
  • eifachposteB
  • UI: 0.19.19-4-g32c157fc
  • BE: 0.19.19-8-g30bb3e220
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org