Users should be discouraged from creating intermediate symbol values.
In a multi-threaded implementation with a global symbol table, interning symbols will most likely have a locking overhead.
String operations can be implemented much cheaper. Only string comparison (in case of equality) is costly (when compared to symbols).
Users should be discouraged from creating intermediate symbol values.
In a multi-threaded implementation with a global symbol table, interning symbols will most likely have a locking overhead.
String operations can be implemented much cheaper. Only string comparison (in case of equality) is costly (when compared to symbols).
Good point. Draft 1 has only these two procedures that return symbols:
(symbol-append object ...) -> symbol
(symbol-transform string-proc symbol arg ...) -> symbol
and these encourage users to batch up many intermediate operations into a single procedure call.
symbol-append concatenates any number of strings, and things that are converted into strings, and only makes one symbol at the very end.
symbol-transform calls string-proc which does an arbitrarily complex operation on a string.
In general, making new symbols is useful in macros and specialized kinds of I/O, which tend not to be performance sensitive.
Hello Marc. Thank you very much for joining up!
Good point. Draft 1 has only these two procedures that return symbols:
```
(symbol-append object ...) -> symbol
(symbol-transform string-proc symbol arg ...) -> symbol
```
and these encourage users to batch up many intermediate operations into a single procedure call.
* `symbol-append` concatenates any number of strings, and things that are converted into strings, and only makes one symbol at the very end.
* `symbol-transform` calls `string-proc` which does an arbitrarily complex operation on a string.
In general, making new symbols is useful in macros and specialized kinds of I/O, which tend not to be performance sensitive.
Users should be discouraged from creating intermediate symbol values.
In a multi-threaded implementation with a global symbol table, interning symbols will most likely have a locking overhead.
String operations can be implemented much cheaper. Only string comparison (in case of equality) is costly (when compared to symbols).
Hello Marc. Thank you very much for joining up!
Good point. Draft 1 has only these two procedures that return symbols:
and these encourage users to batch up many intermediate operations into a single procedure call.
symbol-append
concatenates any number of strings, and things that are converted into strings, and only makes one symbol at the very end.symbol-transform
callsstring-proc
which does an arbitrarily complex operation on a string.In general, making new symbols is useful in macros and specialized kinds of I/O, which tend not to be performance sensitive.