"Agility & Robustness: Clojure spec" by Stuart Halloway

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ก.ค. 2024
  • You can program with high agility and end up with a robust, maintainable program. This talk will show you how to use Clojure and the new spec library to write programs that behave as expected, meet operational requirements, and have the flexibility to accommodate change.
    With Clojure, you can rapidly develop robust and reusable programs using interactive development at the REPL immutable data and pure functions code as data Clojure's new spec library augments these approaches. Developing with spec is declarative, predicative, layered, robust, and integrated with Clojure.
    spec is declarative. As with type systems in static languages, spec lets you make declarative statements that communicate and document data, function arguments, and returns.
    spec is predicative. You can declare predicates about data, about function arguments and returns, and even function semantics. This overlaps not only with type systems, but also with validations that are often done with costly bespoke tests and runtime checks.
    spec is layered. Spec does not require any specific workflow or program shape, and in particular is compatible with iterative and incremental development.
    spec supports robust programs via automatic generative testing. Given specifications, spec can write generative tests for you, generating a volume of tests limited only by your CPU time, not by what you are able to write and maintain by hand.
    spec is fully integrated with Clojure. As you develop your program, you have interactive access to spec-driven documentation, validation, destructuring, conformance checking, sample data, testing, and program instrumentation.
    Stuart Halloway is a founder and President of Cognitect, Inc. He is a Clojure committer, and a developer of the Datomic database. Stuart has spoken at a variety of industry events, including StrangeLoop, Clojure/conj, EuroClojure, ClojureWest, SpeakerConf, QCon, GOTO, OSCON, RailsConf, RubyConf, JavaOne, and NFJS. Stuart has written a number of books and technical articles. Of these, he is most proud of Programming Clojure.
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 5

  • @kris1227
    @kris1227 7 ปีที่แล้ว +5

    Thank you Stuart. You're a fantastic educator.

  • @ChadStovern
    @ChadStovern 7 ปีที่แล้ว +4

    Very informative, thank you. I'm now anxious to give this a try.

  • @nathanqueija7054
    @nathanqueija7054 3 ปีที่แล้ว

    This is just...beautiful

  • @mala235813
    @mala235813 5 ปีที่แล้ว +1

    Truly impressive tech

  • @krystofjakubek9376
    @krystofjakubek9376 2 ปีที่แล้ว +1

    None of this is actually inherit to dynamic languages. After all type is just another spec but one that can be used during compilation to generate more more efficient machine code. Another more concerete pontentionally runtime specs can than be added like done in closure.
    Its interesting to me how each different language eventually naturally encounteres and implements something akin to this. I see huge paralels between specs and C++ concepts which act exactly the same but are only limited to conpile time predicates (which as this talk demonstrates is very limiting factor). It is also interesting that only because of the fact that closure is dynamically typed language people were able to think outside the box and focus on the more general problem without being limited by the traditional concept of types.