Deutsch English Français Italiano |
<uvcihh$2kbfj$5@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Lawrence D'Oliveiro <ldo@nz.invalid> Newsgroups: comp.lang.c Subject: Re: Recursion, Yo Date: Sat, 13 Apr 2024 00:10:25 -0000 (UTC) Organization: A noiseless patient Spider Lines: 28 Message-ID: <uvcihh$2kbfj$5@dont-email.me> References: <uut24f$2icpb$1@dont-email.me> <uutqd2$bhl0$1@i2pn2.org> <uv2u2a$41j5$1@dont-email.me> <87edbestmg.fsf@bsb.me.uk> <uv4r9e$mdd3$1@dont-email.me> <uv5e3l$q885$1@dont-email.me> <uv5gfd$qum1$1@dont-email.me> <uv5lgl$s6uj$1@dont-email.me> <uv61f6$v1jm$1@dont-email.me> <uv68ok$11080$1@dont-email.me> <uv7a8n$18qf8$3@dont-email.me> <uv867l$1j8l6$1@dont-email.me> <_zSRN.161297$m4d.144795@fx43.iad> <20240411075825.30@kylheku.com> <r8TRN.114606$Wbff.54968@fx37.iad> <uva6ep$24ji7$1@dont-email.me> <uvah1j$26gtr$1@dont-email.me> <uvanua$27qn8$1@dont-email.me> <uvbbed$2cdhc$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sat, 13 Apr 2024 02:10:26 +0200 (CEST) Injection-Info: dont-email.me; posting-host="c07c9bb19a0975fd36cf4a2cbd5e0704"; logging-data="2764275"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/64kAN4paPLosgKVrCffls" User-Agent: Pan/0.155 (Kherson; fc5a80b8) Cancel-Lock: sha1:3v8O/0LO4MlE/mgsI+wqcZZ1R4U= Bytes: 2628 On Fri, 12 Apr 2024 15:03:08 +0200, Janis Papanagnou wrote: > Another one is that you can write (e.g. in Algol 68 or many other higher > level languages) the equivalent of - again a simple example - > > int x = 2 * pi * r > > without necessity to know whether pi is a constant, the result of a > function (calculation), the result of a function implicitly called just > once on demand, or whatever else. Conceptually as a programming language > user you want the value. In Python you can’t do this with an unqualified name, but you can with a qualified one, e.g. x = 2 * math.pi * r Which one of these might be true? * “math” is a module, and “pi” is a variable defined within it * “math” is a class, and “pi” is a variable defined within it * “math” is an instance of a class, and “pi” is a variable defined either within that instance or the class * “math” is an instance of a class, and “pi” is a “property”, which is computing a value, on demand, via an implicit method call Note that the fourth possibility does an implicit method call without argument parentheses.