From mboxrd@z Thu Jan 1 00:00:00 1970 Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Lawrence D'Oliveiro Newsgroups: comp.lang.ada Subject: Re: Renaming primitives. Date: Fri, 12 Jan 2024 23:36:07 -0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 12 Jan 2024 23:36:07 -0000 (UTC) Injection-Info: dont-email.me; posting-host="d6f6e66fe00847a4ec7e9d8844058e91"; logging-data="3823897"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/jThvB3XP8iYb9aw/F3Giv" User-Agent: Pan/0.155 (Kherson; fc5a80b8) Cancel-Lock: sha1:BAq3yKW67MqjvC+pnAP5+4j2vGQ= Xref: news.eternal-september.org comp.lang.ada:65991 List-Id: On Fri, 12 Jan 2024 05:47:41 -0400, J-P. Rosen wrote: > Renames shouldn't be seen as a kind of macro (i.e. textual substitution > of the LHS by the RHS). There is the wrong way of implementing macros--by textual substitution-- and there is the right way, as done in homoiconic languages such as Lisp. For example, the latter can give you lexical binding. That is, the rename still refers to the original definition, even in an inner scope where that is masked by another entity with the same name. I assume that is how the Ada mechanism works.