Scala
ç¾è±¡ ãããµã¼ãã¹ã®ä»çµã¿ã§å¦ççµæãéç¥ãã¦ããããã«ãèªãµã¼ãã¼ã®apiããããã«ããã¨ããããããã®éã«ããµã¼ãã¼å´ã§ã¯æ¬å½ã«ãã®ãµã¼ãã¹ããã®ãªã¯ã¨ã¹ããã©ãããã¿ãããã«ããããããIPã¢ãã¬ã¹ãè¨å®ãã¦ããã¦validateãã¦ããããããªâ¦
ç¶æ³ ã¨ããç¶æ ã«ãªã£ã¦ãã¾ã£ã¦å°ã£ããsbtãã°ãã¼ãã«ã§å©ç¨ããsbtoptsãããã¸ã§ã¯ãå ±éã§æå®ãã¦ããã¤ããã£ã¦ä»ã®äººã¯åé¡ãªãããã¨ã®ãã¨ããã ãOutOfMemoryãªã®ã§JVMã®ã¹ãã¼ã¿ã¹ã¿ããã®ãè¦ããã¨æã£ã¦èª¿ã¹å§ããã :dancers: JVMã®ããã©â¦
ååã«æãã¦è²°ã£ãã scala.PartialFunction condOpt ã使ããã«æ¸ãã¦ãããµã³ãã«ãè¦ãã¨ãããã ãã¤ã³ã㯠matchå¼ã使ã£ã¦ã㦠ãã®matchå¼ã®æ»ãå¤ã®åãOption å é ããmatchããã¦ãã£ãã¨ããä¸çªæå¾ä»¥å¤ã®matchããå ´åã«ã¤ãã¦ã¯ãæ示çã«Soâ¦
scalaã®httpã¯ã©ã¤ã¢ã³ã ä»ã¾ã§Playãããã£ããã¨ãªãããWSããç¥ããªãã¦ãPlayãããªããã¤ã§httpã¯ã©ã¤ã¢ã³ãçãªã©ã¤ãã©ãªã£ã¦ä½ã使ãã°ãããã ããã£ã¦ã®ãã¹ã¿ã¼ããComparing Scala's HTTP client libraries - implicitdefã¨ãè¦ã¦dispatchã£ã¦â¦
sequenceã£ã¦ããååããã©ããã¦ãé åºãæèãã¦ãã¾ã£ã¦é çªã«ï¼ç´åã«ï¼å®è¡ããããã®ã ã¨æã£ã¦ããã ã§ããããããªãã£ãã Future.applyã®å ´å ãããã«ããããªå¦çãæ¸ãã¦ã¿ãã1ãã10ã¾ã§ã1så¾ ã£ã¦åºåããã ãã®ãã¤ã def process: Futurâ¦
ã¨ããããScalaãhomebrewã¨ãã§ã¤ã³ã¹ãã¼ã«ããã°REPLã§å®è¡ã§ãããã©ããã£ã±ãIDEã¨ã使ã£ãæ¹ããããããã§ãããã®ç°å¢ãä½ãã®ãçµæ§ç°¡åãªã®ã§ãããç´¹ä»ãåãå§ãã¦2ã¶æããããªã®ã§ãããããScalaã«å ¥éãã¦ã¿ããã£ã¦äººåãã®è¨äºã§ãã Inâ¦
Scalaã ã¨ã¡ã½ããå¼ã³åºãã§ããããã¨æ¬å¼§ã¯çç¥ã§ããã£ã¦æãã¦ããã£ããã ãã©ãprintlnã®æ¬å¼§ã¯çç¥ããã¨æããããå ·ä½çã«ã¯ãã // OK println("Hello, world!") // NG println "Hello, world!" ãªãã§ã ããã¼ã¨æããªããã°ã°ã£ã¦ãåºã¦ããªãâ¦
Scalaãå§ãã¦1ã¶æããããã£ãã®ã§ãã¤ã¾ã¥ããã¨ãããã¾ã¨ãã¦ãããã¨æãã Scalaã¯åºæ¬çã«case classã¨ããéå½¢çãªclassã使ãããã«ãããã§ãããã¡ã³ãã¼ãã©ãæ´æ°ãããåãããªãã£ãã®ã§ã¡ã¢ã ä¾ãã°ãã¦ã¼ã¶ã¼æ å ±ãå ¥ã£ãã¢ãã«ããã£ãâ¦
é¢æ°åè¨èªã¨èãã¨ãLispã¨ãHaskelã¨ãScalaã¨ãé£ãããã ãããªã¼ã¨ããå å ¥è¦³ãæã£ã¦ã人ãããã¨æãã¾ããã¼ããããã§ããã ã§ããæè¿æ¥åã§Scalaã§ãããã¿ã¤ãã®Webã¢ããªã±ã¼ã·ã§ã³æ¸ãã¦ã¦ãé¢æ°åè¨èªã®æ¦å¿µãåãã£ã¦ãã¦ãããã£ã¦ãããªâ¦
Scalaã¯ä½¿ã£ãäºããªããã©ãããã®ãªãã ããã¨ããé°å²æ°ã¯æãã¦ããã Javaã極ããããã§ããªãã®ã«ãã¿ããªãScalaããã¦ãã¨ããã¨Scalaã«ããªãããããªãããããªããã¨æã£ã¦ãã¾ãã¿ã¤ãã§ãã ããåãããªããã©Scala使ã£ãã»ãããããã§ããâ¦