Lemmy: Bestiverse
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
RSS BotBM to Lobste.rsEnglish · 46 minutes ago

C’s designated initializers give us named arguments

quuxplusone.github.io

external-link
message-square
0
link
fedilink
1
external-link

C’s designated initializers give us named arguments

quuxplusone.github.io

RSS BotBM to Lobste.rsEnglish · 46 minutes ago
message-square
0
link
fedilink
In my previous post I talked about C++’s “relatively nerfed” form of designated initializers. This time I want to show you a neat thing you can do with C’s full-power designated initializers. I first saw this pattern in Ben Klemens’ book 21st Century C (2014), pages 226–228. (Godbolt.)

Comments

alert-triangle
You must log in or register to comment.

Lobste.rs

lobsters

Subscribe from Remote Instance

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: !lobsters@lemmy.bestiver.se
lock
Community locked: only moderators can create posts. You can still comment on posts.

RSS Feed of lobste.rs

Source of the RSS Bot

Visibility: Public
globe

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

  • 29 users / day
  • 152 users / week
  • 438 users / month
  • 1.48K users / 6 months
  • 2 local subscribers
  • 422 subscribers
  • 17.2K Posts
  • 1.26K Comments
  • Modlog
  • mods:
  • patrick
  • RSS BotB
  • BE: 0.19.21
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org