Back to Basics: Algebraic Data Types - Arthur O'Dwyer - CppCon 2020

Поділитися
Вставка
  • Опубліковано 25 лис 2024

КОМЕНТАРІ • 15

  • @MichaelEatonAMDG
    @MichaelEatonAMDG 3 роки тому +3

    Of the instructional videos I watch, which are numerous, you have one of the most pleasant and thus accessible deliveries.

  • @wanghaoyu886
    @wanghaoyu886 3 роки тому +7

    Thanks, Arthur, I love all your talks, it's just good.

  • @Sydra.
    @Sydra. 4 роки тому +3

    Really good and informative presentation!
    Addendum:
    1. Using pairs and tuples regularly can make your code unreadable in short time. C++ really misses the feature of (C# like) anonymous types. Now it's better to define new structs with meaningful member names instead of using pairs or tuples.
    2. You mostly should use sum types through visitors! Using get, holds_alternative, get_value or has_value regularly is like using dynamic_cast regularly in OOP. Sometimes it's necessary but not really safe or pragmatic in most cases.

  • @GrzegorzMilka
    @GrzegorzMilka 4 роки тому

    I'm happy that ABTs are now expressible in C++. It's so useful to have a sum type! :)

  • @wewlad5643
    @wewlad5643 4 роки тому

    The talk was a great overview of the ADTs present in the standard library. I definitely learned a few things about using those types.
    Not sure why you spent any time on valueless_by_exception at all. Almost nobody should ever be catching bad_alloc, especially those people who are being targeted by these B2B talks.

  • @yjc149
    @yjc149 Рік тому

    very complete intruction...thanks!

  • @АндрейБорисов-и4о
    @АндрейБорисов-и4о 4 роки тому

    Thanks, Mr.Arthur
    Very interesting and informative!

  • @abc3631
    @abc3631 3 роки тому +2

    As usual another great video

    • @CppCon
      @CppCon  3 роки тому

      Thanks again!

  • @liminal27
    @liminal27 Рік тому

    *Excellent*

  • @EgorChebotarev
    @EgorChebotarev 7 місяців тому

    good article

  • @XiyueDeng
    @XiyueDeng 4 роки тому +1

    std::visit supporting multiple variant types are very cool. It can be used to implement a poor man's multiple dispatch.

  • @Yupppi
    @Yupppi 11 місяців тому

    Gotta say the term algebraic proved to be somewhat confusing (clicked the video to find out how to express vectors and other niceties in C++ data types).

  • @simonfarre4907
    @simonfarre4907 3 роки тому +4

    std::optional seems to have been designed as though they purposefully want it to be bad/fail. Why on earth, is there no overload for value_or that takes a function callback which it calls if it has no value? Then it would only lazily call that when you call value_or, which *IS* what people expect that value_or call to actually mean / do.

  • @Sergei_Sai
    @Sergei_Sai 4 роки тому

    Thanks! Interesting and useful, but very fast speech, hard for understand.