eo
eo copied to clipboard
get rid of "data" attribute in XMIR
Say, this is the code in EO:
[] > foo
42 > a
3.1415926 > b
"hello" > c
It will be translated to XMIR:
<o name="foo">
<o name="a" data="int" base="int">42</o>
<o name="b" data="float" base="float">3.1415926</o>
<o name="c" data="string" base="string">hello, ะดััะณ</o>
</o>
I suggest to get rid of data
attribute and use only bytes inside the element text:
<o name="foo">
<o name="a" base="int">2a</o>
<o name="b" base="float">40-49-0f-da</o>
<o name="ั" base="string">68-65-6c-6c-6f-2c-20-d0-b4-d1-80-d1-83-d0-b3</o>
</o>
Thus, the parser will translate primitive types to bytes.
What are the benefits of this change?
As I see it, this would only make XMIR less human-readable and introduce additional overhead of decoding the bytes for applications that rely on XMIR.
@nikololiahim the main reason is uniformity between implementations. Now, when we keep 3.1415926
in the XMIR, each reader of XMIR can interpret it their own way. Some may think it's float (4 bytes), while others may think it's double (8 bytes). With the proposed changes we get rid of this problem: different interpretations of data.
Ok, I see, but I still think that this change would introduce even more problems than it would solve. Every implementer would come up with their own way to decode the bytes which would spawn even more ambiguity and even bugs.
@nikololiahim each EO2* compiler will have to be integrated into objectionary, in order to become an official one. In order to be integrated there, all tests for all existing EO objects have to pass with this compiler. Thus, we will have no misunderstandings between compilers.
@Graur please, help
@Graur if you can make this top priority, would be great
@andreoss Can you help us with this issue? The budget is 30 minutes
@andreoss this is urgent, would be great if you put it to the highest priority
@yegor256 4 puzzles #1085, #1103, #1110, #1111 are still not solved; solved: #1084, #1086, #1099, #1104.
@yegor256 6 puzzles #1085, #1103, #1111, #1114, #1115, #1116 are still not solved; solved: #1084, #1086, #1099, #1104, #1110.
@yegor256 5 puzzles #1085, #1103, #1111, #1114, #1115 are still not solved; solved: #1084, #1086, #1099, #1104, #1110, #1116.
@yegor256 6 puzzles #1085, #1103, #1111, #1114, #1115, #1144 are still not solved; solved: #1084, #1086, #1099, #1104, #1110, #1116.
@yegor256 5 puzzles #1085, #1103, #1114, #1115, #1144 are still not solved; solved: #1084, #1086, #1099, #1104, #1110, #1111, #1116.
@yegor256 3 puzzles #1085, #1115, #1144 are still not solved; solved: #1084, #1086, #1099, #1103, #1104, #1110, #1111, #1114, #1116.
@yegor256 2 puzzles #1115, #1144 are still not solved; solved: #1084, #1085, #1086, #1099, #1103, #1104, #1110, #1111, #1114, #1116.
@yegor256 the puzzle #1144 is still not solved; solved: #1084, #1085, #1086, #1099, #1103, #1104, #1110, #1111, #1114, #1115, #1116.
this is done, thanks to all
@andreoss Please, check the SolarStaff platform