# Semantics

**URL:** https://revolt.metaeducation.com/forum/c/development/semantics/55.md?page=1

[Latest](https://revolt.metaeducation.com/forum/latest.md) · [Categories](https://revolt.metaeducation.com/forum/categories.md) · [Tags](https://revolt.metaeducation.com/forum/tags.md)

**Page:** 2

---

## [VOID Branches (not branches that evaluate to void)](https://revolt.metaeducation.com/forum/t/void-branches-not-branches-that-evaluate-to-void/2176)

<div class="topic-metadata">

**Author:** [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Replies:** 0\
**Last updated:** [March 28, 2024, 1:07pm UTC](https://revolt.metaeducation.com/forum/t/void-branches-not-branches-that-evaluate-to-void/2176 "2024-03-28T13:07:17Z")

</div>

I've mentioned before that AUGMENT can be used to implement the legacy SWITCH/DEFAULT behavior. But looking at what seems like the "correct" formulation of that code today, we get: switch-d: enclose (augment switch/ \[ …

---

## [Packs-With-Nulls in The First Slot](https://revolt.metaeducation.com/forum/t/packs-with-nulls-in-the-first-slot/2435)

<div class="topic-metadata">

**Author:** [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Replies:** 0\
**Last updated:** [May 5, 2025, 10:58am UTC](https://revolt.metaeducation.com/forum/t/packs-with-nulls-in-the-first-slot/2435 "2025-05-05T10:58:36Z")

</div>

Antiform packs that contain nulls, e.g. the "heavy null" ~(~null~)~, are a cornerstone of how Revolt handles the situation of a branch that returns null... to avoid having such branches run, and then pass control to an E…

---

## [Strict Equality, Lax Equality, Equivalence, Sameness](https://revolt.metaeducation.com/forum/t/strict-equality-lax-equality-equivalence-sameness/349)

<div class="topic-metadata">

**Author:** [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Replies:** 2\
**Last updated:** [March 22, 2025, 6:05pm UTC](https://revolt.metaeducation.com/forum/t/strict-equality-lax-equality-equivalence-sameness/349 "2025-03-22T18:05:27Z")

</div>

Rebol has historically had a lot of trouble with questions of equality, and various hierarchies of it. It got deep into the weeds: the idea of EQUIV? even came up, which was to check to see if two blocks of code weren't…

---

## [Comparison Semantics](https://revolt.metaeducation.com/forum/t/comparison-semantics/1318)

<div class="topic-metadata">

**Author:** [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Replies:** 5\
**Last updated:** [March 15, 2025, 7:27pm UTC](https://revolt.metaeducation.com/forum/t/comparison-semantics/1318 "2025-03-15T19:27:45Z")

</div>

I mentioned that there were historical ways to overflow the C stack besides the evaluator. Anything that uses C recursion could be a problem...so the internals of copying, molding, and comparison were some examples of t…

---

## [Multiply-Unpacking Multi-Returns](https://revolt.metaeducation.com/forum/t/multiply-unpacking-multi-returns/2367)

<div class="topic-metadata">

**Author:** [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Replies:** 0\
**Last updated:** [March 6, 2025, 8:56pm UTC](https://revolt.metaeducation.com/forum/t/multiply-unpacking-multi-returns/2367 "2025-03-06T20:56:40Z")

</div>

I haven't really figured out my philosophy about putting multi-returns in multi-returns. Looking at the question just in terms of fundamentals...should this be legal? \>\> x: pack \[pack \[1 2\] 3\] == 1 ; double-decay? An…

---

## [The Semantics of JOIN](https://revolt.metaeducation.com/forum/t/the-semantics-of-join/2333)

<div class="topic-metadata">

**Author:** [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Replies:** 0\
**Last updated:** [November 16, 2024, 6:33pm UTC](https://revolt.metaeducation.com/forum/t/the-semantics-of-join/2333 "2024-11-16T18:33:29Z")

</div>

As @Brett's critique of yesteryear pointed out, REJOIN sucked. If naming were consistent, you might think from this pattern: append a reduce b \<=\> repend a b ...that the following would have been true: join a reduce …

---

## [MOLD and LOAD parity](https://revolt.metaeducation.com/forum/t/mold-and-load-parity/1429)

<div class="topic-metadata">

**Author:** [@rgchris](https://revolt.metaeducation.com/forum/u/rgchris)\
**Replies:** 4\
**Last updated:** [January 19, 2024, 1:54pm UTC](https://revolt.metaeducation.com/forum/t/mold-and-load-parity/1429 "2024-01-19T13:54:38Z")

</div>

It occurred to me in this post that MOLD/ONLY appears to work at odds to other /ONLY options: \>\> append \[\] \[\] == \[\] ‌\>\> append/only \[\] \[\] == \[\[\]\] ‌\>\> mold \[\] == "\[\]" ‌\>\> mold/only \[\] == "" As my solution to /ONLY is…

---

## [Bitten By Right Side Evaluation First](https://revolt.metaeducation.com/forum/t/bitten-by-right-side-evaluation-first/2301)

<div class="topic-metadata">

**Author:** [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Replies:** 2\
**Last updated:** [September 29, 2024, 1:53am UTC](https://revolt.metaeducation.com/forum/t/bitten-by-right-side-evaluation-first/2301 "2024-09-29T01:53:25Z")

</div>

I was writing some code like this: while \[not tail? info\] \[ if find leaders info.1.name \[ leader-protos.(info.1.name): take info \] else \[ info: next info \] \] Due to the post title you probab…

---

## [The Meaning of the FORM String Operation](https://revolt.metaeducation.com/forum/t/the-meaning-of-the-form-string-operation/2288)

<div class="topic-metadata">

**Author:** [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Replies:** 1\
**Last updated:** [September 20, 2024, 10:35am UTC](https://revolt.metaeducation.com/forum/t/the-meaning-of-the-form-string-operation/2288 "2024-09-20T10:35:28Z")

</div>

So FORM's vague job is to give a "human readable representation" of the data it's given. So for TEXT!, it gives you a representation of the string without delimiters--in contrast to MOLD, which gives you the delimiters: …

---

## [BLOCK! Behavior In DELIMIT (hence SPACED, UNSPACED, PRINT)](https://revolt.metaeducation.com/forum/t/block-behavior-in-delimit-hence-spaced-unspaced-print/1642)

<div class="topic-metadata">

**Author:** [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Replies:** 2\
**Last updated:** [September 19, 2024, 3:47pm UTC](https://revolt.metaeducation.com/forum/t/block-behavior-in-delimit-hence-spaced-unspaced-print/1642 "2024-09-19T15:47:59Z")

</div>

Because I've thought of Redbols as targeting being a kind of "user friendly" and intuitive language, I was long bent out of shape about how junky things like PRINT and REJOIN were. If your "Hello World" level programs a…

---

## [Make REPLACE/ALL Default Semantics of REPLACE?](https://revolt.metaeducation.com/forum/t/make-replace-all-default-semantics-of-replace/2269)

<div class="topic-metadata">

**Author:** [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Replies:** 2\
**Last updated:** [September 13, 2024, 7:06am UTC](https://revolt.metaeducation.com/forum/t/make-replace-all-default-semantics-of-replace/2269 "2024-09-13T07:06:24Z")

</div>

Pretty much every time I use REPLACE, I mean REPLACE/ALL. But I get bitten because I forget the /ALL. \>\> string: "I am pretty sure I feel like I usually want to REPLACE/ALL" \>\> replace string "I" "You" == "You am pret…

---

## [UNION, INTERSECT, DIFFERENCE...and Splices](https://revolt.metaeducation.com/forum/t/union-intersect-difference-and-splices/2058)

<div class="topic-metadata">

**Author:** [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Replies:** 1\
**Last updated:** [October 22, 2023, 8:31am UTC](https://revolt.metaeducation.com/forum/t/union-intersect-difference-and-splices/2058 "2023-10-22T08:31:27Z")

</div>

There is a pattern that comes up a lot in Query which looks like this: if not find qe.clause-list 'update \[append qe.clause-list 'update\] You could use an operation like UNION here, but since UNION only works on arrays…

---

## [FIND (and PARSE) Behavior on Empty Series](https://revolt.metaeducation.com/forum/t/find-and-parse-behavior-on-empty-series/1628)

<div class="topic-metadata">

**Author:** [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Replies:** 0\
**Last updated:** [June 20, 2021, 3:49pm UTC](https://revolt.metaeducation.com/forum/t/find-and-parse-behavior-on-empty-series/1628 "2021-06-20T15:49:19Z")

</div>

Historically searching for empty series in a series would fail: rebol2\>\> find "abc" "" == none This seems inconsistent with what it would seem you would want, e.g. in PARSE when a string is empty: \>\> parse "abc" \["" "…

---

## [SPLIT Semantics](https://revolt.metaeducation.com/forum/t/split-semantics/1998)

<div class="topic-metadata">

**Author:** [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Replies:** 0\
**Last updated:** [December 22, 2022, 4:04am UTC](https://revolt.metaeducation.com/forum/t/split-semantics/1998 "2022-12-22T04:04:52Z")

</div>

On Red Gitter, it was discussed "which of the following is 'correct'": Red\> split "" "," == \[""\] R3\> split "" "," == \[\] Rebolek thinks R3 is right. Boris says: I don't think there's a correct answer, just choices. …

---

## [Attack of the Activated Actions](https://revolt.metaeducation.com/forum/t/attack-of-the-activated-actions/1900)

<div class="topic-metadata">

**Author:** [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Replies:** 4\
**Last updated:** [September 21, 2022, 4:49am UTC](https://revolt.metaeducation.com/forum/t/attack-of-the-activated-actions/1900 "2022-09-21T04:49:23Z")

</div>

Here's something seemingly-simple that a newcomer to Redbol might attempt: TASK: Write a function TWOSIE? that... returns true if a value is the INTEGER! of 2, or a BLOCK! of length 2 returns false otherwise twosi…

---

## [Revisiting TO and THRU](https://revolt.metaeducation.com/forum/t/revisiting-to-and-thru/1961)

<div class="topic-metadata">

**Author:** [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Replies:** 5\
**Last updated:** [September 7, 2022, 3:58pm UTC](https://revolt.metaeducation.com/forum/t/revisiting-to-and-thru/1961 "2022-09-07T15:58:28Z")

</div>

If you asked someone to count "from 1 to 10", how many people would stop at 9? I'd say most wouldn't. So if you wrote: for x \[1 to 10\] \[print \[x\]\] What should that do? I think if you showed it to people they would e…

---

## [Should MAP-EACH Always Return A Block?](https://revolt.metaeducation.com/forum/t/should-map-each-always-return-a-block/1155)

<div class="topic-metadata">

**Author:** [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Replies:** 2\
**Last updated:** [August 27, 2019, 7:31pm UTC](https://revolt.metaeducation.com/forum/t/should-map-each-always-return-a-block/1155 "2019-08-27T19:31:52Z")

</div>

I was trying to do something in JavaScript, going character by character and replacing text in a string. JS strings are immutable so it was kind of annoying. It made me wish to be able to do a MAP-EACH on a TEXT! and h…

---

## [FIND and SELECT polymorphism](https://revolt.metaeducation.com/forum/t/find-and-select-polymorphism/1879)

<div class="topic-metadata">

**Author:** [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Replies:** 0\
**Last updated:** [July 14, 2022, 2:21am UTC](https://revolt.metaeducation.com/forum/t/find-and-select-polymorphism/1879 "2022-07-14T02:21:39Z")

</div>

In Rebol2, you can run FIND on OBJECT! as well as on BLOCK!: rebol2\>\> obj: make object! \[a: 10 b: 20\] rebol2\>\> find obj 'a == true rebol2\>\> find obj 'asdf == false I'll point out that Red does not support FIND on OBJ…

---

## [Pushing the Potential of Polyglot Polymorphic DO](https://revolt.metaeducation.com/forum/t/pushing-the-potential-of-polyglot-polymorphic-do/1846)

<div class="topic-metadata">

**Author:** [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Replies:** 1\
**Last updated:** [June 25, 2022, 2:24pm UTC](https://revolt.metaeducation.com/forum/t/pushing-the-potential-of-polyglot-polymorphic-do/1846 "2022-06-25T14:24:05Z")

</div>

The brevity of DO is a strength that makes it seem natural to be polymorphic. I thought it was very wasteful that when Rebol2 and Red's DO saw something it didn't recognize, it would just drop out: rebol2\>\> do 1020 == …

---

## ["Destructuring" in FOR-EACH](https://revolt.metaeducation.com/forum/t/destructuring-in-for-each/1738)

<div class="topic-metadata">

**Author:** [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Replies:** 1\
**Last updated:** [October 5, 2021, 7:04pm UTC](https://revolt.metaeducation.com/forum/t/destructuring-in-for-each/1738 "2021-10-05T19:04:32Z")

</div>

@gchiu wrote some code that made a list of drugs and filenames related to those drugs: drugs: \[ \["Benzbromarone" "SA1537.pdf"\] \["Teriparatide" "SA1139.pdf"\] \["Adalimumab" "SA1847.pdf"\] \["Etanercept"…

---

## [UPARSE needs BREAK, REJECT, ACCEPT... But What Are They?](https://revolt.metaeducation.com/forum/t/uparse-needs-break-reject-accept-but-what-are-they/1650)

<div class="topic-metadata">

**Author:** [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Replies:** 1\
**Last updated:** [August 8, 2021, 4:09am UTC](https://revolt.metaeducation.com/forum/t/uparse-needs-break-reject-accept-but-what-are-they/1650 "2021-08-08T04:09:58Z")

</div>

When something doesn't sit right in my head, I notice. Like how I could never remember in the beginning what GET-WORD! or SET-WORD! in PARSE did. (e.g. is a GET-WORD! GET-ing the parse position to SET a variable, or GE…

---

## [TRIM on BINARY!](https://revolt.metaeducation.com/forum/t/trim-on-binary/1490)

<div class="topic-metadata">

**Author:** [@rgchris](https://revolt.metaeducation.com/forum/u/rgchris)\
**Replies:** 3\
**Last updated:** [February 6, 2021, 12:16pm UTC](https://revolt.metaeducation.com/forum/t/trim-on-binary/1490 "2021-02-06T12:16:02Z")

</div>

What should one expect when trying TRIM on a binary value. I see right off the bat that it doesn't have any effect: test: #{2046206F0A6F200A20} equal? test trim copy test Ah, well—that's too bad. This is at odds with t…

---

## [Where the Series Ends: Simplifying Out of Bounds Rules](https://revolt.metaeducation.com/forum/t/where-the-series-ends-simplifying-out-of-bounds-rules/1141)

<div class="topic-metadata">

**Author:** [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Replies:** 3\
**Last updated:** [October 22, 2020, 9:31pm UTC](https://revolt.metaeducation.com/forum/t/where-the-series-ends-simplifying-out-of-bounds-rules/1141 "2020-10-22T21:31:54Z")

</div>

Most languages with arrays have you keep the index separate. Languages that do something fancier typically abstract the process into "iterators"...which may be more complicated than simple integers. But Rebol made a st…

---

## [Hacking away on the TO and MAKE Matrix](https://revolt.metaeducation.com/forum/t/hacking-away-on-the-to-and-make-matrix/649)

<div class="topic-metadata">

**Author:** [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Replies:** 1\
**Last updated:** [May 29, 2018, 9:33pm UTC](https://revolt.metaeducation.com/forum/t/hacking-away-on-the-to-and-make-matrix/649 "2018-05-29T21:33:34Z")

</div>

The expanded behavior of AS is unambiguous and reassuring. All you have to remember is that no new series is allocated. What you'll get is what you had: \>\> first \<abc\> == #"a" \>\> t: as text! \<abc\> == "abc" \>\> first …

---

## [Negative indexing as Rebol2/Red compatible... just do it?](https://revolt.metaeducation.com/forum/t/negative-indexing-as-rebol2-red-compatible-just-do-it/576)

<div class="topic-metadata">

**Author:** [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Replies:** 3\
**Last updated:** [March 30, 2018, 4:58pm UTC](https://revolt.metaeducation.com/forum/t/negative-indexing-as-rebol2-red-compatible-just-do-it/576 "2018-03-30T16:58:16Z")

</div>

Rebol2/Red: \>\> pick next \[a b\] 1 == b \>\> pick next \[a b\] 0 == none ;-- Red proposes error, which was also the revised R3-Alpha proposal \>\> pick next \[a b\] -1 == a R3-Alpha: \>\> pick next \[a b\] 1 == b \>\> pick next \[a…

---

## [Make COMPRESS/DECOMPRESS default to gzip](https://revolt.metaeducation.com/forum/t/make-compress-decompress-default-to-gzip/237)

<div class="topic-metadata">

**Author:** [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Replies:** 7\
**Last updated:** [August 4, 2017, 12:39pm UTC](https://revolt.metaeducation.com/forum/t/make-compress-decompress-default-to-gzip/237 "2017-08-04T12:39:30Z")

</div>

The "deflate" algorithm is pretty much the gold standard for lossless compression of generic data. However, it is very bare bones. Among things that are left up to the container format is whether the container wants to…

[Previous page](https://revolt.metaeducation.com/forum/c/development/semantics/55.md)
