Skip to content

BODY-OF command! does not give anything interesting #1578

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Siskin-Bot opened this issue Feb 15, 2020 · 0 comments
Closed

BODY-OF command! does not give anything interesting #1578

Siskin-Bot opened this issue Feb 15, 2020 · 0 comments
Labels
CC.resolved Issue with CureCode status built, tested or complete Test.written Type.bug

Comments

@Siskin-Bot
Copy link
Collaborator

Submitted by: meijeru

BODY-OF is defined for all values of type any-function!. In the case of command! values, it yields the same as the get-word. It should, in my opinion, give the actual value of the body as stored in the machine, which is a block containing the extension module in which the command was defined, and the command-index (ordinal of the command, 0-origin).

>> probe body-of :deref
make command! [["Get 32 bits value pointed at" v]]
>> probe :deref
make command! [["Get 32 bits value pointed at" v]]

Imported from: CureCode [ Version: alpha 97 Type: Bug Platform: All Category: Datatype Reproduce: Always Fixed-in:alpha 98 ]
Imported from: metaeducation#1578

Comments:

Rebolbot commented on Apr 26, 2010:

Submitted by: Carl

BODY-OF has no meaning for native functions and should return NONE. Note that commands can also be user-defined functions (to allow interpretation within DELECT command dialects such as remote services, etc.) and in that case should return the same result as a function!.

Retrieval of information such as extension module or index is not the same as body, and if needed, can be returned by some other reflector option.


Rebolbot commented on Apr 26, 2010:

Submitted by: meijeru

I do not agree with your last statement (that a different reflector is needed). The extension module (which contains the RIX pointer) and the command-index, are the nearest you will have to a body. Also, for actions, a number is returned by body-of; or are you proposing to do away with that also?


Rebolbot commented on Apr 26, 2010:

Submitted by: BrianH

Those index numbers aren't the closest thing actions and commands have to a body - that would be the native code, and we don't want to return that. The index numbers are something else, so another reflector would probably be appropriate.


Rebolbot mentioned this issue on Jan 12, 2016:
SPEC-OF the type testing functions contains revealing internal information


Rebolbot added the Type.bug on Jan 12, 2016


@Siskin-Bot Siskin-Bot added the CC.resolved Issue with CureCode status built, tested or complete label May 22, 2020
@Oldes Oldes closed this as completed Jul 13, 2020
Oldes added a commit to Oldes/Rebol3 that referenced this issue Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CC.resolved Issue with CureCode status built, tested or complete Test.written Type.bug
Projects
None yet
Development

No branches or pull requests

2 participants