エントリーの編集

エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。

- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
How CoffeScript classes work - Islands in the byte stream (legacy)
CoffeeScriptのクラス機構はどんなものか調べた記録。コード量は少ないが洗練されており効率も良いよう... CoffeeScriptのクラス機構はどんなものか調べた記録。コード量は少ないが洗練されており効率も良いようだ。 http://coffeescript.org/#classes さて、元のcoffeeスクリプトは単にクラスとサブクラスの定義をするだけのもの。 #!/usr/bin/env coffee class Animal constructor: (@name) -> console.log "constructor of Animal" move: (meters) -> console.log "Animal#move" class Snake extends Animal constructor: (@name) -> super @name console.log "constructor of Snake" move: -> console.log "Snake#move
2012/03/10 リンク