Replies: 2 comments 3 replies
-
Looking over the language/operators page, it does seem like a bit of an info dump up top, with the useful examples buried down below. There might be some advantage in trying to list which operators a new user might really want to see documentation for, (perhaps a synopsis section with some exemplar operators worked through?). I note that some things on that page, it wouldn't normally occur to us to think of as operators, e.g. using curly braces to create a Hash or a Block. That feels more like a language syntax feature than an operator... |
Beta Was this translation helpful? Give feedback.
-
I really like this idea overall, but I'd like to take it even further. Right now, docs.raku.org/reference lists around 47 pages and separates them into just two categories: "Fundamental topics" and "General reference". Looking at "Fundamental topics", there's a huge disparity between just how "fundamental" some of the topics are. For example Control flow is genuinely fundamental to reading/writing Raku. Conversely, the MOP or Raku's newline handling are … much less fundamental. What I'd like to see is for the /reference section to be split into several different categories and to have just a few pages in a "Fundamental topics" category – those pages that a new Rakoon really ought to read to grasp Raku's fundamentals. I'm bringing this up because one of the Operators pages you propose sounds like it'd fit in that narrower version of "Fundamental topics" and the other one wouldn't. If we reorganized along those lines, then I'd really like the idea of having two Operators pages – basically, a "Operators fundamentals" and an "Advanced operators". But I'm less sold on the idea of having two pages if they're both classified as "Fundamental topics" (not opposed; just less sold – maybe we could pick a name that made the distinction clear). What do others think about idea of reorganizing /reference into different sub-categories with the goal of getting the list of "fundamental topics" down to a manageable size? |
Beta Was this translation helpful? Give feedback.
-
Hello,
since operators are one of my favorite topics (and also a topic that involves many misunderstandings and documentation issues), I decided to open this brainstorming session about possible directions to rework documentation involving operators.
Quick disclaimer: when I use the word "productive", I usually mean the linguistic sense: the ability to create previously undefined concepts (here, apparent operators) via regular deduction.
Issues and challenges so far
To get the hang of it, I went through all open issues in the repo, to collect some thoughts. I'm adding a little "tldr" to all of them.
#4160 ->
how do we relate to the "decont operator" that isn't even standalone syntax, just a mental framework?
#4058 ->
what can/should we say about _intermediary_ computation in an expression? how to glue it to the evaluation model?
#4073 ->
how to better distinguish the two identically-looking assignments that otherwise can have different properties?
#2861 ->
how to improve the op= situation (and also the meta-operator situation) so that these synthetic operators will be easier to look up and understand?
#2337 ->
how to define and categorize operators and related content; productivity and custom definition concerns
#2129 ->
bring in identity value as a systematically described aspect of all operators
#1730 ->
customizability of user-defined operators
#4033 ->
what can/should we say about the underlying behavior of core operators; how can we establish better communication than "not a real operator"?
The following issues are also "operator issues" but I think they are merely content issues; nothing systemic about them:
#4326
#4133
#4077 (this is about hyper meta-operators which can still be tough stuff...)
#3839
#3815
#3756 (is this even an operator, but anyway)
#3333 (I think
.=
as an intersection of two special situations will require some attention actually)#3346
#3189
#3037
My ideas
Right now, operators mostly reside in a big monolith at https://docs.raku.org/language/operators. I would like to break this page into two:
language/operators
would mostly become a guide to Raku operators, talking about several aspects (associativity, infix/prefix/etc. positions, thunkiness, meta-operators/productivity, underlying behavior, etc.) It would contain rationale for "methodoperators" and "thunkiness" at the very least. To remove the big table and list of operators, we could consider URI redirects (using the #component as well for distinguishing, if that's possible), or we could keep that part of the site, preferably moving it out of the way, at the end of the page.The other part would have a better place under Type in my opinion, but if that's unwelcome (since these are not literal "types"), it could still be a separate thing under Language. It would have roughly the same operators that are listed currently but with much more qualitative information for each: again, associativity, thunkiness, composability with meta-operators, underlying behavior, precedence level and whatnot. Of course, then the really good thing would be to optionally also provide qualitative information about operators in a huge table that can be at least ordered - but let's say, that's a big wish for now.
The point is, separate the "guide" purpose and the "reference" purpose and make them grow in their logical ways (the "guide" deserves definitions, examples and rationale about certain concepts; the "reference" needs accurate, "measurable" information easily accessible).
Beta Was this translation helpful? Give feedback.
All reactions