Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.perl.misc > #8717
| From | tmcd@panix.com (Tim McDaniel) |
|---|---|
| Newsgroups | comp.lang.perl.misc |
| Subject | Re: this should work |
| Date | 2013-07-15 17:23 +0000 |
| Organization | Tim McDaniel's at Panix |
| Message-ID | <ks1b76$p8t$1@reader2.panix.com> (permalink) |
| References | <krkm21$19jd$1@news.ntua.gr> <spt3ba-i9r2.ln1@anubis.morrow.me.uk> <87ip0cgfli.fsf@sapphire.mobileactivedefense.com> <kp8dba-9591.ln1@anubis.morrow.me.uk> |
In article <kp8dba-9591.ln1@anubis.morrow.me.uk>, Ben Morrow <ben@morrow.me.uk> wrote: > >Quoth Rainer Weikusat <rweikusat@mssgmbh.com>: >> Ben Morrow <ben@morrow.me.uk> writes: >> >> > A variable is just a way of giving a value a name; >> >> This is true for so-called 'functional programming languages' I would quibble with this terminology. There are languages (LISP and its children) that I would call "functional" because the MAJOR emphasis is for functional programming, but they may still provide a way to change the value of variables (setq and such) in the same was as an imperative language like Perl. I do not see setq and such as fatally tainting the essential functionalness of the language. You definitions may be different. >> but Perl >> isn't one: There, a 'variable' is something like a deposit box >> (term?): A container which can be used to store 'stuff' of a certain >> kind (depending on the type of box) until it is again needed which can >> be 'addressed' in a convenient way (usually, by using an abstract name >> referring to the 'function' of this variable). > >How is that different from 'just a way of giving a value a name'? Because it's giving the STORAGE LOCATION a name. The value in the storage location can change without altering the name of the container. If the Lochners move out of a house and the Willowbys move in, and it remains 730 Watling Street, that's the name of the container. If it goes from being Lochner House to Willowby House, it's the name of the contents. I contrast this with single-assignment languages. Since I wasn't familiar with them, I'll explain in a bit of detail, even though many other people already know about it. I was unfamiliar with them until I had to use DSSSL, a Lisp-like language that was designed for transforming XML into other XML or into formatted output. XSLT is a later version of the same concept. DSSSL is single-assignment, and I think XSLT is too. You can define a name for the result of a computation, but the definition is immutable -- you cannot change the right-hand side once defined. You cannot change the input either. In that case, there may BE no "storage location". Whereever you use the name, so far as I can tell, the interpreter is entirely free to substitute the right-hand side verbatim at that point. I think that any reasonably efficient interpreter would have to evaluate it once and then cache the result. But ideal caching is always behind the scenes. In that case, I'd call it a name for the value. You may object that it's more properly a name for the expression, and I can't argue against that viewpoint, but I am more interested in the value and they do go together. (As an aside, can I exclaim about what a hideous PAIN IN THE ASS it is to program a single-assignment pattern-matching language? So many times I wanted to do the imperative thing (assign -> use) when I couldn't even think of a way to do it with this single-assignment thing. End of rant.) Anyway, sorry if I belabor the obvious. -- Tim McDaniel, tmcd@panix.com
Back to comp.lang.perl.misc | Previous | Next — Previous in thread | Next in thread | Find similar
this should work "George Mpouras" <nospam.gravitalsun.antispam@spamno.hotmail.anispam.com.nospam> - 2013-07-11 01:08 +0300
Re: this should work Jim Gibson <jimsgibson@gmail.com> - 2013-07-10 15:49 -0700
Re: this should work George Mpouras <nospam.gravitalsun.noadsplease@hotmail.noads.com> - 2013-07-11 09:42 +0300
Re: this should work tmcd@panix.com (Tim McDaniel) - 2013-07-11 08:02 +0000
Re: this should work Ben Morrow <ben@morrow.me.uk> - 2013-07-11 12:45 +0100
Re: this should work George Mpouras <nospam.gravitalsun.noadsplease@hotmail.noads.com> - 2013-07-11 15:03 +0300
Re: this should work "Peter J. Holzer" <hjp-usenet3@hjp.at> - 2013-07-11 14:52 +0200
Re: this should work George Mpouras <nospam.gravitalsun.noadsplease@hotmail.noads.com> - 2013-07-11 16:01 +0300
Re: this should work Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-11 14:29 +0100
Re: this should work Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-11 14:27 +0100
Re: this should work Peter Makholm <peter@makholm.net> - 2013-07-11 15:50 +0200
Re: this should work Jürgen Exner <jurgenex@hotmail.com> - 2013-07-11 03:34 -0700
Re: this should work George Mpouras <nospam.gravitalsun.noadsplease@hotmail.noads.com> - 2013-07-11 13:55 +0300
Re: this should work Peter Makholm <peter@makholm.net> - 2013-07-11 13:57 +0200
Re: this should work Shmuel (Seymour J.) Metz <spamtrap@library.lspace.org.invalid> - 2013-07-11 09:10 -0400
Re: this should work Ben Morrow <ben@morrow.me.uk> - 2013-07-11 21:35 +0100
Re: this should work Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-11 10:32 +0100
Re: this should work Ben Morrow <ben@morrow.me.uk> - 2013-07-11 12:51 +0100
Re: this should work Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-11 13:42 +0100
Re: this should work Ben Morrow <ben@morrow.me.uk> - 2013-07-11 16:23 +0100
Re: this should work Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-11 17:17 +0100
Re: this should work Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-11 18:08 +0100
Re: this should work Ben Morrow <ben@morrow.me.uk> - 2013-07-11 21:48 +0100
Re: this should work Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us> - 2013-07-11 10:32 -0700
Re: this should work Jürgen Exner <jurgenex@hotmail.com> - 2013-07-11 10:48 -0700
Re: this should work "George Mpouras" <nospam.gravitalsun.antispam@spamno.hotmail.anispam.com.nospam> - 2013-07-11 21:38 +0300
Re: this should work Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-11 23:08 +0100
Re: this should work Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-11 18:48 +0100
Re: this should work Charles DeRykus <derykus@gmail.com> - 2013-07-11 12:03 -0700
Re: this should work Ben Morrow <ben@morrow.me.uk> - 2013-07-11 22:02 +0100
Re: this should work Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-11 23:06 +0100
Re: this should work Ben Morrow <ben@morrow.me.uk> - 2013-07-12 01:04 +0100
Re: this should work Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-15 13:41 +0100
Re: this should work Ben Morrow <ben@morrow.me.uk> - 2013-07-15 14:07 +0100
Re: this should work Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-15 15:05 +0100
Re: this should work Ben Morrow <ben@morrow.me.uk> - 2013-07-15 21:02 +0100
Re: this should work Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-15 23:58 +0100
Re: this should work tmcd@panix.com (Tim McDaniel) - 2013-07-15 17:23 +0000
Re: this should work Charlton Wilbur <cwilbur@chromatico.net> - 2013-07-15 15:40 -0400
Re: this should work Ben Morrow <ben@morrow.me.uk> - 2013-07-11 21:58 +0100
Re: this should work Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-11 23:17 +0100
[OT] scoping Ivan Shmakov <oneingray@gmail.com> - 2013-07-12 07:50 +0000
Re: [OT] scoping aka 'new holes in old shoes' Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-12 11:53 +0100
[OT] engineering Ivan Shmakov <oneingray@gmail.com> - 2013-07-15 11:37 +0000
Re: [OT] engineering Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-16 21:49 +0100
Re: [OT] engineering Ivan Shmakov <oneingray@gmail.com> - 2013-07-17 09:27 +0000
Re: [OT] engineering Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-17 15:53 +0100
Re: [OT] engineering Ivan Shmakov <oneingray@gmail.com> - 2013-07-22 10:36 +0000
Re: [OT] engineering Shmuel (Seymour J.) Metz <spamtrap@library.lspace.org.invalid> - 2013-07-23 06:43 -0400
Re: [OT] engineering Ivan Shmakov <oneingray@gmail.com> - 2013-07-22 10:38 +0000
Re: [OT] engineering Rui Maciel <rui.maciel@gmail.com> - 2013-07-26 10:09 +0100
Re: [OT] scoping "Peter J. Holzer" <hjp-usenet3@hjp.at> - 2013-07-12 14:58 +0200
Re: [OT] scoping Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-12 15:50 +0100
Re: [OT] scoping Shmuel (Seymour J.) Metz <spamtrap@library.lspace.org.invalid> - 2013-07-12 13:34 -0400
Re: [OT] scoping Ben Morrow <ben@morrow.me.uk> - 2013-07-12 22:04 +0100
Re: [OT] scoping Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-13 13:13 +0100
Re: [OT] scoping John Black <jblack@nospam.com> - 2013-07-13 20:01 -0500
Re: [OT] scoping Ben Morrow <ben@morrow.me.uk> - 2013-07-14 03:24 +0100
Re: [OT] scoping "Dr.Ruud" <rvtol+usenet@xs4all.nl> - 2013-07-14 10:49 +0200
Re: [OT] scoping Ben Morrow <ben@morrow.me.uk> - 2013-07-14 13:13 +0100
Re: [OT] scoping "Dr.Ruud" <rvtol+usenet@xs4all.nl> - 2013-07-14 17:02 +0200
Re: [OT] scoping Ben Morrow <ben@morrow.me.uk> - 2013-07-14 22:21 +0100
Re: [OT] scoping "Dr.Ruud" <rvtol+usenet@xs4all.nl> - 2013-07-15 02:21 +0200
Re: [OT] scoping Xho Jingleheimerschmidt <xhoster@gmail.com> - 2013-07-14 17:04 -0700
Re: [OT] scoping Ben Morrow <ben@morrow.me.uk> - 2013-07-15 14:12 +0100
Re: [OT] scoping tmcd@panix.com (Tim McDaniel) - 2013-07-14 15:11 +0000
Re: [OT] scoping "Dr.Ruud" <rvtol+usenet@xs4all.nl> - 2013-07-14 17:34 +0200
Re: [OT] scoping Xho Jingleheimerschmidt <xhoster@gmail.com> - 2013-07-14 15:34 -0700
Re: [OT] scoping Ben Morrow <ben@morrow.me.uk> - 2013-07-15 14:27 +0100
Re: [OT] scoping John Black <jblack@nospam.com> - 2013-07-14 23:48 -0500
Re: [OT] scoping Martijn Lievaart <m@rtij.nl.invlalid> - 2013-07-13 12:14 +0200
Re: this should work David Harmon <source@netcom.com> - 2013-07-11 10:02 -0700
Re: this should work Ben Morrow <ben@morrow.me.uk> - 2013-07-11 22:04 +0100
Re: this should work David Harmon <source@netcom.com> - 2013-07-12 09:34 -0700
Re: this should work Rainer Weikusat <rweikusat@mssgmbh.com> - 2013-07-12 18:16 +0100
Re: this should work "Dr.Ruud" <rvtol+usenet@xs4all.nl> - 2013-07-12 15:44 +0200
Re: this should work David Harmon <source@netcom.com> - 2013-07-12 15:53 -0700
Re: this should work Shmuel (Seymour J.) Metz <spamtrap@library.lspace.org.invalid> - 2013-07-11 09:14 -0400
Re: this should work "George Mpouras" <nospam.gravitalsun.antispam@spamno.hotmail.anispam.com.nospam> - 2013-07-11 19:45 +0300
csiph-web