Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #41012
| From | "Alex McDonald" <blog@rivadpm.com> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: RfD: Quotations |
| Date | 2015-07-31 12:48 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <mpfn7i$1m1$1@dont-email.me> (permalink) |
| References | (7 earlier) <72532059-7f57-4aad-b078-15bef3102068@googlegroups.com> <53cc1c72-ffec-4aa1-a9f3-99985cc1ee2f@googlegroups.com> <2015Jul30.134533@mips.complang.tuwien.ac.at> <11c761a9-9202-41d8-917d-3f9379132a08@googlegroups.com> <2015Jul31.125434@mips.complang.tuwien.ac.at> |
on 31/07/2015 11:54:31, wrote:
> Raimond Dragomir <raimond.dragomir@gmail.com> writes:
>>> For the present proposal there is no need for an ambiguous condition.
>>> The proposal could just declare references to an outer local to be an
>>> error, and the compiler would be required to report the error. Of
>>> course, this would close the door to allowing outer locals, at least
>>> with the [: ... ;] syntax. Do you want this?
>>>
>>Yes. Better than having another ambiguous condition in the standard.
>>The question is: do you want an ambiguous condition?
>
> The benefits in this case are:
>
> 1) Systems that want to support access to outer locals don't need a
> separate syntax for that.
>
> 2) If we find consensus on what to do about outer locals, we can
> extend the standard to include that, without breaking existing
> standard programs.
>
> However, most likely we won't find consensus: there will likely be
> some who say that it is not needed, and among the rest there will
> probably be different approaches, too. And even if there is a
> consensus on how to do it, there will probably be existing code
> (due to benefit 1) for some existing system that would conflict
> with the consensus, and therefore we would need a new name anyway.
>
> It might be easier to extend the standard in this direction if we
> just specify that outer locals are not visible (thus eliminating
> benefit 1): While extending the standard would break programs such
> as
>
> variable x : foo {: x :} [: x @ . :] execute ;
>
> there will be few, if any, such programs.
>
> So maybe we should not make it ambiguous after all. Systems
> experimenting with access to outer locals should use a different
> syntax for that.
>
>>What about C standard? You are allowed to get the address of a local
>>variable. You can use it after the local is gone out of scope. It happened
>>to me a few times. Of course, the program crashed.
>>What is the C standard saying about this?
>
>|6.2.4 Storage durations of objects
> [...]
>|If an object is referred to outside of its lifetime, the behavior is
>|undefined.
>
>>The Forth standard can say the same thing.
>
> And how is undefined behavior better than an ambiguous condition?
>
> - anton
While I'm in rant mood, let me trash the idea that "undefined behaviour"
actually means something in terms of the RfD; it doesn't.
I have a system that, when you do this;
: foo { a } [: a 1+ . ;] execute ;
1 foo
has a specified behaviour. It adds 1 to the number you give it and prints
the string representing that number. This is *not* undefined behaviour.
It is defined by the implementation of my compiler, and allowed by the
specification. It actually has a reasonable interpretation.
When fed the above code, another compiler might document the outcome as
printing the string "Hugh Aguilar says fake" and then chopping the door
down to your office and setting fire to you and the contents. It would
still be compliant.
The C spec that refers to prodding dead objects says "Don't do that.
Never. Ever.". The RfD specification doesn't presume to tell you not to
do that. It says this is an "ambiguous condition: a circumstance for
which this standard does not prescribe a specific behavior".
End of rant.
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-28 21:22 +0100
Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-07-29 07:35 +0000
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-29 14:20 +0100
Re: RfD: Quotations Ron Aaron <rambamist@gmail.com> - 2015-07-29 13:44 +0300
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-29 13:42 +0100
Re: RfD: Quotations Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-07-29 05:35 -0700
Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-07-29 13:34 +0000
Re: RfD: Quotations Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-07-29 07:35 -0700
Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-07-29 15:05 +0000
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-29 16:19 +0100
Re: RfD: Quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-07-29 21:48 +0100
Re: RfD: Quotations mhx@iae.nl - 2015-07-29 11:13 -0700
Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-07-30 13:04 +0000
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-29 15:07 +0100
Re: RfD: Quotations Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-07-29 07:44 -0700
Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-07-29 15:12 +0000
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-29 16:18 +0100
Re: RfD: Quotations Bernd Linsel <bl1@gmx.com> - 2015-07-29 18:37 +0200
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-29 17:55 +0100
Re: RfD: Quotations "Elizabeth D. Rather" <erather@forth.com> - 2015-07-29 19:51 -0500
Re: RfD: Quotations Bernd Linsel <bl1@gmx.com> - 2015-07-30 03:31 +0200
Re: RfD: Quotations hughaguilar96@gmail.com - 2015-07-29 19:30 -0700
Re: RfD: Quotations Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-07-29 21:19 -0700
Re: RfD: Quotations Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-07-29 21:37 -0700
Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-07-30 11:45 +0000
Re: RfD: Quotations Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-07-30 08:07 -0700
Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-07-31 10:54 +0000
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-31 12:48 +0100
Re: RfD: Quotations Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-07-31 05:40 -0700
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-31 14:46 +0100
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-31 14:50 +0100
Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-07-31 14:46 +0000
Re: RfD: Quotations hughaguilar96@gmail.com - 2015-07-31 13:16 -0700
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-31 21:49 +0100
Re: RfD: Quotations hughaguilar96@gmail.com - 2015-07-29 22:42 -0700
Re: RfD: Quotations "Elizabeth D. Rather" <erather@forth.com> - 2015-07-30 08:46 -0500
Re: RfD: Quotations Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-07-29 21:40 -0700
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-30 10:01 +0100
Re: RfD: Quotations Bernd Linsel <bl1@gmx.com> - 2015-07-30 12:00 +0200
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-30 11:10 +0100
Re: RfD: Quotations Coos Haak <chforth@hccnet.nl> - 2015-07-30 16:35 +0200
Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-07-29 16:53 +0000
Re: RfD: Quotations Bernd Linsel <bl1@gmx.com> - 2015-07-29 19:03 +0200
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-29 18:24 +0100
Re: RfD: Quotations Bernd Linsel <bl1@gmx.com> - 2015-07-30 01:38 +0200
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-30 09:10 +0100
Re: RfD: Quotations Bernd Linsel <bl1@gmx.com> - 2015-07-30 12:06 +0200
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-30 11:21 +0100
Re: RfD: Quotations Bernd Linsel <bl1@gmx.com> - 2015-07-30 14:00 +0200
Re: RfD: Quotations franck.bensusan@gmail.com - 2015-07-30 06:59 -0700
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-31 10:53 +0100
Re: RfD: Quotations Paul Rubin <no.email@nospam.invalid> - 2015-07-29 10:35 -0700
Re: RfD: Quotations Bernd Linsel <bl1@gmx.com> - 2015-07-30 01:45 +0200
Re: RfD: Quotations Bernd Linsel <bl1@gmx.com> - 2015-07-30 03:17 +0200
Re: RfD: Quotations hughaguilar96@gmail.com - 2015-07-29 19:21 -0700
Re: RfD: Quotations Paul Rubin <no.email@nospam.invalid> - 2015-07-29 23:04 -0700
Re: RfD: Quotations Bernd Linsel <bl1@gmx.com> - 2015-07-30 12:38 +0200
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-30 12:09 +0100
Re: RfD: Quotations Bernd Linsel <bl1@gmx.com> - 2015-07-30 13:26 +0200
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-31 09:47 +0100
Re: RfD: Quotations Raimond Dragomir <raimond.dragomir@gmail.com> - 2015-07-31 02:51 -0700
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-31 11:21 +0100
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-30 09:11 +0100
Re: RfD: Quotations Paul Rubin <no.email@nospam.invalid> - 2015-07-29 11:36 -0700
Re: RfD: Quotations Paul Rubin <no.email@nospam.invalid> - 2015-07-29 11:37 -0700
Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-07-30 13:07 +0000
Re: RfD: Quotations Bernd Linsel <bl1@gmx.com> - 2015-07-30 16:25 +0200
Re: RfD: Quotations mhx@iae.nl - 2015-07-29 11:16 -0700
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-29 20:27 +0100
Re: RfD: Quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-07-29 21:57 +0100
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-29 22:48 +0100
Re: RfD: Quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-07-31 12:34 +0100
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-31 13:00 +0100
Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-07-31 14:31 +0000
Re: RfD: Quotations mhx@iae.nl - 2015-07-31 11:32 -0700
Re: RfD: Quotations mhx@iae.nl - 2015-07-29 21:42 -0700
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-30 09:57 +0100
Re: RfD: Quotations hughaguilar96@gmail.com - 2015-07-29 17:21 -0700
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-30 09:56 +0100
Re: RfD: Quotations franck.bensusan@gmail.com - 2015-07-30 04:15 -0700
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-30 12:30 +0100
Re: RfD: Quotations franck.bensusan@gmail.com - 2015-07-30 05:04 -0700
Re: RfD: Quotations hughaguilar96@gmail.com - 2015-07-30 13:07 -0700
Re: RfD: Quotations hughaguilar96@gmail.com - 2015-07-29 16:52 -0700
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-30 09:53 +0100
Re: RfD: Quotations Bernd Paysan <bernd.paysan@gmx.de> - 2015-07-30 21:45 +0200
Re: RfD: Quotations hughaguilar96@gmail.com - 2015-07-30 13:25 -0700
Re: RfD: Quotations Julian Fondren <ayrnieu@gmail.com> - 2015-07-30 15:11 -0700
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-31 09:11 +0100
Re: RfD: Quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-07-31 12:04 +0100
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-30 22:51 +0100
Re: RfD: Quotations hughaguilar96@gmail.com - 2015-07-30 22:38 -0700
Re: RfD: Quotations "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-07-31 02:10 -0400
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-31 09:01 +0100
Re: RfD: Quotations hughaguilar96@gmail.com - 2015-08-01 14:59 -0700
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-08-01 23:36 +0100
Re: RfD: Quotations Bernd Paysan <bernd.paysan@gmx.de> - 2015-08-02 01:19 +0200
Re: RfD: Quotations hughaguilar96@gmail.com - 2015-08-01 18:27 -0700
Re: RfD: Quotations hughaguilar96@gmail.com - 2015-08-09 14:34 -0700
Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-07-31 08:52 +0000
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-31 11:57 +0100
Re: RfD: Quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-07-31 21:42 +0100
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-07-31 22:25 +0100
Re: RfD: Quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-07-31 23:39 +0100
Re: RfD: Quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-08-01 10:59 +0100
Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-08-01 14:18 +0000
Re: RfD: Quotations Bernd Paysan <bernd.paysan@gmx.de> - 2015-08-01 22:10 +0200
Re: RfD: Quotations anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-08-02 05:36 +0000
Re: RfD: Quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-08-03 16:40 +0100
Re: RfD: Quotations "Alex McDonald" <blog@rivadpm.com> - 2015-08-03 18:02 +0100
Re: RfD: Quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-08-03 20:22 +0100
Re: RfD: Quotations Coos Haak <chforth@hccnet.nl> - 2015-08-04 02:10 +0200
Re: RfD: Quotations Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-08-04 08:49 +0100
Re: RfD: Quotations hughaguilar96@gmail.com - 2015-08-01 15:15 -0700
csiph-web