I'm curious about your choice of using comments, was there an advantage to using this approach over something like decorators?
As it is currently, commments are often a bit weird to debug / view (grayed out) I'm sure there's some advantages to using them here, just thought I'd ask.
Thank you for taking a look at it! Great question!
Funnily enough, we actually pursued this approach initially for the same reasoning you provided. I absolutely agree with your point regarding highlighting. However, we pivoted to using purely comments after several realizations:
1. Artemis can be used in contexts beyond simply decoration. For instance, if you want to create a documentation card whose sole purpose is to display some Markdown, LaTeX, or Multimedia, there isn't really something to decorate.
2. By making ourselves comment-based, it ensures that it won't throw off any IDEs or linters, and it ensures that these commands will have absolutely no impact on production code when ran without our command-line utility.
3. If you force the user to use a decorator, it restricts the user to only being able to create inputs or outputs for a particular variable right above that line of code. TLDR; it gives the user more freedom to organize their code
however they'd like.
4. It lets us allow users to use our special comments to output more than just simple variables. For instance, if a user wrote "@output table data=<<np.arange(5)>>", this would display a table of np.arange(5). However, if we forced users to use decorators, this would prevent functionality like this, which can often be useful.
5. Artemis will be language agnostic, so we wanted to pursue an approach that could be held relatively consistent across other languages.
Nonetheless, your point about highlighting is absolutely valid. We're actually looking to push out extensions for popular IDEs to correctly detect and syntax highlight our commands to try to remedy this concern.
Cool! Thanks for sharing. There's always complex nuances to problems like this, it's interesting to see what the design considerations were and why this approach was taken.
I'm curious about your choice of using comments, was there an advantage to using this approach over something like decorators?
As it is currently, commments are often a bit weird to debug / view (grayed out) I'm sure there's some advantages to using them here, just thought I'd ask.