# Copy Semantics (and should all values be COPY-able ?)

**URL:** <https://revolt.metaeducation.com/forum/t/copy-semantics-and-should-all-values-be-copy-able/2529>\
**Category:** Semantics\
**Created:** [August 14, 2025, 7:59pm UTC](https://revolt.metaeducation.com/forum/t/copy-semantics-and-should-all-values-be-copy-able/2529 "2025-08-14T19:59:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hostilefork](https://revolt.metaeducation.com/forum/user_avatar/revolt.metaeducation.com/hostilefork/32/421_2.png) [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Post date:** [August 14, 2025, 7:59pm UTC](https://revolt.metaeducation.com/forum/t/copy-semantics-and-should-all-values-be-copy-able/2529/1 "2025-08-14T19:59:13Z")

</div>

COPY in Rebol2, R3-Alpha and Red refuse to copy things like integers:

```
rebol2>> copy 1
** Script Error: copy expected value argument of type: series port bitset

r3-alpha>> copy 1
** Script error: copy does not allow integer! for its value argument

 red>> copy 1
 *** Script Error: copy does not allow integer! for its value argument

```

As Rebol2 says, it only copies **[series! port! bitset!]**

Red does **[series! any-object! bitset! map!]**

R3-Alpha does **[series! port! map! object! bitset! any-function!]**, which made me curious as to what exactly copying a function would even be for. [Looking at the R3-Alpha sources](https://github.com/rebol/rebol/blob/25033f897b2bd466068d7663563cd3ff64740b94/src/core/c-function.c#L216), it's just some nonsense that would be applicable only if you were planning to do self-modifying code and mutate the body of a function.

(Revolt once had a mechanic for if you passed a function directly to COPY to create a separate non-hijackable identity. [But see my notes on why that's not done anymore](https://forum.rebol.info/t/hijack-protection-preserve-a-weird-feature/2348).)

## So You Can't Copy Integers... Unless They're In a Block 🤔

You don't get an error copying integers deeply:

```
>> copy:deep [[1] 2 [3 [4] 5]]
== [[1] 2 [3 [4] 5]]

```

Here we are seeing the block being copied deeply... and the integers seem to be "copied".

So you can copy an integer if it's inside a block, but not directly if it's outside a block?
