Dear CL folks,
My personal experience trying to learn CL, which I’m guessing many others have felt too, has been feeling “Wow, this seems very different to the languages that I’m used to. But I’m not exactly sure how”. I’ve done most of my coding in Matlab (yes, I’m old) and more recently in Python, but probably people coming from C, Java, etc. may have felt this way too.
For example, today I learned from this forum that CL script doesn’t actually store or update variable values. I was starting to think that was probably the case, but I wasn’t sure.
Given how different CL is from standard procedural programming languages, I think it might be useful to have a page in the online documentation somewhere, laying that out explicitly. I haven’t done functional programming, but I get the impression it’s maybe structured more along those lines?
It might be worth adding a documentation page titled something like
“CL for people who have coded other languages: how it’s different from what you’re probably used to”.
Something like that would help me (and probably many others) a lot. I’m not sure if my guess above is correct that it’s more like functional programming, but if it is, a brief doc note saying “CL is a functional programming language, not a procedural one” probably wouldn’t be enough, because the target audience (e.g. people like me) wouldn’t know what that actually means or what it implies.
For me, the most confusing things have been:
- Trying to figure out how all this stuff about sources and sinks relates to the programming that I’m used to (e.g. functions with arguments and outputs, variable assignments, etc.)
- The fact that CL doesn’t execute a series of commands in order. (Or at least, I don’t think it does, but I’m still not sure about that!)
- The fact that CL doesn’t store variable values, and hence that it can’t update those stored values. (I learned this today, from this forum, after having been puzzled by it for months).
- Probably a bunch of other important stuff too, that I don’t even realise yet that I’m naively assuming will be like normal coding, but that I haven’t tripped up on yet.
My apologies if this post sounds whiny! I love Desmos, and I think CL is a fantastic addition to it. It’s just that when I started trying to learn CL I naively thought to myself “Hey, I know how to code, so this should just be a matter of learning a few new commands and some different syntax”, and boy was I wrong about that.
I also appreciate that writing new documentation is a ton of work. If anyone at Desmos does decide to try to write a new doc page, then I would be more than happy to help in any way I can, e.g. by giving feedback from the perspective of whether it makes sense to a clueless newbie like me!
Raj