improve-getting-started 2023-04-04

Yeah, that was an interesting... comment... and I'm wondering how someone gets to that thinking? (doc comment) says "Ignores body, yields nil" and as a general principle "comments" don't affect code and pretty much everywhere I've seen talk about comment tries to be clear that the contents are ignored -- but you can selectively evaluate those forms into a REPL when you want to. So is there some body of Clojure tutorial or book or something that gives the (incorrect) impression that the content of comment forms get evaluated just by loading the file? Or even evaluating the whole comment form (as opposed to selected contents of it)? I guess we'd need to ask @quentin.leguennec1 directly where they got that impression to see if it's something we can address?

@seancorfield I answered in the thread. About: “So is there some body of Clojure tutorial or book or something that gives the (incorrect) impression that the content of comment forms get evaluated just by loading the file? Or even evaluating the whole comment form (as opposed to selected contents of it)?” Calva can do that for a single form, so I thought it could do that for a whole file. The interpretation error is rather trying to explain a bug in my code that was spawning on file eval.

Ah, thanks. I'll go read the other thread in detail...

Although I must admit, I thought rich comments was a IDE or an editor feature and not exactly comment .

RCFs -- Rich Comment Forms -- are only called that because Rich (Hickey) uses them a lot in his code (I think Stu Halloway coined that "joke") and they are "a IDE or an editor feature" in so much as you can use the IDE/editor to evaluate individual forms that are enclosed in (comment ..) but they don't otherwise get evaluated. That's an interesting lesson for us all in how we talk about common workflows and practices -- distinct from language features... 🤔

1

Call them Hickey comments. Rich is also an adjective, maybe that’s the confusing part 😄

Or just “comment form”

I think that’s the “joke”. It’s affectionate.

I wonder how we can talk about this more clearly... I recently overhauled part of https://clojure-doc.org and mentioned Rich Comment Forms: https://clojure-doc.org/articles/tutorials/getting_started_cli/#interactive-development -- I'd be interested in your feedback on whether that's equally confusing?

I’d say that Rich Comment Forms is pretty nice. They enrich my workflow immensely. It is both a workflow and something that IDE’s support. But good to be aware about the risk for bringing in connotations.

@jr0cket Do your various books etc talk about using (comment ..) in this way for interactive development? Is there some common "lingua franca" we can adopt around this to reduce potential confusion?