ä»ã¾ã§ã®ããããã¨ãã¦ãããã¾ã§ã§ãRubyã§ãã¼ãµãæ¸ãããã§ããRBSã§åãä»ãã¾ããã
æ¬ã¨ã³ããªã§ã¯ç°¡åã«ãµãããã£ã¦ã¿ã¾ãã
大åæã¨ãã¦ãå人ã®ææ³ã§ãçæ§ã®ä»å¾ã®åã©ã¤ãã«ã»ãã®ã¡ãã£ã¨åèã«ãªãã°ãããªã¨ããã®ã¯ããã¾ãããå人ã®æ¥è¨ã®è©±ã§ãã
ã¾ããåã誤解ãã¦ããå 容ãããããããã¨æãã®ã§ãã®éã¯ãæ示é¡ãã¾ãã
ãµããããã¨ææ³
- åãããã¨ä¾¿å©
ã¨ã«ãããã®ä¸è¨ã«å°½ãã¾ãã以ä¸ã¯ãã®å 容ã®è£è¶³ã¿ãããªãã®ã
- åããè¨è¨ãå§ããããã®ã¯ä½é¨ããã
ãã¼ã éçºã§ééããæ¸ãã¾ãï¼çãªã¨ãããããã§ãããå人çã«ã¯ åããè¨è¨ãéå§ã§ãã ããã«ãªã£ãã®ã大ãããªã¨æã£ã¦ãã¦ãä»ã¾ã§æ¼ ç¶ã¨ãã¼ã¿æ§é ã決ãã¦ããã®ãããç¨åº¦ãã£ã¡ã決ã¾ãããããããããéç解æããä»çµã¿ãå ¥ããã¨ããã®ã¯çç£æ§ã«å¥½å½±é¿ãã¨ã
- åããè¨è¨ãå§ããé¸æè¢ãåããããã«ãåãå§ããã¨è¯ããã
ä¾ãã°ãScalaãKotlinãRustãSwiftãHaskellã®ãããªä¸å®ä»¥ä¸ãªãããªåããµãã¼ãããè¨èªã®çµé¨ããã£ãæ¹ãRBSã§ããã£ã¨æããã§ã¯ãªããï¼ ã¨æãã¾ããã
å人çã«ä»å¹´ã¯ã²ãããRustãæ¸ãã¦ããããããããã·ã°ããã£ãè¨è¿°ãã¦ããéãRustã§ã³ã¼ããæ¸ããããªæè¦ã§è¡ããã¨ãã§ãã¾ããã
RBSãæ¬æ ¼çã«ãã£ã¦ããåæã¨ãã¦ä¸è¿°ã®è¨èªãçµé¨ãã¦ãåæè¦ã磨ãã¦ããã®ã¯ããããããã¾ããã
- åæè¦ã£ã¦ä½ï¼
åæè¦ãä¸ä½ä½è
ãªã®ã§ãããããåã¯ä»ã Result<Option<Rc<RefCell<AType>>>, Box<dyn Into<TheError>>>
ã®ãããªåå®ç¾©ã«ãããå®å¿æãè¦ãã人éã«ãªã£ã¦ãã¾ããããããããã¨ã§ã¯ãªããããªæ°ããã¾ãããã ãRBSã§ãããç¨åº¦è¤éãªåã¯æ¢ã«è¡¨ç¾ã§ããããã§ãã
- æ°ããRubyã®ã³ã¼ãã¹ã¿ã¤ã«
åãæåã«æ±ºããè¨è¨ãããã§ãããåãããæãã«ä»ãããã«Rubyå´ã®ã³ã¼ããå¤ãã¦ããåããã©ããã¦ãçã¾ããããã«æãã¾ãã
ç´è¿ã®åé¡ã¨ãã¦ããã®ã¯ãRBSèªä½ã®ä»æ§ããTypeProfãsteepã®ãããªéç解æã®ãã¼ã«ãçºå±éä¸ã«ããã¨æãã®ã§ããã¼ã«ã®ç¾å¨ã®å¶éãåé¿ããããã«å¤å°åé·ãããã¯ä¸èªç¶ãªæ¸ãæ¹ãåºã¦ãããã¿ã¼ã³ãããããã - ã¨ããã¨ããã§ãã
åç·¨ ã§ãããã¤ããã®æã®åé¿ãè¡ã£ã¦ããããã¾ããããã ããããããã®ã¯å¾ã ã«æ¹åããã¦ãããã®ãªã®ã§ãã¾ãã¯ãããªã£ã¦æ¬²ããã¨æã£ãããã£ã¼ãããã¯ããã®ãããã¨æãã¾ãã
- ã人ãå ãæ©æ¢°ããã¨ããå°ãã ãå¤ãããããªæ°ããã
ä¸æ¹ã§ãä¾ãã°ãç¡éã«æ»ãå¤ã®åãå¤ãã¦ãããããªã³ã¼ãã§ãã£ãããåãå¤æ°ã«å¥ã®åãæ¼ãè¾¼ãã§ãããããªã³ã¼ãã¯æ¸ã£ã¦ããã¨æãã¾ããã¾ããããç¨åº¦ éç解æã«åªãã ã®æ¸ãæ¹ãæèããå¿ è¦ãåºãããããã¾ãããåãå ¥ãã¨ããããåãã¯ã©ããã¦ãçã¾ãããã«æãã¾ãã
ãã ãå人çã«ã¯ãéç解æã«åªãããªãã¿ã¤ãã®ã³ã¼ãã®å¤æ´ã¯ãå¯èªæ§ãä¿å®æ§ã®åä¸ã«ã¤ãªãããããé¢ããããã¨æãã¾ãã®ã§ãå¿ ããããã¬ãã£ãã§ã¯ããã¾ãã*1ã
è¦ã¯ãã©ã³ã¹ãã¿ããã«ãªãããã§ãããRubyãæ¸ãã¨ãã®ãã¤ã³ããã©ããã¦ãå°ãå¤ããã¨æãã¾ã*2ã
- ã¨ãã£ã¿ãªã©ã¨ã³ã·ã¹ãã ã®çºå±ã«æå¾ ããã
å°ãªãã¨ããç°¡æçã«Emacsã®å種ã¢ã¼ããsteepã®Language Serverãå©ç¨ããã ãã§ããããªãã®çç£æ§ã®åä¸ãæãã¾ããã
ãã ãå®éã®ã³ã¼ãã¨ã·ã°ããã£ãåããã¦ããã¨ããä»æ§ã¯é£ãã¨ãããããã両æ¹ã®ãã¡ã¤ã«ãç·¨éããªãã¨ãããªãã®ã¯å¤å°æéåãã¾ããããã¯ãå解ææ©ãã¨ãã£ã¿ãä¸æã«é£æºãã¦ããããã ãã¶ä½é¨ãéãããã§ããä¾ãã°VSCodeã§RBSãç´æ¥ããããããªæ¡å¼µããã£ããããª...*3ã
ããã¥ã¡ã³ãé¢ãæ å ±éããã¾ãã¯ããããè±èªãæ¥æ¬èªãå°ãªãã¨ããã®ãæ£ç´ãªã¨ããã ã¨æãã®ã§ããã¨ãã° ããã¾ã§ã®RBS解説ãã¼ã¸ã®è¿½å ãªã©ãæ¤è¨ããã¦ãã¾ãããæ¥æ¬èªã§ãããããã¢ã¦ãããããã¦ããã¨ããã®ã ããã¨æãã¾ãã
- Rubyã使ããããªãç¯å²ãçµæçã«åºãããã
ä»åã¯è¨èªã®ãã¼ãµã¨ãããã¼ããé¸ãã§ãã¾ãããæ£ç´ãè¨èªå®è£ ã®ã¬ãã«ã§è¤éãªã½ããã¦ã§ã¢ãæ¸ãã¨ããåä»ãã®æ¯æ´ãå¾ãããã¨ããã®ã¯ å®å¿æ ãéãã¾ãã
Webãããæå³ã§ããã§ãããRubyã¯ã©ããã¦ãã¹ã¯ãªããè¨èªçãªç¨éã¨ããããæ¥ã ã®ä»äºã®èªååãã¡ãã£ã¨ããããã¹ãå¦çãªããã«ä½¿ãããã¡ãªã®ããããã¾ãããããã¦ãè¨èªèªä½ã®å®è£ ãè¤éãªã·ã¹ãã ã½ããã¦ã§ã¢ã®ãããªãã®ãæ¸ãéã¯C++ãJVMè¨èªãGoãRustãä½ããC... ã®ãããªé¸æè¢ãåãããã¡ãªå°è±¡ãããã¾ããå®éåãããç¨åº¦ä»¥ä¸è¤éãªã½ããã¦ã§ã¢ã§ããã°Rustã第ä¸ã®è¨èªåè£ã«ããã¨æãã¾ãã
ã§ããRBSã«è§¦ãã¦ããã®å°è±¡ãã¾ãå¤ãã£ã¦ãã¾ããã åãå©ãã¦ãããããªãããã¡ãã£ã¨è¤éãªãã¤ãããããã¡ããï¼ãã¿ãããªæ°æã¡ã«ãªã£ã¦ãã¾ãã YJIT ã§é度é¢ãããã«æ¹åããããã3.0以éã®å¤æ´ã®çµæã¯Rubyã®é©ç¨ç¯å²æ¡å¤§ãå¾æ¼ãããçµæã«ã¤ãªããããã«æãã¾ãã
åãçãããªãæ¸ãã¦ãã¾ããããåãè¨ããããã¨ã¯ åã決ããã¨æ°æã¡ããï¼ ã¨ãããã¨ã§ããã¿ãªãããåã·ã°ããã£æ¸ãã¦ããã¾ããããã
æå¾ã«RBSãsteepã使ãã«ãããåèã«ãããµã¤ããªã©ãæ®ãã¦ããã¾ãã
RBSã¨steepã®README
ããããã»ã¼ãããã®æ å ±ã ãã§æ¸ããã®ã§é åããããããããª...ã
steepã®smoke test cases
è¨äºãªã©
ãã¨ã pockeããããRBSã®ææ³ãªã©ã«ã¤ãã¦ã®ããã¥ã¡ã³ããæãã¦ããã ãã¾ãããBNFãããã¾ãã... ã¡ããã¨èªã¿ã¾ã...ã