Talk:Sort the letters of string in alphabetical order: Difference between revisions

Line 79:
:# But... when you say <i>it would be helpful to specify what to do with any characters encountered that ''aren't'' in the input string</i> -- what do you mean? If the characters are not in the input string, how would they be encountered??
:--[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 19:32, 12 August 2022 (UTC)
 
::Maybe I'm just reading too strictly, but the wording of the task encourages my confusion..
::# As I read it, it asks for characters "natural to the language". ASCII is certainly not "natural", EBCDIC perhaps even less-so. Both are machine constructs, not language constructs, so it seemed to me like the task-writer might have had something else in mind.
::# If this is just another pointless variation of "rewrite a sort algorithm" then still same request: please clarify/formalize the specification, provide an example, etc. There are hints that the task-writer might have been attempting to convey the use of a natural-language-specific collated sort.
::# It's a question of domain, and how to handle values outside the domain. Let's assume the task-author agrees to provide sample input/output strings in order to demonstrate the intended collation sequence, but still allows implementations to choose their OWN input strings, natural to their language (as is currently the case). If, hypothetically, the task-author failed to include/demonstrate the sorting of punctuation, then how should an implementation handle punctuation characters if encountered? Either that, or require the use of the example input, and accept only the example output. (eliminating free choice input entirely, so that the domain of characters is predetermined)
::If the task-writer merely wants characters of a string sorted by whatever machine-collation (whether ASCII, EBCDIC or other) happens to be in effect, then I'd recommend the task be written in simpler terms, so as not to suggest that something more might have been intended.
Anonymous user