odin-lang / odin-lang.org

http://odin-lang.org
26 stars 83 forks source link

Improve consistency and clarity of string conversion table in the Overview #231

Open ghost opened 2 months ago

ghost commented 2 months ago

issue The use of the conceptual term st in the string type conversion table https://odin-lang.org/docs/overview/#string-type-conversions may not be consistent.

examples st is used here https://odin-lang.org/docs/overview/#from-rune-to-string as the input to: utf8.runes_to_string(st) st is not used here https://odin-lang.org/docs/overview/#from-u8-and-length-int-to-string as the input to: strings.string_from_ptr(ptr, length)

suggestions for improvement in increasing level of effort for the change

  1. update the second one above to be consistent with the rest of all the tables and use st as the "input string"
  2. (more work) have a a different legend for each "from X to Y"
  3. actually use the types from the source code that the procedure accepts - I think this is the superior choice for clarity and consistency, but is more work. It would not require a flexible term like st that means different things for each conversion procedure listed.