Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Type assertions should be taught earlier than the errors talk #27

@stellentus

Description

@stellentus

Since they are different than errors, they should be taught earlier, or else have their own section in the errors talk before errors are introduced. (It should clearly be indicated as an aside.)

But since they are so important for checking errors, it's important to also have an exercise to try using them, so perhaps they should have their own very short talk. (Or we should consider interspersing exercises in a single talk.)

Alternatively, we could remove type assertions from the errors talk. For beginners, it's probably fine if we don't teach about how to check an error type. Creating a custom error is probably also not necessary. I write a lot of go, and I rarely define my own error types. That's partly laziness, but it's still probably not an essential topic.

So I guess my conclusion is actually that type assertions and user-defined errors should be removed to leave more time to work on the exercises.

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