Skip to content
New issue

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

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

Already on GitHub? # to your account

Identity function #1987

Closed
Siskin-Bot opened this issue Feb 15, 2020 · 1 comment
Closed

Identity function #1987

Siskin-Bot opened this issue Feb 15, 2020 · 1 comment
Labels
Type.wish Waiting for future Issues and wishes which are closed, but will be nice to resolve later

Comments

@Siskin-Bot
Copy link
Collaborator

Submitted by: Ladislav

#626 already describes one identity function using unevaluated argument. However, my experience is telling that it is useful to have a similar function with evaluated argument.

identity: func [
    "Returns the value passed to it."
    value [any-type!]
] [
    :value
]

Imported from: CureCode [ Version: r3 master Type: Wish Platform: All Category: Mezzanine Reproduce: Always Fixed-in:none ]
Imported from: metaeducation#1987

Comments:

Rebolbot commented on Mar 7, 2013:

Submitted by: BrianH

It seems like it would be pretty rarely used, mostly as a function value in general transformation operations. Maybe giving it the full name IDENTITY would be more appropriate, both because it would be easier to remember what it does when seeing it in code, and as a Huffman-coding approach to names. If you don't see functions often it can be harder to read the code without having to backtrace or use HELP, so not abbreviating the name can make things easier. ID seems more like the name of a user function or variable.


Rebolbot commented on Mar 7, 2013:

Submitted by: Ladislav

"Maybe giving it the full name IDENTITY would be more appropriate"

I am OK with that


Rebolbot mentioned this issue on Jan 22, 2016:
[Epic] Holes in our evaluation model


Rebolbot added the Type.wish on Jan 12, 2016


@Oldes Oldes added the Waiting for future Issues and wishes which are closed, but will be nice to resolve later label Sep 20, 2021
@Oldes
Copy link
Owner

Oldes commented Sep 20, 2021

I'm closing it, because I cannot imagine why it should be used... In some very rare cases, it is so short, that one can define it in own script.

@Oldes Oldes closed this as completed Sep 20, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Type.wish Waiting for future Issues and wishes which are closed, but will be nice to resolve later
Projects
None yet
Development

No branches or pull requests

2 participants