Documentation suggestions

lotto

New member
May I suggest the following additions/edits to 11l docs?

MODULE RANDOM
  • The doc is missing the seed function. It should be added (especially since it already exists in random.hpp)
BUILT-IN TYPES
  • I feel like it's not explained clearly enough how someone could, for example, declare an empty DefaultDict String -> Int.
    • In Dict it tells you that a dictionary String -> Int is [String = Int], which is fine. but how to make a DefaultDict?​
    • By trial and error you eventually find out you can declare it as DefaultDict[String, Int]​
  • Same applies to Set and Deque.
    • They're declared as Set[type] and Deque[type], respectively
  • On a similar note as the precedent points, it should probably be more clear that:
    • A dictionary can either be declared as Dict[keyType, valueType] or as [keyType = valueType]
    • An array can either be declared as [type] or as Array[type]
    • A tuple can either be declared as (type1, type2, ...) or as Tuple[type1, type2, ...]
F/fn KEYWORD
  • Named-only arguments could use a line of text that explains why "habr_html" is the named only argument (because it's preceded by a ' argument)​
OTHER/UNCATEGORIZED
  • I couldn't find anywhere in the doc where it's explained how to use command-line arguments.
    • By looking on Rosetta Code you find out that :argv exists and that also :start: exists!​

I'm looking forward to hear your opinion on these changes.
Regards.
 

alextretyak

Administrator
Staff member
The doc is missing the seed function. It should be added
Yes, of course.

BUILT-IN TYPES
Ok. I accept this suggestions.

I couldn't find anywhere in the doc where it's explained how to use command-line arguments.
Ok. I added a new section (‘Built-in global variables’).

Named-only arguments could use a line of text that explains
The documentation of 11l was intentionally made a super brief and a little puzzling. Because I believe that when you guess something by yourself, then it will be remembered much better.

So, as you perfectly guessed ‘why "habr_html" is the named only argument (because it's preceded by a ' argument)’, I do not think that extra explanation is required here.
 

lotto

New member
Hey, sorry for bothering again.
May I suggest another edit?
Tuple
...
The elements of tuples consisting of from 2 to 4 elements of the same type can be accessed by x, y, z, w or r, g, b, a.
should be changed to (underlined the change)
Tuple
...
The elements of tuples consisting of from 2 to 4 elements of the same arithmetic type can be accessed by x, y, z, w or r, g, b, a.
It's only a 1 word change, but I feel like it's a good change. This 1 extra word will keep it brief while being more informative.
 
Top