OMIT vs ELIDE vs. VANISH

Just a thought: maybe OMIT
Then you'd have EMIT and OMIT.

(and perhaps a more plain-speech keyword could be: DROP)

1 Like

It's one letter shorter. And a word more people know. But it is close to EMIT.

I personally find the word ELIDE more pleasing for some reason, but maybe I'm just weird. Is OMIT better?

I use DROP in a rather specific way--to mean "remove an element" (e.g. from a stack) but don't do anything with the result. So DROP is like ELIDE POP in my world.

The GHOST! antiform has been renamed (hopefully for the last time) as the VOID! antiform, and hence GHOST can be the arity-0 comment that returns VOID.

In looking at the definitions of things, you wind up with expressions like:

ghost: vanishable does [~,~]

There's lots of different words in play here, and it's kind of nice to have a mixture.

For instance, consider if that wasn't VANISHABLE but GHOSTABLE:

ghost: ghostable does []

Doesn't read quite as well. And also, GHOSTLY is a function that makes either VOID or HEAVY VOID disappar. We can start losing track in our heads "wait, was GHOSTLY the thing that modified functions?"

ghost: ghostly does []  ; OOPS, wrong thing

So I think there's an active benefit to splitting up the terminology space.

For some of that "splitting up the space" reasoning, I don't love VANISH as the name for "take parameter evaluatively, but discard it":

vanish: vanishable lambda [discarded] []

vanish-if-even: vanishable lambda [x] [if not even? x [x]]

To me, this works better with ELIDE:

elide: vanishable lambda [discarded] []

elide-if-even: vanishable lambda [x] [if not even? x [x]]

You can't really turn ELIDE into the function modifier:

vanish: elidable lambda [discarded] []

vanish-if-even: elideable lambda [x] [if not even? x [x]]

Playing around with the combinatorics, I kind of like things how they are.

Something about ELIDE makes me feel like the subtlety of "do the thing, but drop the result" is more easily carried by it.

OMIT makes me think it didn't do the thing at all:

>> 1 + 2 omit print "I might imagine this"
== 3  ; didn't print

It does require people to learn what may be a "new" word for some. But ELIDE is used in programming several places.

We Actually CAN Implement That OMIT Semantic

This is actually possible, with REFRAMER.

e.g. we can gather all the arguments to a function, get passed the FRAME! that's built, but not do anything with it... and then vanish.

>> omit: vanishable reframer lambda [f [frame!]] []

>> 1 + 2 omit print "We can actually implement OMIT"
== 3

You can't stop the argument evaluation from having any side effects. But you can stop the function from running its implementation.

>> n: 1000
>> data: [a b c]

>> 1 + 2 omit append data (n: n + 20)
== 3

>> data
== [a b c]  ; stopped the APPEND

>> n
== 1020  ; didn't stop the addition/assignment

How useful is something like that? :thinking:

Can't say I've ever thought I needed it. But now that it's on my radar maybe I'll notice a place where it could be used.

Anyway, for some reason ELIDE has successfully implanted in my brain as the "right" word for what ELIDE does. And I think I'm happy with it, even if it's "weird".

But maybe this requires some market research or testing to see if VANISH or OMIT gets overwhelmingly higher marks from users.

(Insert mandatory: "or if people don't like it, they can always change it!" here)