Skip to content

suggestions on 2nd edition #773

Closed
Closed
@robnye

Description

@robnye

The 2nd edition is really much clear than 1st one. I love it.

Here are my suggestions,

  • As a C/C++ developer, I'd like to see how "enum" works in detail, especially memory layout. Several years ago, I began to study Haskell, the enum shocked me. From C/C++ viewpoint, enumeration is simple definition of integer and struct/class is flat memory block (virtual table doesn't change it), while enum in Haskell/Rust would surprise new comer if no memory model is presented. Actually enum is somewhat similar with "struct inside union", from which point it looks like it is easier to understand (the comparison is just for understanding)
  • It will be more practicable if some examples on the substitute ways from C++ inheritance, polymorphism to Rust implementation.

Since it is not an issue, please feel free to close it if accept or not.

Thanks,
R.N

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions