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

Reconsider handling of no-text inputs to `make_string` / `make_symbol` #327

Open toddjonker opened 1 month ago

toddjonker commented 1 month ago

The spec currently states that make_string

Produces a non-null, unannotated string containing the concatenated content produced by the arguments. Nulls and annotations are discarded.

There's still some discussion, eg at https://github.com/amazon-ion/ion-tests/pull/100#discussion_r1630181823

The spec also ignores $0 and absent shared symbols. See also https://github.com/amazon-ion/ion-docs/issues/324

BTW the case that gives me the most pause is with one null, eg (make_symbol null.string) which one might expect to return null.symbol not "". That's fairly useless for E-expression invocation (you could just write the desired null directly), but in templates it enables coercing any string to a symbol.