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

"dataization" is not explained and confused with "serialization" #73

Open
Chamber6821 opened this issue Apr 19, 2024 · 9 comments
Open

Comments

@Chamber6821
Copy link

Chamber6821 commented Apr 19, 2024

Description of atom dataized explains how will be dataized that decorates something looks like bytes, for example

[] > five
  5 > @
  [] > ignored-attribute

(dataized five).as-bytes > result

result will be equal 00-00-00-00-00-00-00-05

but the description does not explain how object without @ will be dataized, for example:

[] > obj
  1 > one
  2 > two
  3 > tree

(dataized obj).as-bytes > result

What is result equals to?

@maxonfjvipon
Copy link
Member

maxonfjvipon commented Apr 19, 2024

@Chamber6821 it's not really responsibility of object dataized. Dataization is the process of taking Δ attribute from the object. "Taking an attribute" is also called "dynamic dispatch" or "dot notation". Here should be described how it works, and also how decorators work. All possible cases for "taking an attribute from the object" should be there:

  1. attribute is present in the object
  2. attribute is absent, but @ attribute is present
  3. attribute is absent, but object is an atom
  4. attribute is absent and object is not an atom and @ attribute is absent

If there are not, let us know, we'll improve this paper

@yegor256
Copy link
Member

yegor256 commented Apr 20, 2024

@maxonfjvipon @Chamber6821 it seems that "dataization" is confused with "serialization" here. Maybe we should explicitly say in the doc block of the dataized object that it doesn't serialize an object?

@maxonfjvipon
Copy link
Member

@yegor256 what is serialization in terms of EO?

@yegor256
Copy link
Member

@maxonfjvipon there is no such thing in EO, but people get confused since they believe there is.

@Chamber6821
Copy link
Author

@yegor256 yes, I do not understand what difference between dataozation and serialisation and the description or tests does not helping me to understand difference. I think difference between dataization and serialisation should be explain via small tests and description should pay attention to tests.

Now tests does not explain next edge cases:

  1. What happens with objects without @ attribute?
  2. What happens with objects with infinity recursion in definition of @?
  3. What happens with object that decorates object without @?

It is also worth paying attention in the description that dataization is not serialisation and why. Explain main difference between them. Now dataized looks like wrapper that "call" and save obj.as- bytes.

@yegor256
Copy link
Member

@maxonfjvipon maybe we can write a small blog post about the dataized object, with examples?

@maxonfjvipon
Copy link
Member

@yegor256 I think we need a blog post which explains what is dataization at all

@Chamber6821
Copy link
Author

When will I be able to read the post?

@maxonfjvipon
Copy link
Member

@Chamber6821 soon
@yegor256 let's move this ticket to https://github.com/objectionary/news.eolang.org

@objectionary objectionary deleted a comment from github-actions bot Oct 14, 2024
@yegor256 yegor256 transferred this issue from objectionary/eo Oct 14, 2024
@yegor256 yegor256 changed the title Dataization of object without @ attribute "dataization" is not explained and confused with "serialization" Oct 14, 2024
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