ion-docs icon indicating copy to clipboard operation
ion-docs copied to clipboard

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

Open toddjonker opened this issue 1 year ago • 0 comments

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.

toddjonker avatar Jun 13 '24 17:06 toddjonker