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

Re: Obj.list_tag, Obj.tuple_tag, Obj.record_tag, Obj.array_tag (PR#2848) #2849

Closed
vicuna opened this issue Jun 24, 2004 · 1 comment
Closed

Comments

@vicuna
Copy link

vicuna commented Jun 24, 2004

Original bug ID: 2849
Reporter: administrator
Status: closed
Resolution: won't fix
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)

Bug description

From: sjah@land.ru

Feature wish:
Add at least
Obj.list_tag,
Obj.tuple_tag,
Obj.record_tag,
Obj.array_tag
it allow to write semi-normal 'a value printer.

What about
list_tag = 0
tuple_tag = 0
record_tag = 0
array_tag = 0
It allows for a very compact representation...

In ideal, it is better to tag values with unique type tags
(32bit tag value) and have a table with type descriptions
(field names for records and so on).

Supposedly, strong typing allows to use a more compact data
representation. You are simply suggesting to revert to a descriptive
dynamically typed representation. This is only going to be useful for
some very specific applications, but would be costly in all other
cases.

Note that the debugger is already able to use type information to
correctly print values.

Jacques

P.S. On the other hand, it might be nice to have the ability to add a
custom field to records, just as we already have for external data
structures. This would allow to introduce values with custom ordering,
serialization, and eventually printing.
Unfortunately, the way to declare them seems not so simple...

@vicuna
Copy link
Author

vicuna commented Jun 24, 2004

Comment author: administrator

see also #2848

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant