What style should the script be? #6
Replies: 2 comments 1 reply
-
Another possibility might be to defer any substantial “step” documentation to the function it calls. I’m guessing that simple steps will be inline and complicated ones will call a function, and we could put docs in that fucntion.
|
Beta Was this translation helpful? Give feedback.
-
This conversation makes me want to approach #4 as "embed a script within a document". It'd be pretty magical to be able to basically write a readme file / checklist in prose and then have a script extract the automation from that. However, I do think that comments that can be extracted would be good enough. I like the function comment approach! |
Beta Was this translation helpful? Give feedback.
-
Trying to figure out how to most clearly mix script and doc.
Which style would be better?
i.e. what I presently implemented, or…
Something more function based:
and then execute things in order.
The former seems to me to be more compact and clear, but separates out order and implementation details. The later allow you to focus on implementation details at the expense of a compact expression of the code (but…that could be given with
./my-process -doc
to extract a summary).Also, the former is probably easier to express loops and conditionals (which I’m not going to initially support, but hope to eventually).
So, I’m leaning towards that.
Beta Was this translation helpful? Give feedback.
All reactions