Replies: 5 comments 3 replies
-
i use brackets, braces, parenthesis respectively, i think a new reader of the code would be able to understand what those mean easier than someone seeing cBracket |
Beta Was this translation helpful? Give feedback.
-
I like the idea of the consistent comment headers added to converted code. It would be it a cinch to find/replace, especially with regex in Notepad++. I have no preference regarding the term for brackets. Can just call them brackets as far as I'm concerned (rather than tagging them with b,c,r). I doubt it will make much difference to those reading the code. Just my opinion... |
Beta Was this translation helpful? Give feedback.
-
I agree with your comment prefixes, but I would like to keep the This way |
Beta Was this translation helpful? Give feedback.
-
@Banaanae don't understand why you are ok with I just thought it would be easier for the end user to search for a single prefix, "V1toV2", in order to aid the removal of all comments added by the converter. All comments added by the converter can be removed by using two regex's, |
Beta Was this translation helpful? Give feedback.
-
Yes, too far, imo. I think that the bulk of the programming/scripting world uses braces, brackets, and parentheses without confusion. If you want to go one step further, maybe square brackets and/or curly braces. I don't recollect ever hearing box brackets or round brackets. The latter for parentheses is very strange...re ChatGPT on that one...too much A, not enough I. :) Regards, Joe P.S. I replied to this via email on 2-Jul, but never got a notification email back with it, so I presume it wasn't delivered. I just discovered the Discussions tab on GitHub, so I'm trying again here. This is my first ever GitHub contribution. |
Beta Was this translation helpful? Give feedback.
-
Firstly, sorry about the novice PR.
I asked ChatGPT, "What would you collectively call these characters, [ ] { } ( )".
The reply ...
I propose, for the sake of clarity within the code, that "bracket/s" is used for the collective term, and the terms
bBracket
(box bracket),cBracket
(curly bracket) andrBracket
(round bracket) are used where required.For example, in
QuickConvertorV2_scintilla.ahk
,Brace
andbrace/s
would be replaced withBracket
andbracket/s
respectively.In
ConverFuncs.ahk
...try code := AddBracket(code) ; Add Brackets to Hotkeys
becomes
try code := Add_cBracket(code) ; Add cBrackets to Hotkeys
Result .= LabelPointer = 1 ? "} `; V1toV2: Added bracket before function`r`n" : ""
becomes
Result .= LabelPointer = 1 ? "} `; V1toV2: Added closing cBracket`r`n" : ""
etc,
etc,
I also propose, that all comments added to the converted code should be prefixed with
; V1toV2:
, such as ...Return "; REMOVED Random reseed"
=>Return "; V1toV2: REMOVED Random reseed"
... this would make it a lot easier for the end user to search for and remove any comments not pertaining to their code.
Am I going too far?
Beta Was this translation helpful? Give feedback.
All reactions