trueagi-io / hyperon-experimental

MeTTa programming language implementation
https://metta-lang.dev
MIT License
133 stars 44 forks source link

Adding `add-reduct` operation, to merge atoms from a src space into a dst #617

Closed luketpeterson closed 5 months ago

luketpeterson commented 5 months ago

This provides a friendlier way to accomplish the requirements of https://github.com/trueagi-io/hyperon-experimental/issues/592, getting the space access op for the src space to reduce before adding it to the dst space

luketpeterson commented 5 months ago

Upon more reflection, this isn't limited to src spaces. So we could name it something more general like into-space (although that might imply conversion to some people). We could also just call it add Or go back the the original proposal of merge rather than merge-space

What do you think?

vsbogd commented 5 months ago

Yes, it is more general than "merge", may be add-reduced-atom or reduce-and-add-atom?

Necr0x0Der commented 5 months ago

Regarding naming, I definitely agree that this operation should not be called merge even if it is about spaces (we don't merge spaces, but insert one into another). And it is definitely not about spaces only. As for naming, I don't have strong preferences, but I propose add-reduct (which is similar to add-atom and also indicates the difference).