#(sanvander) How to comment on same line as code?
25 messages · Page 1 of 1 (latest)
(sanvander) How to comment on same line as code?
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>
nah thats not a thing
Ah ok thanks, is there anyway i can change this thread to a feature request?
Why not put it above your code?
Well when im programming I do it on the same line as the code as well, and afaik most programmers do that? (when just commenting for that specific line). Sometimes i need to add some explanation or information to each line of code for a decent sized section. I feel like it would hinder the readability of the code if i'd do it like:
line of code
comment
line of code
comment
line of code
comment
and so on for mayeb dozens of lines.
It'd help a lot if it would be :
line of code #comment
line of code #comment
line of code #comment
But maybe im a special case in this lol
imo i prefer seeing comments separated from the code
Config files usually have comments above their key/value pairs, explaining what it does, prior to offering the choice.
Denizen does not support same-line comments and likely will not.
i would say though this is not entirely true. where i work the standard is to do comments on their own line and only using same line comments for very minor things like //this is broken pls fix
(and this is a rather large company, so there are plenty of people doing it this way)
The original reason they weren't allowed is because in early versions of Denizen it was more likely to be a mistake than intent, a lot of - narrate "something #1" style things would borky from that so inline comments were disabled
now that we have the toolset to prevent that mistake (ie syntax highlighting mainly lol) it's less of an issue, but it'd still be a helluva undertaking to add in now, considering we'd have to have a years-long deprecation cycle to protect all the scripts out that there use #from breaking overnight
and, given that fact and the reasoning explained above for why that's usually not preferred anyway, doesn't seem worth it
Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.
If not yet resolved, please reply below to tell us what you still need.
(Note that if there is no reply for a few days, this thread will eventually close itself.)
@sour hinge