タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

coffeescriptとdesignに関するt-wadaのブックマーク (1)

  • disnet/contracts.coffee @ GitHub

    Contracts.coffee is a dialect of CoffeeScript with built-in support for contracts. It is inspired by the contract system found in Racket. Contracts let you clearly—even beautifully—express how your code behaves, and free you from writing tons of boilerplate, defensive code. You can think of contracts as assert on steroids. Basics Here’s a simple example of a contract on a function: This says that

    t-wada
    t-wada 2014/01/28
    CoffeeScript で契約による設計を行うためのコンパイラ拡張(ライブラリではない)。 Ruby の contracts gem はこれからインスパイアされて作ったらしい。で、いまはメンテされてないらしい。
  • 1