szmer
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
lemtoman@lemmy.ml to Rust Programming@lemmy.ml · 3年前

Are there other languages that rust where enums can store data?

message-square
message-square
2
fedilink
7
message-square

Are there other languages that rust where enums can store data?

lemtoman@lemmy.ml to Rust Programming@lemmy.ml · 3年前
message-square
2
fedilink
  • northbound_goat
    link
    fedilink
    arrow-up
    7
    ·
    edit-2
    2年前

    deleted by creator

    • Ephera@lemmy.ml
      link
      fedilink
      arrow-up
      7
      ·
      3年前

      Yeah, in language theory, this kind of thing is called an “Algebraic Data Type”: https://en.wikipedia.org/wiki/Algebraic_data_type

Rust Programming@lemmy.ml

rust@lemmy.ml

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: !rust@lemmy.ml
Visibility: Public
globe

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

  • 1 user / day
  • 4 users / week
  • 19 users / month
  • 521 users / 6 months
  • 13 local subscribers
  • 8.73K subscribers
  • 365 Posts
  • 910 Comments
  • Modlog
  • mods:
  • Nutomic@lemmy.ml
  • Joe@lemmy.ml
  • AgreeableLandscape@lemmy.ml
  • BE: 0.19.6
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org