ããããæåã«ç§ã«ã€ããŠã ç§ã®ååã¯ããããã»ãã©ãã¯ã§ãã 2006幎11æããScalaã³ãã¥ããã£ã®ç©æ¥µçãªã¡ã³ããŒã«ãªã£ãŠããŸãã ç§ã¯Liftãããžã§ã¯ãã®åµèšè ã§ãã
èšåãã䟡å€ãããããã€ãã®ããéèŠãªç¹ïŒ
- ç§ã¯EPFL以å€ã®èª°ãããé·ãéScalaã³ãŒããç¶ç¶çã«æžããŠããŸãïŒãããããScalaã¯ããŒã¶ã³ãå·¥ç§å€§åŠã§éçºäžã§ãïŒã [æŽæ°- @propensiveãšBill Wennersã¯ãç§ããé·ãéScalaã³ãã¥ããã£ã«åå ããŠããŸãã]
- 2008幎ã«æåã®Scalaã«ã³ãã¡ã¬ã³ã¹ã Scala Lift Offãéå¬ããä»æ¥ãéå¬ãç¶ããŠããŸãã
- å°çäžã®èª°ãããå€ãã®ã³ãŒãè¡ãScalaã§æžããŸããïŒ250K以äžïŒã
- 人æ°ã®ããæ¬ãScalaã®çŽ¹ä»ïŒBeginning ScalaãæžããŸããã
- éå»5幎éãScalaãšLiftã«çŽæ¥é¢é£ãããããã¯ã«ã€ããŠãScalaãšLiftã®ãã©ãŒã©ã ã§10,000å以äžå·çããŠããŸãïŒããã¯ãèšå€§ãªæ°ã®éçºè ãšè©±ãããããšã瀺åããŠããŸãïŒã
- Lift Webãã¬ãŒã ã¯ãŒã¯ãããžã§ã¯ããèšç«ããã³ã¢APIã®èšèšãªã©ããã®éèŠãªéšåãæžããŸããã Liftã¯ãæã人æ°ã®ããScalaããŒã¹ã®ãã¬ãŒã ã¯ãŒã¯ã®1ã€ã§ãããæåã«åºãç¥ãããŠãã Scalaã©ã€ãã©ãªã§ãã
- éå»1幎éã«Scalaã§50äžè¡ä»¥äžã®ã³ãŒããã¬ãã¥ãŒããŸããã
- ç§ã¯äž»ã«ScalaãšLiftã®ã³ã³ãµã«ãã£ã³ã°ã§çèšãç«ãŠãŠãããå€ãã®ãããžã§ã¯ãã«ç©æ¥µçã«åå ããŠããŸãã
- éå»5幎éã§ScalaãšLiftã«ã€ããŠ25ãè¶ ãããã¬ãŒã³ããŒã·ã§ã³ãéå¬ããŸããã
- å°ããªããŒã ã§ScalaãšLiftã䜿çšããæ¹æ³ãæ°çŸäººã«æããŸããã
- TypeSafeããŒã ããŒãžã«æ²èŒãããŠããæ¶è²»è ã®åæ°ä»¥äžïŒããããPerãXerox ãSiemensãSonyããã®ä»ã®ã¯ãžã© ïŒã«ãçŽæ¥çãŸãã¯éæ¥çã«Scalaã代衚ããŸããã
äžèšã®ãã¹ãŠãèŠçŽãããšããScalaã§ã®ã³ãŒãã£ã³ã°ãScalaã®æå°ãããŸããŸãªäººã ãçµç¹ãžã®Scalaã®ãã¬ãŒã³ããŒã·ã§ã³ã§ããªãã®çµéšããããŸãã ãScalaã䜿çšããŠããããŸãã¯Scalaã®æåèŠå ãåæããããã«å€§éã®ããŒã¿ãèç©ããããã«ãããè¡ãããšãèšç»ããŠããååãªäººã ãšè©±ããŸãããã ããã¯ãç§ãæ£ãããšä¿¡ããŠãããšããæå³ã§ã¯ãªããä»ã®ãã¹ãŠã®äººãééã£ãŠãããšããããšã§ãã
ãã®æºåããã¹ãŠçµããåŸãçµè«ãè¿°ã¹ãããŠãã ããã
- Scalaã¯ãã»ãšãã©ã®Javaéçºè ã«ãšã£ãŠäžé©åãªèšèªã§ãããJavaã®ä»£æ¿ãšèŠãªãããšã¯ã§ããŸãããJavaéçºè ã®å°ãªããšãåæ°ã«ãšã£ãŠãScalaã®è€éãã¯ãã®åŒ·ã¿ãæã¡æ¶ãããã§ãã
ãã®å£°æã¯ã以äžãããè°è«ã®äœå°ã¯ãããŸããã
- Javaã¯ã»ãšãã©ã®PHPéçºè ã«ãšã£ãŠäžé©åãªèšèªã§ãããPHPéçºè ã®å°ãªããšãåæ°ã«ãšã£ãŠJavaã®è€éãããã®ã¡ãªãããåŠå®ãããããPHPã®ä»£æ¿ãšèŠãªãããšã¯ã§ããŸããã
以åã®æçš¿ã§ãScalaã¯äžéšã®éçºè ã«ãšã£ãŠé£ããããšèšã£ãŠããŸããããä»åã¯ãã£ãšå ·äœçã«èª¬æããŸãã Scalaãè€éã ãšèšã£ãŠããããã§ã¯ãããŸããã ããããç§ã¯Scalaãè€éãªå€ãã®éçºè ã«äŒãã圌ã®æšè«ããããšããã§çŽ¹ä»ããŸãã ã ãã®ã¯ã©ã¹ã®éçºè ã«ãšã£ãŠãScalaã®ã³ã¹ãã¯ãã®å©ç¹ãäžåããŸãã
è°è«
ç§ãç¹ã«èŠæãªããšã®1ã€ã¯ãã¹ãã«ã§ãã ç§ã®è³ã¯èšèã®ã€ã¥ããèŠããŠããªãã ãã§ãã ç§ãåŠçæ°èã®ç·šéè ã ã£ããšãããžã£ãŒããªã¹ãã®1人ããæ ãè ã ããã¹ãã«ãç¥ããªããšãããã¬ãŒãºãç§ã®é¡ã«æããŸããïŒããã¯1985幎...ã¹ãã«ãã§ãã«ãŒã®åã§ããïŒã ç©åããã§ãŒã¯ããŒãã«æžãïŒããã¯ãã¯ã€ãããŒãã®åã«ãããŸããïŒã解決ããããã«äŸé ŒããŸããã 圌女ã¯èšã£ãïŒãããã¯æ°åŠã§ã...ããã¯è€éã§ã...ãããŠç§ã¯ã¹ãã«ã®ãããªåçŽãªããšã«ã€ããŠè©±ããŠããã®ã§ããã ãŸããç§ã«ãšã£ãŠãç§ã¯å€¢ã®äžã§ç©åã解ãããšãã§ããŸãããããŠãããšãç§ã®äººçãããã«äŸåããŠããŠããç§ã¯åèªãæ£ãã綎ãããšãã§ããŸããã 人ã«ãã£ãŠã¹ãã«ã¯ç°ãªããŸãã
人ã«ãã£ãŠäŸ¡å€ã¯ç°ãªããŸãã ã³ã³ãã¥ãŒã¿ãŒãæããã³ãŒããæžãã®ã倧奜ããªäººãã¡ãããŸãã ç§ã¯ãã®äžã«ããŸãã ãããŠããæ°ã«å ¥ãã®ã¢ã¯ãã£ããã£ã®ããã5ã«ããã°ã©ãã³ã°ãå ¥ããªã人ãã¡ãããŸãã
ãœãããŠã§ã¢éçºã®ãã£ãªã¢ãéžãã ããã°ã©ããŒã¯ããããããŸãããçæ¥ã®èœåãšæ¬²æã®çµã¿åãããæã£ãŠããŸããã ãããã®èœåãéçºããã¢ãããŒã·ã§ã³ãæäŸããåŠæ ¡ããããŸãã ããããããã°ãèªæ ¢ã¯ãããå€ããããšã¯ã§ããŸããã
çãŸãã€ãã®ã³ãŒãã£ã³ã°èœåãšå人ã®æé·ã«èå³ããªã人ã«ãšã£ãŠãScalaã¯é¢åã§ãã ãããŠãScalaã«ãã®ãããªè² æ ãå€ãããå ŽåïŒèªã¿åã-倱æããScalaãããžã§ã¯ãïŒãScalaã¯æé·ãåæ¢ããŸããããã¯ã$ 600,000ãè¶ ããæè³ãããç§ã®ãããªäººã ã«ãšã£ãŠæ·±å»ãªæºæé©ãªç¶æ³ïŒæŠç®ã§ãã Scalaãšã³ã·ã¹ãã ã«ã æçš¿ã®æåŸã«åæ©ä»ãã«ã€ããŠè©³ãã説æããŸãã
ç§ã®ããŒãžãã¢å·ã®æçš¿ã«å¯ŸããéèŠãªè°è«ã®1ã€ã¯ããã¹ãŠã®Javaéçºè ããã®ãŸãŸäœ¿çšããã¹ãã ãšããããšã§ããã ç§ã¯èªåèªèº«ãåŒçšããŸãïŒ
- ãã§ã¯ãæé«ã®ããã°ã©ããŒãèŠã€ããŸãããããšããè°è«ãæåŠããŸããéçºè ã®å šäœçãªå質ãåäžãããããšã§Scalaã®è€éãã®åé¡ã解決ã§ããŸããïŒã¿ã€ãã·ã°ããã£ãç解ããŠãã人ãããã°ã©ã ãæ°åŠçã«èª¬æã§ãããªã©ïŒåé¡ã¯ãScalaããã¬ãŒãã³ã°ãæè²ãæ¡çšã«é©åœãåŒãèµ·ããã»ã©è¯ããªããããå¹³åçãªéçºè ã®è³ªãå€ããŠããã®éçºè ãã¢ã¯ã»ã¹ã§ããããã«ããããšã§ãã
ScalaãåŠã¶ããšãã§ãããšPaul Snivelyã«åæããŸãã ã ãããããç§ã¯é·å¹ŽScalaãç©æ¥µçã«å®£äŒããŠããŸããã åé¡ã¯ãScalaãç¹å®ã®çš®é¡ã®äººã ã«ãã£ãŠç 究ãããŠããããšã§ãã ãã®ãã¥ãŒã«ã¯ãåŠç¿ããããªã人ããããè¡ãèœåã®ãªã人ã¯å«ãŸããŠããŸããïŒPHPã§ã³ãŒããæžãããšã¯ã§ããŸãããJavaã§ããã°ã©ãã³ã°ã§ããªã人ãããããã«ïŒã
ç§ã話ããŠããããšã®æ¬è³ªã¯ã Scalaãé©ããªãã¯ã©ã¹ã®ããã°ã©ããŒããããšããäºå®ã§ãããç§ã¯ã»ãŒ4幎éãããã«ã€ããŠè©±ããŠããŸãã...ãããããã£ãšé·ãã§ãããããã¯ç§ãèŠã€ããããšãã§ããæãå€ãæçš¿ã§ãã ãã®æç¹ã§ã®ç§ã®ç«å Žã¯ãScalaã«åãæ¿ãããšçç£æ§ãäœäžããéçºè ã®ãã¬ãŒãã³ã°ãšè§£éãšãããä»æ¥ã®å€ãã®äººãã¡ãšããŸãå€ãããŸããã ããã«ãå°ãªããšãéå»3幎éScalaã§äœæ¥ã§ããªãã£ãçŽç²ãªJavaããã°ã©ããŒã®ã°ã«ãŒããããããšã¯ãç§ã«ãšã£ãŠéåžžã«æçœã§ãã ãã®ããã«ãç§ã®ç«å Žã¯ããäœå¹Žãå€ãã£ãŠããŸããã
ç§ã®ç解ãå€ãã£ãã®ã¯ãããã°ã©ããŒãå°±æ¥æ¥ã®åãã«çŸããæ°åã®äŒè°ã«åå ããæ°è¡ã®ã³ãŒããæžããŠåž°å® ããäŒæ¥ãéåžžã«å€ãããšã«æ°ã¥ããããšã§ãã éå»1幎éããã®ã¿ã€ãã®3ã€ã®äŒç€Ÿã§åããçµéšããããŸãã Scalaã§æžãçŽãããJavaã³ãŒãã®åé¡ãéçºè ã®æ€çŽ¢ã瀟å ã®å éšæµæãªã©ã«ãé¢ããããScalaãå®è£ ããæžåœã«æŠãããã¹ãŠãæ£ããè¡ãããšããŸãã ä»ã®äººã¯ãScalaãå®è£ ããªãããšã«æ±ºããŸãïŒããã¥ã¢ã«ã§ã¯ç¥ããªãScalaã³ãŒããããã€ããããŸããããã®ã³ãŒãã¯ãScalaãJavaããã¯ããã«åªããŠãã1人ã®äººã«ãã£ãŠãµããŒããããŠããŸãïŒã ããã«ãéçºè ã®ååã亀æããæ®ãã®25ïŒ ãé«äŸ¡ãªã³ãŒã¹ã«éä¿¡ãããããžã§ã¯ãã®äžéšãå€éšå§èšããããšãæåŠããçµç¹ã³ã¹ãããScalaãããŒã ã®3人ã®æé«ã®ããã°ã©ããŒã«äžãããã¹ãŠã®å©ç¹ãäžåããããScalaããJavaã«æ»ãããšã決ããŸããã
ç§ãã¡ã¯ãå¹³åçãªéçºè ã幎é3250è¡ ïŒ1æ¥ãããçŽ20 è¡ïŒã®ã³ãŒããæžãäžçã«äœãã§ããŸãã ããã¯ãéçºç°å¢ã«ãã£ãŠææ¡ãããå Žæã§ã³ãŒãã眮æããŠãgive me the X templateããã¿ã³ãã¯ãªãã¯ããããšã«ãããEclipseã§çºçããŸãã ãã®åŸãããã€ãã®éäŒãžã®æ è¡ã ãããŠåœŒãã¯ãããå¶æ¥æ¥ãšåŒãã§ããŸãã ããããã¹ãŠã®éçºè ã解éããããšã¯ã§ããŸããã ç§ãã¡ã¯åœŒããããè¯ããªãããã«èšç·Žããããšã¯ã§ããŸããã ããã¯äžéã®èŸ²æ°ã§ãã ãããã®éçºè ã¯ããã£ã«ããŒãã«é¢ãã挫ç»ã®ããŒããŒã«ãªãããšãã§ããŸãïŒãããããªãã£ã¹ãã©ã³ã¯ãã³ã«é¢ãããŠãŒã¢ã©ã¹ãªããŒãããšïŒã ããããããªãã¯äœãç¥ã£ãŠããŸããïŒ ãããã¯ãŸãã«Javaã䜿çšãã人ãã¡ã§ãã ä»ã«äœãç¥ã£ãŠããŸããïŒ ãã®ãããªããã°ã©ããŒã«ã¯ãçãŸãã€ãã®èœåãšè¯ããªããšããé¡æã®åãçµã¿åããã¯ãããŸããã ããããããã¯ããã ãã§ã¯ãªããããã°ã©ããŒã«å¯Ÿãã管çã®ãã§ãŒã³å šäœãç¶æ³ãå€ããèœåãæå¿ãæã£ãŠããŸããã ç§ãã¡ã¯ãã®å±±ã移åããããšã¯ã§ããŸãã...ãŸãã¯ãããå ·äœçã«ã¯ãScalaã¯çç£æ§ã®äœãéçºè ã®50ïŒ ãåŽäžããã»ã©è¯ããããŸããã
ãããã£ãŠãæé©ãªæ¹åãšåãã¯æ¬¡ã®ãšããã§ãã
- 3åå¹ççãªããã°ã©ããŒãšãããžã§ã¯ãã«çŠç¹ãåœãŠãScalaã䜿çšããŠãã ããã ãŸãã¯;
- äžå¹Žã®ããã°ã©ããŒåãã«Scalaãæ¹åããïŒããã¯ãScalaãé©æ°çãªç 究èšèªã«ãªããŸã§èµ·ãããŸããïŒ
ããæ°
ãã ããäœã ïŒããšå°ããŸãããScalaãæåããŠããããå°é£ã§ããªãããšã蚌æããããã«ããããæžããŸãããïŒã
ã»ãŒ5幎åã«ãã®èšèªã«åºäŒã£ãŠä»¥æ¥ãç§ã¯Scalaã®ãµããŒã¿ãŒããã³ãã¡ã³ã§ããã Scalaã«åŒã£è¶ããŠæ¥ãŠãç§ããé·ã圌女ãšäžç·ã«ä»äºãããŠãã人ã¯ã»ãã®ãããã§ãã ç§ã¯ãæåãç¶ããããã«ScalaãšLiftã«åŒ·ãé¢å¿ãæã£ãŠããŸãã
ãŸããScalaã«ã¯ããã€ãã®çŽ æŽãããæåäºäŸããããŸãã åŒçšãšèšäºããããŠScalaã®åšãã§äœãçããããšã®äžè¬çãªæèŠ-ããã¯ãã¹ãŠæ·±å»ã§ããããã¹ãŠããã«å€ããã Scalaã¯çŽ æŽãããèšèªã§ãã ã·ã³ãã«ã§æ¥åžžçãªãã®ããæãè€éãªãã®ãŸã§ãå¹ åºãã¿ã¹ã¯ã解決ããããã®æ®éæ§ãšããç¹ã§ãçŸä»£ã®ããã°ã©ãã³ã°ã§ã¯åçã®èšèªã§ã¯ãããŸããã
ããããScalaã¯äžèœè¬ã§ã¯ãããŸããã Scalaã¯ãåªç§ãªããã°ã©ããŒãéã£ãå Žåã«ã®ã¿æåããŸãã ãã®ãããªããã°ã©ããŒã¯ãScalaã䜿çšããŠãJavaãä»ã®ã»ãšãã©ã®èšèªã§ã®äœæ¥ãšæ¯èŒããŠãèœåãé«ããããšãã§ããŸãã ããããçµéšã®æµ ã人ãããã«æªãããšã«ãScalaã«æºè¶³ããŠããªã人ã®æã§ã¯ãScalaã¯JavaãããæªããªããŸãã ããã¯ãããŒã ã®äºããšç«¶åã«ã€ãªããããã®ã¿ã€ãã®ããŒã ã¯å€ãã®å Žåååçã§æ»æçã§ãããããç· ãåãã«éã«åãããæçµçã«ã¯ããã°ã©ãã³ã°èšèªã責任ãè² ãããšã«ãªããŸãã
Scalaãæé·ãç¶ããããã«ã¯ãæåãç¶ããå¿ èŠããããæå°éã®åé¡ã®ãããããžã§ã¯ããããã«é¢é£ä»ããªããã°ãªããŸããã ããã¯ãScalaãšLiftã«é©åãªã¢ããªã±ãŒã·ã§ã³ãéžæããããã«ã Scalaã®é·æãšçæã«ã€ããŠè©±ããšãã«ãççŽã§æ£çŽã§ãªããã°ãªããªãããšãæå³ããŸãã Scalaã®æé·ã®ããã«ã¯ãScalaã§çŽ æŽããããã®ãäœæããã¹ãã«ãšæ¬²æ±ã®é©åãªçµã¿åãããæã£ãŠãããŸãã«ãã®ã¿ã€ãã®ããã°ã©ããŒã«æäŸãããå¿ èŠããããŸãã
Scalaã¯ãã³ãã³ãã©ã€ã³ãŠãŒãã£ãªãã£ãCRUDãããã³ããŒã¿ããŒã¹ããã³ããšã³ãã§Javaã眮ãæãããã®ã§ã¯ãªãããšãåãå ¥ããå¿ èŠããããŸãã ORMãæžãããã®Scalaã®åïŒããããMax ... Squerylã¯æ¬åœã«ã¯ãŒã«ã§ãïŒã¯ããªã¢ã«ã¿ã€ã ã·ã¹ãã ãåæ£ã䞊åã¢ããªã±ãŒã·ã§ã³ã®éçºã®ããã®Scalaã®äŸ¡å€ãããã¯ããã«äœãã§ãã ãã ããã»ãšãã©ã®å ŽåãORMãCRUDããŠãŒãã£ãªãã£ãããã³ãã®ä»ã®ããŒã¿ãfill-form-and-save-in-styleã®ã¹ã¿ã€ã«ã§å®è¡ããŸãã ããã¯ã»ãšãã©ã®éçºè ãããå Žæã§ããããéã¯ã©ãã«ãããŸãã ã¿ããªç·ãã¡ã¯å·šå€§ã§ãã¡ãžãŒã§ãã€ãã³ãé§ååã§ãã¡ã¬ãã€ããŒãã¹ãŒããŒãã¹ãŒããŒããªã¢ã«ã¿ã€ã ãã¹ãŒããŒããã©ãŒãã©ãŒãéçºããŠããŸãããã»ãšãã©ã®ããã°ã©ããŒã¯ãããŒã¿ããŒã¹ããããŒã¿ã移åããããOracle / SQLã¯ãããã«æé©ãªã¡ã«ããºã ãæäŸããŸãã
ã³ãã¥ããã£ãšããŠãScalaã®åŒ±ç¹ãåãå ¥ããªããã°ãªããŸããã Scalaãå©çšããéçºè ãåŒãä»ããå¿ èŠããããŸãïŒå€ãã®éçºè ãããŸãïŒã ãŸããå®éã«å€±æããå¯èœæ§ãããå ŽåãScalaã®äœ¿çšãç©æ¥µçã«é»æ¢ããå¿ èŠããããŸãã ãScala is complexããŸãã¯ãScala for really good Programmersããšãããã©ã³ãã¯ããScalaã¯æã 倱æã«ã€ãªãããªã¹ã¯ã§ãããããã¯ããã«åªããŠããŸãã
ãã®æçš¿ãæžããç§ã®åæ©ã¯ãéçºè ã®é ã®äžã«ç§ãèšã£ãããšã®èªèãæ€ãä»ããããšããé¡æã§ããã æ¥å¹ŽãScalaã§5,000ã®æ°ãããããžã§ã¯ããèŠããããã®ãã¡4,000ãæåãããšã50,000ã®æ°ãããããžã§ã¯ããèŠããããã®ãã¡10,000ã ããæåããŸãã Scalaã®èœåãšåŸåãåããããã°ã©ããŒã¯ãèšèªã®å®éšã«æåããåŸãããããç§ã®æçš¿ãèªãã§ãç§ãäœã話ããŠããã®ãããããªããšèšãã§ãããã ä»ã®éçºè ã¯çµè«ãç¹°ãè¿ãïŒã岩ã¯è€éãããŸããïŒãããã䜿çšããŸããã ãããŠããã®ãããªçµæã¯Scalaãæåã«å°ãå¯èœæ§ãã¯ããã«é«ãã§ãã ãããå®äºãããŸã§ãããã¯äžéã®å°äœäººã«ã¢ã¯ã»ã¹å¯èœã«ãªããŸãã ããã¯ScalaãšLiftã«ãšã£ãŠæè¯ã®æ¹æ³ã§ãã
ãã...ãããŠããã¹ãŠãããªããå¢çãæŒãåºããŠããæã£ãŠããè³¢ã人ã ïŒãŸãã¯ç§ã¯åœŒããããã«æŒããšç¢ºä¿¡ããŠããŸãïŒãã¡ã¬ã€ãã³ãé§åã®ãªã¢ã«ã¿ã€ã ã®ãºã¢ã§ãããªãã¯Scalaãå®çŸãã倢ã§ããããšãããããŸãããããšäŒŒããã®ã¯ãããŸããïŒHaskellãé€ãïŒã ã ãããScalaã§ã¯ãŒã«ãªãã®ãäœæããŠããããããŸãããããã«ããŠãã ããã