Skip to content
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

Rename "active" and "passive" data/element segments. #1471

Closed
majaha opened this issue Jan 30, 2023 · 2 comments
Closed

Rename "active" and "passive" data/element segments. #1471

majaha opened this issue Jan 30, 2023 · 2 comments

Comments

@majaha
Copy link

majaha commented Jan 30, 2023

The Bulk memory operations proposal introduces the concept of "active" and "passive" data segments, which are copied in either on instantiation, or on request when a memory.init instruction is executed.

I contend that the names "active data segment" and "passive data segment" are ambiguous and confusing, and suggest they be renamed.

Consider that an "active" segment is one which is loaded passively. And a "passive" segment is one which must be loaded actively. On the other hand, an "active" segment is one which actively loads itself during instantiation, and a "passive" segment is one which passively refuses to load itself during instantiation. Either word can be used to describe either kind of segment, they switch depending on your perspective. So the words don't actually carry any information, you can't know which is which without looking it up in the spec.

Here's an analogy:
Let's say I own an apple orchard 🍎, and I purchase the newest top-of-the-line apple picking humanoid robot 🤖. It's fair to describe the robot as both:

  • Active: The robot walks around, actively picking apples.
  • Passive: The robot passively picks apples while I have my feet up on a barrel sipping cider.

This is a general issue with the words "active" and "passive" in that what they mean depends on whose perspective you are thinking from, and so they're bad choices for single-word descriptors like this: different people will land on the different mental perspectives randomly and will come to understand the terms oppositely to one another.

This also applies to the "active"/"passive" modes of element segments from the Reference Types proposal too.

For alternative names for the modes, I would suggest something along the lines of "autoload" and "loadable". You already know which one is which 😉.

@rossberg
Copy link
Member

An active segment is one that "does" something. I'm afraid I don't follow how this could be interpreted inversely.

In any case, for better or worse, I would consider this established terminology at this point, and changing it now would cause more confusion than it would help.

@tlively
Copy link
Member

tlively commented Jan 30, 2023

I sympathize with the confusion, but I agree that this is established terminology at this point. The trick is to remember that the adjectives describe the segment itself and not the user of the segment.

@majaha majaha closed this as completed Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants