Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #1598
| From | "Rod Pemberton" <do_not_have@noavailemail.cmm> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: STATE |
| Date | 2011-04-30 03:24 -0400 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <ipgd6a$4v1$1@speranza.aioe.org> (permalink) |
| References | (2 earlier) <d78fa1a4-efa0-435f-8d3a-d97cc3a439fd@24g2000yqk.googlegroups.com> <ipetrr$vjv$1@speranza.aioe.org> <13ec1787-cf0d-416e-998f-98b0552fd333@w21g2000yqm.googlegroups.com> <ipf473$gor$1@speranza.aioe.org> <f1988d87-facb-4c48-ad56-5f3384b1c41c@28g2000yqu.googlegroups.com> |
"BruceMcF" <agila61@netscape.net> wrote in message news:f1988d87-facb-4c48-ad56-5f3384b1c41c@28g2000yqu.googlegroups.com... > On Apr 29, 3:45 pm, "Rod Pemberton" <do_not_h...@noavailemail.cmm> > wrote: > > I don't know if it's moot whether or not one treats a low-use, or > > minimal-value-change, variable as a constant. E.g., spec. says one > > thing, but common implementation differs. > > The statement that you were replying to was that the question of > whether or not it [STATE] should be treated as a variable is moot > if legacy code lock requires it to be available as a variable in any > event, irrespective of behind the scenes implementation. > 1) less wordy There was no question. That's very literal of you. You disregarded the meaning. You disregarded the context. 2) more wordy If you disregard all of the prior context regarding constant vs. variable, and choose to restrict my statements to only the statement of Mark's immediately prior to the first response of mine that you replied to, then, yes, that would be correct, except for the fact that Mark's statement didn't involve a question. He stated his response in terms of STATE. I took that to be equivalent to constant vs. variable. First, his response is equivalent. Second, I assumed he expressed primarily in terms of STATE because his earlier question seemed to express uncertainty about the difference between variables and constant. Unfortunately, the context covers four messages prior to your response, not just the immediate statement(s) to which I replied. Constant vs. variable was what was being discussed in this part of the thread, IMO. > You raised the implementation details of a once-common implementation, > that is now primarily a historical curiosity, to question whether the > statement was right. > I took the conversation in this part of the thread to be choice of constant vs. variable. That was what Mark asked about. That was what I replied to. That was what he replied to, in an equivalent form IMO. That was what I responded to, just prior to you responding. > That seems to be a misreading of the statement, > Only if you disregard earlier context ... > If write once, read many should be a constant, write rarely, read > often should be a value, and read and write with similar frequency > should be a variable, > Who said that's what they should be? And, why not four? five? six types? Of course, you didn't mention other combinations of once, rarely, often, many for read and write. So, one could select other combinations. Are any of them more useful than constant or variable? Probably not... Is the implementation of write once, read rarely any different than constant? Is write rarely, read often any different from read and write similarly? I agree that adding a third type - value in this case - would theoretically solve this discussion, er... make it moot. But, such combinations are unneeded. Constants are just variables that are never written to again. So, you could ask if a low-use variable is just a constant in disguise, as Mark did indirectly via his question about implementation of STATE. And, you could ask why does Forth - a language of minimalism - support constants at all. Clearly, there is no need for constants when one has variables. Of course, that denies the reality of most assembly languages which implement constants and "variables". Language pedants (wrongly) regard assembly as irrelevant anyway, preferring the more abstract (simple, vague) descriptions in the language specification. But, a house is not built without a foundation. Both Forth and C were rewritten to make them work with various assemblies of their era's. In Forth's case, it was rewritten to work with a HLL also. That (assembly) is why they have variables and constants, at least IMO. > ... it seems like a compiler/interpreter that > consults compiler state per word could reasonably > implement it as a value, > A compiler/interpreter could reasonably implement it [STATE] as two of the three you suggested ... So? > [SNIP] Rod Pemberton
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
STATE MarkWills <markrobertwills@yahoo.co.uk> - 2011-04-27 12:41 -0700
Re: STATE Alex McDonald <blog@rivadpm.com> - 2011-04-27 13:04 -0700
Re: STATE MarkWills <markrobertwills@yahoo.co.uk> - 2011-04-27 13:13 -0700
Re: STATE Alex McDonald <blog@rivadpm.com> - 2011-04-27 13:45 -0700
Re: STATE "P.M.Lawrence" <pml540114@gmail.com> - 2011-04-28 03:00 -0700
Re: STATE Alex McDonald <blog@rivadpm.com> - 2011-04-28 04:09 -0700
Re: STATE Alex McDonald <blog@rivadpm.com> - 2011-04-28 04:10 -0700
Re: STATE Micke <oh2aun@gmail.com> - 2011-04-27 13:20 -0700
Re: STATE MarkWills <markrobertwills@yahoo.co.uk> - 2011-04-27 13:26 -0700
Re: STATE MarkWills <markrobertwills@yahoo.co.uk> - 2011-04-27 13:30 -0700
Re: STATE Elizabeth D Rather <erather@forth.com> - 2011-04-27 11:13 -1000
Re: STATE Elizabeth D Rather <erather@forth.com> - 2011-04-27 17:17 -1000
Re: STATE Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-04-29 06:14 -0500
Re: STATE Elizabeth D Rather <erather@forth.com> - 2011-04-29 08:47 -1000
Re: STATE MarkWills <markrobertwills@yahoo.co.uk> - 2011-04-29 14:07 -0700
Re: STATE BruceMcF <agila61@netscape.net> - 2011-04-27 19:22 -0700
Re: STATE BruceMcF <agila61@netscape.net> - 2011-04-30 08:18 -0700
Re: STATE BruceMcF <agila61@netscape.net> - 2011-04-30 08:26 -0700
Re: STATE "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2011-04-30 03:24 -0400
Re: STATE stephenXXX@mpeforth.com (Stephen Pelc) - 2011-04-30 11:41 +0000
Re: STATE stephenXXX@mpeforth.com (Stephen Pelc) - 2011-04-30 11:53 +0000
Re: STATE BruceMcF <agila61@netscape.net> - 2011-04-30 08:48 -0700
Re: STATE anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-04-28 08:59 +0000
Re: STATE Brad <hwfwguy@gmail.com> - 2011-04-28 08:01 -0700
Re: STATE Andrew Haley <andrew29@littlepinkcloud.invalid> - 2011-04-28 12:16 -0500
Re: STATE Elizabeth D Rather <erather@forth.com> - 2011-04-28 09:47 -1000
Re: STATE BruceMcF <agila61@netscape.net> - 2011-04-28 15:56 -0700
Re: STATE Brad <hwfwguy@gmail.com> - 2011-04-29 07:49 -0700
Re: STATE BruceMcF <agila61@netscape.net> - 2011-04-29 11:47 -0700
Re: STATE anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-04-29 17:30 +0000
Re: STATE Albert van der Horst <albert@spenarnc.xs4all.nl> - 2011-04-28 17:47 +0000
Re: STATE Elizabeth D Rather <erather@forth.com> - 2011-04-28 09:50 -1000
Re: STATE "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2011-04-28 16:32 -0400
Re: STATE MarkWills <markrobertwills@yahoo.co.uk> - 2011-04-29 02:11 -0700
Re: STATE BruceMcF <agila61@netscape.net> - 2011-04-29 07:24 -0700
Re: STATE "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2011-04-29 13:56 -0400
Re: STATE BruceMcF <agila61@netscape.net> - 2011-04-29 11:44 -0700
Re: STATE "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2011-04-29 15:45 -0400
Re: STATE Elizabeth D Rather <erather@forth.com> - 2011-04-29 10:22 -1000
Re: STATE BruceMcF <agila61@netscape.net> - 2011-04-29 13:31 -0700
Re: STATE Elizabeth D Rather <erather@forth.com> - 2011-04-29 09:07 -1000
csiph-web