Re: What is the Result from Invoking this Halt Function?
From: Martin Shobe (mshobe_at_sbcglobal.net)
Date: 08/18/04
- Next message: David C. Ullrich: "Re: What is the Result from Invoking this Halt Function?"
- Previous message: Martin Shobe: "Re: What is the Result from Invoking this Halt Function?"
- In reply to: Marc Goodman: "Re: What is the Result from Invoking this Halt Function?"
- Next in thread: Marc Goodman: "Re: What is the Result from Invoking this Halt Function?"
- Reply: Marc Goodman: "Re: What is the Result from Invoking this Halt Function?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 18 Aug 2004 11:52:41 GMT
On Wed, 18 Aug 2004 04:41:59 GMT, Marc Goodman
<marc.goodman@comcast.net> wrote:
>Joe Hendrix wrote:
>> You are redefining your claim. You claimed that code proved that
>> reflection was possible in standard C (by reflection I mean the ability
>> of a program to inspect it's own code at runtime). I merely pointed out
>> that your example was not Standard C, so it is not a counterexample.
>
>You're exactly right. The point I was missing was that Standard C
>is different from standard C. For me, "standard C" is whatever
>compiles with a standard C compiler like gcc and runs on a
>standard computer like a PC with Linux. "Standard C," on the
>other hand, refers to a programming language standard as spec'ed
>out by a standards organization and is an entirely different
>kettle of fish.
>
>I acknowledge that you are probably right that there is no method
>in "Standard C" to cast a function pointer to an int pointer and
>to dereference that pointer. Please take me the last little way
>to the end and cite a URL that states this is forbidden/illegal/etc.
>I ask this not because I disagree with your point but because
>I would like the opportunity to educate myself.
It's not forbidden. It's undefined. The compiler can *technically*
do *anything* with it and still meet the standard. That includes the
reasonable things like not compiling it, or what your compiler did, to
the unreasonable, like reformatting your hard drive.
>
>> Obviously, there are languages that support reflection (Java, Lisp,
>> Prolog, plus many more), but I suspect that Standard C is not one of
>> them and in fact was intentionally designed not to support reflection.
>>
>> Since any programming language I know supporting reflection is provably
>> Turing complete (ignoring resource limits), I don't think this affects
>> the halting problem, but that's not really a subject I'm going to post
>> anything (else) about.
>
>I agree completely with the last statement. Since it can be implemented
>in _non_ standard C, you either have to argue that a PC running gcc and
>linux is more powerful than a Turing Machine (which is clearly wrong)
>or that adding reflection does not increase the computational power
>of the model.
And the answer is, it doesn't increase the computational power of the
model. You can compute the same things by providing that information
as input.
Martin
- Next message: David C. Ullrich: "Re: What is the Result from Invoking this Halt Function?"
- Previous message: Martin Shobe: "Re: What is the Result from Invoking this Halt Function?"
- In reply to: Marc Goodman: "Re: What is the Result from Invoking this Halt Function?"
- Next in thread: Marc Goodman: "Re: What is the Result from Invoking this Halt Function?"
- Reply: Marc Goodman: "Re: What is the Result from Invoking this Halt Function?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|