ðã¹ã¬ããããã³ãŒããšforth
ã¹ã¬ããããã³ãŒãïŒThreaded codeïŒãšForthã«ã€ããŠèª¬æããŸãã
ã¹ã¬ããããã³ãŒãïŒThreaded CodeïŒ
ã¹ã¬ããããã³ãŒãã¯ãããã°ã©ã ã®åœä»€ãã¡ã¢ãªå ã§ã©ã®ããã«é 眮ãããå®è¡ãããããæãããã°ã©ãã³ã°ææ³ã§ããäž»ã«ã€ã³ã¿ãŒããªã¿ãäœã¬ãã«ã®ã³ã³ãã€ã©ã§äœ¿çšãããŸããã¹ã¬ããããã³ãŒãã¯ãåœä»€ã®å®è¡ãé«éåããããã«ãåœä»€ãžã®ãã€ã³ã¿ãçšããŠåœä»€åãé£çµãããŸãããã®ææ³ã«ã¯ãäž»ã«ä»¥äžã®2çš®é¡ããããŸãã
çŽæ¥ã¹ã¬ããããã³ãŒãïŒDirect Threaded CodeïŒ: åœä»€ã®ã¢ãã¬ã¹ãçŽæ¥ãã€ã³ã¿ãšããŠæã¡ããããçŽæ¥ãžã£ã³ãããŠå®è¡ããæ¹æ³ã§ããããã«ãããåœä»€ã®åŒã³åºããªãŒããŒããããæžå°ããŸãã
éæ¥ã¹ã¬ããããã³ãŒãïŒIndirect Threaded CodeïŒ: åœä»€ãžã®ãã€ã³ã¿ãéæ¥çã«åç §ãããã®ãã€ã³ã¿ãéããŠåœä»€ãå®è¡ããæ¹æ³ã§ããããã¯ãå®è¡æã«åçãªå€æŽãå¯èœãªæè»æ§ãæäŸããŸãããçŽæ¥ã¹ã¬ããã³ãŒãã«æ¯ã¹ããšè¥å¹²ã®ãªãŒããŒããããå¢å ããŸãã
Forth
Forthã¯ãã¹ã¿ãã¯ããŒã¹ã®ããã°ã©ãã³ã°èšèªã§ããããã®ã·ã³ãã«ããæ¡åŒµæ§ãäœã¬ãã«æäœã®å®¹æããããçµã¿èŸŒã¿ã·ã¹ãã ããªã¢ã«ã¿ã€ã ã·ã¹ãã ã®éçºã«ãã䜿çšãããŸããForthã¯ãã¹ã¬ããããã³ãŒãã®æŠå¿µãå©çšããå
žåçãªäŸã§ããForthããã°ã©ã ã¯ãéåžžãã³ã³ãã¯ããªã³ãŒããšé«éãªå®è¡ãå®çŸããããã«ãçŽæ¥ãŸãã¯éæ¥ã¹ã¬ããããã³ãŒãææ³ã䜿çšããŠå®è£
ãããŸãã
Forthã®ç¹åŸŽã¯ä»¥äžã®éãã§ãïŒ
ã€ã³ã¿ã©ã¯ãã£ã: ã³ãã³ããå³åº§ã«ãã¹ãããçµæã確èªã§ããŸãã
æ¡åŒµæ§: ãŠãŒã¶ãŒãç¬èªã®åœä»€ïŒã¯ãŒããšåŒã°ããïŒãç°¡åã«è¿œå ããèšèªãæ¡åŒµã§ããŸãã
å¹ççãªãªãœãŒã¹äœ¿çš: äœã¬ãã«ã®å¶åŸ¡ãšé«åºŠãªæé©åã«ãããéããããªãœãŒã¹ãæã€ã·ã¹ãã ã§ã®äœ¿çšã«é©ããŠããŸãã
ããŒã¿ããªãã£: ã·ã³ãã«ãªã³ã¢ã«ãããããŸããŸãªããŒããŠã§ã¢ãOSã«å®¹æã«ç§»æ€å¯èœã§ãã
Forthãšã¹ã¬ããããã³ãŒãã¯ãç¹ã«çµã¿èŸŒã¿ã·ã¹ãã ããªãœãŒã¹ãéãããç°å¢ã§ã®ããã°ã©ãã³ã°ã«ãããŠããã®å¹çæ§ãšæè»æ§ããçŸåšãé¢å¿ãéããŠããŸãã
ããèãããšforthã£ãŠã»ãšãã©ã¢ã»ã³ããªèšèªã§ãã
確ãã«ãForthã¯ãã®èšèšãšå®è£ æ¹æ³ããèŠãŠãã¢ã»ã³ããªèšèªã«éåžžã«è¿ãæ§è³ªãæã£ãŠããŸããããã€ãã®ç¹ã§ãForthã¯ã¢ã»ã³ããªèšèªãšäŒŒãç¹åŸŽãæã£ãŠããŸãïŒ
äœã¬ãã«ãªå¶åŸ¡ïŒForthã¯éåžžã«äœã¬ãã«ãªå¶åŸ¡ãæäŸããçŽæ¥ããŒããŠã§ã¢ãæäœããã®ã«é©ããŠããŸããã¹ã¿ãã¯ããŒã¹ã®æäœãã¡ã¢ãªã¢ãã¬ã¹ã®çŽæ¥æäœãå¯èœã§ãã
é«å¹çïŒForthã¯å¹çæ§ãéèŠããŠãããã¹ã¬ããããã³ãŒãã«ããå®è£ ãã³ã³ãã¯ãã§é«éãªå®è¡ãå¯èœã«ããŸããããã«ãããçµã¿èŸŒã¿ã·ã¹ãã ããªãœãŒã¹ãéãããç°å¢ã§ã®äœ¿çšãé©ããŠããŸãã
æè»ãªæ¡åŒµæ§ïŒForthã¯ç°¡åã«æ°ããåœä»€ãæ§é ãè¿œå ã§ãããããã«ã¹ã¿ãã€ãºãæé©åã容æã§ããããã¯ãã¢ã»ã³ããªèšèªã§ã®ãã¯ããã€ã³ã©ã€ã³ã¢ã»ã³ããªãšäŒŒãŠããŸãã
ã€ã³ã¿ã©ã¯ãã£ããªéçºïŒForthã¯ã€ã³ã¿ãŒããªã¿ãšã³ã³ãã€ã©ã®äž¡æ¹ãæäŸããã€ã³ã¿ã©ã¯ãã£ããªéçºãå¯èœã§ããããã¯ã¢ã»ã³ããªèšèªã®REPLïŒRead-Eval-Print LoopïŒã®ãããªæ©èœãšäŒŒãŠããŸãã
ãã ããForthã¯ã¢ã»ã³ããªèšèªãããé«ã¬ãã«ãªæœè±¡åãæäŸãããããããã°ã©ã ã®æ§é ã管çã容æã«ãªããŸãããŸããForthã®èŸæžæ©èœãé«ã¬ãã«ãªå¶åŸ¡æ§é ïŒã«ãŒããæ¡ä»¶åå²ãªã©ïŒã¯ãã¢ã»ã³ããªèšèªã«ã¯ãªã匷åãªããŒã«ã§ãã
ãé¡ãèŽããŸã