amazon-ion / ion-docs

Source for the GitHub Pages for Ion.
https://amazon-ion.github.io/ion-docs/
Apache License 2.0
22 stars 22 forks source link

Define policy for handling `$0` and absent shared symbols in `$ion_encoding` and modules. #324

Open toddjonker opened 1 month ago

toddjonker commented 1 month ago

As @zslayton pointed out recently, we generally remember to define handling of null.symbol where symbols are allowed, but the other abnormal values $0 and absent shared symbols are generally (if not universally) overlooked by the specification.

I think the 1.0 spec sidesteps the problem by (a) forcing symbols meaningful to the decoder to be encoded using the system symbol table, and (b) not using symbols in other parts of directives. But 1.1 has much more exposure to such things.

Ideally, we would have a simple, global policy, along the lines of "Any symbols with unknown symbols signal an error when encountered within a directive or module definition." But I'm not immediately sure that's desirable as stated.

Here's some relevant contexts: