CoffeeScriptã§ãã£ã¼ãæ°ï¼CoffeeScriptã¨ã©ã ãå¼ï¼
ã©ã ãè¨ç®ã§ã¯ãæ°å¤ããé¢æ°ã§è¡¨ç¾ã§ãããããã§ãã
æ°å¤ãé¢æ°ã§è¡¨ç¾ããæ¹æ³ã®ã²ã¨ã¤ã«ãã£ã¼ãæ°ã¨ãããã®ãããã¨ã®ãã¨ã
ä½ã§æ¸ãã¦ã¿ããããªã¨è¿·ã£ãã®ã§ããããã®æã®å¦çãã·ã³ãã«ã«æ¸ãããã ã¨æã£ãã®ã§ãCoffeeScriptã§æ¸ãã¦ã¿ããã¨ã«ãã¾ãããå¤åãæ£è§£ã ã£ãã¨æãã¾ãã
ãµã³ãã«ã³ã¼ã
church.coffee
church.js
é¢æ°é©ç¨ã®æ°ã§èªç¶æ°ã表ç¾ããã£ã¦ã®ãé¢ç½ãããã¾ãçºæ³ã§ããªãã§ããã
ãããããã£ãã®ã§ééã£ã¦ãããããã¾ããããç°¡ç´ãã¦ããã¨ããããªæãã«ãªãã®ã§ããããã
æåã¯é¢æ°ãã¡ã¿ãªè¡¨ç¾éãã¦ãä½ããããã®ãé ã§æ´çãããã¾ããã§ããããåèãµã¤ããè¦ãªãããæ¸ãã¦ã¿ã¦ãå®è¡ãã¦ãç解ã§ãã¾ãããçJavaScriptã§æ¸ããã¨ãã¦ãããããã£ã¨ç解ã«è¦ããã ã§ãããã
ãªãã§ãé¢æ°ã§è¡¨ç¾ã§ããã©ã ãè¨ç®ã£ã¦ãããã§ããããã¼ã¿æ§é ãæ¡ä»¶åå²ãé¢æ°ã§è¡¨ç¾ã§ããããã§ãã
ã¾ã¨ã
CoffeeScriptã¯ã以åã®è¨äºã§ãOCamlっぽいっとか言ったことがありましたãã確ãã«OCaml並ã«ã©ã ãå¼ãç°¡æ½ã«æ¸ãã¾ãã
ä»åã®ããã«ãã©ã ãå¼ã®è¡¨ç¾ããã®è¨èªã§ã®æ¸ãæ¹ã«ç½®ãæããæãJavaScriptã ã¨è¦è¡ã§ãSchemeã§ãã¡ãã£ã¨é¢åã§ãã
çã¾ããèæ¯ãããã¦å½ç¶ãªã®ã§ãããOCamlã ã¨ã©ã ãå¼ãã»ã¨ãã©ãã®ã¾ã¾ã§OCamlã®ã³ã¼ãã¨ãã¦æ¸ããã®ã§ãCofeeScriptãããç°¡æ½ã§ãã*1
OCamlã®è©±ã¯ç½®ãã¨ãã¦ãä¸æå¨å¹³ããã®ä½ã£ãããã°ã©ãã³ã°å¦ç¿ãµã¤ãã®chibicodeã§ããCoffeeScriptãæ¡ç¨ãããããã§ãããCoffeeScriptã¯æè²ç¨è¨èªã¨ãã¦ã¯ãã¢ãªã ã¨æãã¾ããRubyã¿ããã«å®è¡å¯è½ãªæ¬ä¼¼ã³ã¼ããã¦ä½¿ç¨ã§ããå´é¢ãæãã¾ãã
ã¨ãããããã©ã ãè¨ç®ã®åå¼·ã«ã¯ä½¿ãããã ãªã¨æãã¾ããã