ä¸ã®ä¸ã«ã¯æã®æ°ã»ã©ã®ããã°ã©ãã³ã°è¨èªããããããããªãã、ã¹ã¼ãã¼ã³ã³ãã¥ã¼ã¿ã§å©ç¨ããã¨ãªãã¨ããªãéããã¦ãã。ã©ã¤ããµã¤ã¨ã³ã¹åéã®ãã¼ã¿ã®å¦çã«ã¯Python、Ruby、Perlãªã©ã®ããããã¹ã¯ãªããè¨èªã¯ãã使ãããã、ãã¼ã¿ãã¼ã¹é¢é£ã ã¨Javaãªã©ãããã ãã。ãããç§å¦æè¡è¨ç®ã«éãã°、FortranãC/C++ãå¤æ°ãå ããã¨æã。ãã¯ãå®è¡å¹çã¨æ¢åè³ç£ã®åå¨ã¯å¤§ãã。
æ°å¤è¨ç®ããã°ã©ã ã§ã¯、ã¨ã«ããéããæ±ãããã。ã©ãã ãã®éããããã°ååãã ã£ã¦? ãã®è³ªåã¯ãã³ã»ã³ã¹ã ã¨æã。ãã¨ãç¾å¨ã®æé«é度ãèªãã¹ã¼ãã¼ã³ã³ãã¥ã¼ã¿ã®1ååã®é度ããã£ãã¨ãã¦ãååã§ã¯ãªã。使ããè³æºã§ã§ããç¯å²ã®è¨ç®ãããã ããªã®ã ãã。
èªåã®æºããåéã§ã¯ä¸åã®è¨ç®ã«åå¹´ããããã¨ããããªã®ã§、è¨ç®é度ã¯æ»æ´»åé¡ã 。1åã§çµããå¦çãªãåã«é«éåããã¨ãã¦ãå·®ã¯30ç§ã§ãããªã。ããã、åå¹´ã¨ãªãã¨ãã®å·®ã¯3ã¶æã«ããªã。ã ãã、Fortranã使ãã«ãã¦ã、ããã¢ãã³ãªFortran90/95ã ãã§ã¯ãªã、å¤ãããããå®è¡é度ã®éãFORTRAN77ããã使ããã。ã¾ã、æè¿ã¯é度差ã縮ã¾ã£ã¦ãã¦ããã®ã§ããã¾ã§FORTRAN77ã«ãã ãããªããªã£ã¦ãã¦ãããã©。æ¬å½ã«ã¯ãªãã£ã«ã«ãªé¨åã«ã¯ã¢ã»ã³ããªè¨èªãªã©ã使ããã¦ãã。
ã¾ã、æ±ç¨ã³ã³ãã¥ã¼ã¿ã®ã³ã³ãã¤ã©ã«æ¯ã¹ã¦ã¹ã¼ãã¼ã³ã³ãã¥ã¼ã¿ã«æé©åãããã³ã³ãã¤ã©ã§ã¯ãã°ã®å ¥ã£ã¦ãããã¨ãå¤ã、C++ã§ãBoostãªã©ã®å¤é¨ã©ã¤ãã©ãªã¯é¿ããæ¹ãç¡é£ã 。使ãã«ãã¦ãGoogleã®C++ã³ã¼ãã£ã³ã°è¦ç´ã®ããã«ä¸é¨ã«éå®ãã¦ä½¿ãæ¹ãè¯ã。å®éã«Boost絡ã¿ã®ã³ã³ãã¤ã©ãã°ã«ããæ··ä¹±ãè¦ãã«、STLãªã©ã®æ¨æºã©ã¤ãã©ãªã®ã¿ãã·ã³ãã«ã«å©ç¨ãã¦ããæ¹ãã¾ã å®å ¨ã (ããã§ããã°ããã©)。ããã¯è¨ã£ã¦ãBoostã¯ä¾¿å©ãªã®ã§ã§ããã ãæ©ãC++0xã®æ¨æºåãããã¦ã»ãã。æ¨æºåããã¦ããã°ã³ã³ãã¤ã©ãã³ããè¨ã訳ã§ããªããã。
ããããã°Fortressãªãã¦è¨èªãããã。é¢ç½ã試ã¿ã§ã¯ããããã©ç¾ç¶ã§å©ç¨ããã®ã¯é£ãããããªæ°ããããªã。ç¹ã«åé ã§ãè¿°ã¹ã、Fortranã¨åç¨åº¦ã®å®è¡å¹çãåºãããã¨ããç¹ã¨æ¢åè³ç£ã®ä»£æ¿ãåå¨ããã®ãã¨ããç¹ã§。å ã¿ã«Fortressã§ã®"Hello, World!"ã¯ä»¥ä¸ã®ããã«æ¸ãã¿ãã。
hello.fss
component hello export Executable run() = println("Hello, World!") end
æ°å¤è¨ç®ããã°ã©ã ã§ã¯、ã¨ã«ããéããæ±ãããã。ã©ãã ãã®éããããã°ååãã ã£ã¦? ãã®è³ªåã¯ãã³ã»ã³ã¹ã ã¨æã。ãã¨ãç¾å¨ã®æé«é度ãèªãã¹ã¼ãã¼ã³ã³ãã¥ã¼ã¿ã®1ååã®é度ããã£ãã¨ãã¦ãååã§ã¯ãªã。使ããè³æºã§ã§ããç¯å²ã®è¨ç®ãããã ããªã®ã ãã。
èªåã®æºããåéã§ã¯ä¸åã®è¨ç®ã«åå¹´ããããã¨ããããªã®ã§、è¨ç®é度ã¯æ»æ´»åé¡ã 。1åã§çµããå¦çãªãåã«é«éåããã¨ãã¦ãå·®ã¯30ç§ã§ãããªã。ããã、åå¹´ã¨ãªãã¨ãã®å·®ã¯3ã¶æã«ããªã。ã ãã、Fortranã使ãã«ãã¦ã、ããã¢ãã³ãªFortran90/95ã ãã§ã¯ãªã、å¤ãããããå®è¡é度ã®éãFORTRAN77ããã使ããã。ã¾ã、æè¿ã¯é度差ã縮ã¾ã£ã¦ãã¦ããã®ã§ããã¾ã§FORTRAN77ã«ãã ãããªããªã£ã¦ãã¦ãããã©。æ¬å½ã«ã¯ãªãã£ã«ã«ãªé¨åã«ã¯ã¢ã»ã³ããªè¨èªãªã©ã使ããã¦ãã。
ã¾ã、æ±ç¨ã³ã³ãã¥ã¼ã¿ã®ã³ã³ãã¤ã©ã«æ¯ã¹ã¦ã¹ã¼ãã¼ã³ã³ãã¥ã¼ã¿ã«æé©åãããã³ã³ãã¤ã©ã§ã¯ãã°ã®å ¥ã£ã¦ãããã¨ãå¤ã、C++ã§ãBoostãªã©ã®å¤é¨ã©ã¤ãã©ãªã¯é¿ããæ¹ãç¡é£ã 。使ãã«ãã¦ãGoogleã®C++ã³ã¼ãã£ã³ã°è¦ç´ã®ããã«ä¸é¨ã«éå®ãã¦ä½¿ãæ¹ãè¯ã。å®éã«Boost絡ã¿ã®ã³ã³ãã¤ã©ãã°ã«ããæ··ä¹±ãè¦ãã«、STLãªã©ã®æ¨æºã©ã¤ãã©ãªã®ã¿ãã·ã³ãã«ã«å©ç¨ãã¦ããæ¹ãã¾ã å®å ¨ã (ããã§ããã°ããã©)。ããã¯è¨ã£ã¦ãBoostã¯ä¾¿å©ãªã®ã§ã§ããã ãæ©ãC++0xã®æ¨æºåãããã¦ã»ãã。æ¨æºåããã¦ããã°ã³ã³ãã¤ã©ãã³ããè¨ã訳ã§ããªããã。
ããããã°Fortressãªãã¦è¨èªãããã。é¢ç½ã試ã¿ã§ã¯ããããã©ç¾ç¶ã§å©ç¨ããã®ã¯é£ãããããªæ°ããããªã。ç¹ã«åé ã§ãè¿°ã¹ã、Fortranã¨åç¨åº¦ã®å®è¡å¹çãåºãããã¨ããç¹ã¨æ¢åè³ç£ã®ä»£æ¿ãåå¨ããã®ãã¨ããç¹ã§。å ã¿ã«Fortressã§ã®"Hello, World!"ã¯ä»¥ä¸ã®ããã«æ¸ãã¿ãã。
hello.fss
component hello export Executable run() = println("Hello, World!") end
ã³ã¡ã³ã