Next: Buffer-Local Variables, Previous: Setting Variables, Up: Variables [Contents][Index]
¤¢¤ë¥·¥ó¥Ü¥ëfoo
¤Ï¡¢¤µ¤Þ¤¶¤Þ¤Ê¥í¡¼¥«¥ë¤ÊÊÑ¿ô«Çû¤ò»ý¤Ä¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
Lisp¥×¥í¥°¥é¥à¤Î°Û¤Ê¤ë¾ì½ê¤Ç³ÎΩ¤µ¤ì¤¿¤â¤Î¤ä
¥°¥í¡¼¥Ð¥ë«Çû¤Ç¤¹¡£
¤â¤Ã¤È¤âºÇ¶á¤Ë³ÎΩ¤·¤¿Â«Çû¤¬Â¾¤Î¤â¤Î¤ËÍ¥À褷¤Þ¤¹¡£
Emacs Lisp¤Î¥í¡¼¥«¥ë«Çû¤Ï¡¢Ìµ¸Â¤Î¥¹¥³¡¼¥×¡Êindefinite scope¡Ë¤È ưŪ¸³´ü´Ö¡Êdynamic extent¡Ë¤ò»ý¤Á¤Þ¤¹¡£ ¥¹¥³¡¼¥×¡Êscope¡Ë¤È¤Ï¡¢¥½¡¼¥¹¥³¡¼¥É¤Î¥Æ¥¥¹¥È¾å¤Î ¤É¤³¤«¤é«Çû¤ò»²¾È¤Ç¤¤ë¤«¤òɽ¤·¤Þ¤¹¡£ ̵¸Â¤Î¥¹¥³¡¼¥×¤È¤Ï¡¢¥×¥í¥°¥é¥à¤Î¤É¤³¤«¤é¤Ç¤âÊÑ¿ô«Çû¤ò»²¾È¤Ç¤¤ë¤³¤È¤ò °ÕÌ£¤·¤Þ¤¹¡£ ¸³´ü´Ö¡Êextent¡Ë¤È¤Ï¡¢¥×¥í¥°¥é¥à¤Î¼Â¹Ô¤Ë¤·¤¿¤¬¤Ã¤Æ¡¢ ¤¤¤Ä«Çû¤¬Â¸ºß¤¹¤ë¤«¤òɽ¤·¤Þ¤¹¡£ ưŪ¸³´ü´Ö¤È¤Ï¡¢Â«Çû¤òºîÀ®¤·¤¿¹½Â¤¤¬Í¸ú¤Ç¤¢¤ë¸Â¤ê¡¢ «Çû¤¬Â¸Â³¤¹¤ë¤³¤È¤ò°ÕÌ£¤·¤Þ¤¹¡£
ưŪ¸³´ü´Ö¤È̵¸Â¤Î¥¹¥³¡¼¥×¤ÎÁȤ߹礻¤ò ưŪ¥¹¥³¡¼¥×¡Êdynamic scoping¡Ë¤È¸Æ¤Ó¤Þ¤¹¡£ ÂоÈŪ¤Ë¡¢¤Û¤È¤ó¤É¤Î¥×¥í¥°¥é¥à¸À¸ì¤Ï¡¢ ¥ì¥¥·¥«¥ë¥¹¥³¡¼¥×¡Êlexical scoping¡Ë¤òÍѤ¤¤Þ¤¹¡£ ¤Ä¤Þ¤ê¡¢¥í¡¼¥«¥ëÊÑ¿ô¤Î»²¾È¤Ï¡¢ ¤½¤ÎÊÑ¿ô¤ò«Çû¤¹¤ë´Ø¿ô¤ä¥Ö¥í¥Ã¥¯¤Î¥Æ¥¥¹¥È¾å¤ÇÆâ¦¤Ë¤¢¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
Common Lisp¤Ë´Ø¤·¤¿Ãí°Õ¡§
Common Lisp¤Ç¤Ï¡¢¡Ø¥¹¥Ú¥·¥ã¥ë¡Ù¤ÈÀë¸À¤·¤¿ÊÑ¿ô¤Ï¡¢ Emacs Lisp¤Î¤¹¤Ù¤Æ¤ÎÊÑ¿ô¤ÈƱÍͤˡ¢Æ°Åª¥¹¥³¡¼¥×¤Ç¤¢¤ë¡£
• Scope: | Scope means where in the program a value is visible. Comparison with other languages. | |
• Extent: | Extent means how long in time a value exists. | |
• Impl of Scope: | Two ways to implement dynamic scoping. | |
• Using Scoping: | How to use dynamic scoping carefully and avoid problems. |