Clojure spec Screencast: Leverage

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

КОМЕНТАРІ • 7

  • @JurajMartinka
    @JurajMartinka 7 років тому +1

    Make sure to add '[org.clojure/test.check "0.9.0"]]' dependency before trying the "generative examples" (starting ~8:00).
    Check clojure.org/guides/spec#_project_setup

  • @mortenbrodersen8664
    @mortenbrodersen8664 8 років тому +4

    Interesting. You are basically programming your own type system. Which allows you to do more than just checking types.

  • @JordanBiserkov
    @JordanBiserkov 8 років тому +7

    I've transcribed the code here: github.com/Biserkov/spec-screencasts
    I've made a few minor changes so the code can be run right away but I've stayed as close to the original as possible.

  • @HenrikKjelsberg
    @HenrikKjelsberg 8 років тому +1

    Great walkthrough, thanks!

  • @mortenbrodersen8664
    @mortenbrodersen8664 8 років тому

    Check out liquid types in Haskell for other examples of refinement types.

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

    nice!!

  • @bichitomax
    @bichitomax 8 років тому

    Pretty similar to what dependent type systems do. Also a cut and paste from Racket's contracts. Sadly as any optional type system, there is not compiler to enforce this constraints, leaves too much responsibility in the hands of the humans. Not to mention that with this approach it seems you have to pay on performance for the extra checking.