-
Notifications
You must be signed in to change notification settings - Fork 739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
General - Make type syntax in header more consistent #10681
base: master
Are you sure you want to change the base?
Conversation
My thoughts on the discussion: Nested types Enclosure Plural
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this, I'm glad someone had the courage to do it.
@@ -6,11 +6,12 @@ | |||
* Arguments: | |||
* 0: Position ASL <ARRAY> | |||
* 1: Vector dir and up <ARRAY> | |||
* 2: Colour of the tag (valid colours are black, red, green and blue or full path to custom texture) <STRING> | |||
* 2: Color of the tag (valid colors are black, red, green and blue or full path to custom texture) <STRING> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imo, the spelling changes should be reverted, we use both American and British spelling in ACE.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a code spell checker enabled in VS Code that is set to American English. So I briefly went over all the warnings of the spell checker. Why not just specify and set it to either American English or British English? This way, we can maybe add the Code Spell Checker to the VS Code recommended extensions and have fewer overall spelling mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do agree with you. However, not everyone uses VS Code (such as myself), but that's a relatively small issue.
We need to discuss it internally to find out which English is preferred - I just didn't want to alienate anyone by choosing a specific version, but the benefits outweigh the drawbacks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be possible to add words to dictionary
maybe in the .vcode/settings.json
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
American English is the standard that we have chosen to go with.
For me:
|
Co-authored-by: johnb432 <[email protected]>
Would you be willing to add this standardization to our coding guidelines wiki page? Probably in section 3.2; enumerating the allowed types, specifying how to do optional arguments, etc.. Currently the page has some examples, but it isn't spanning, and a concrete ruleset would probably clear things up (I know I would like this). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for bikeshedding a bit. imo, we should specify subtypes of posASL/AGL/ATL/2d
but I am fine without
@@ -4,7 +4,7 @@ | |||
* Garrison function used to garrison AI inside buildings. | |||
* | |||
* Arguments: | |||
* 0: The building(s) nearest this position are used <POSITION> | |||
* 0: The building(s) nearest this position are used <ARRAY> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldnt ARRAY of NUMBERs
be more consistent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that I think about it, I would interpret <ARRAY of NUMBERs>
as a list consisting of any amount of numbers. <ARRAY>
would be generic. Technically, we would need to write <ARRAY<NUMBER, NUMBER, NUMBER>>
for a 3D position or an array containing exactly 3 numbers. I don't know what the best solution here would be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think position is better than array, the biwiki uses position, and even specifies which kind (ASL, ATL)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* 0: The building(s) nearest this position are used <ARRAY> | |
* 0: The building(s) nearest this position are used <POSITION> |
IMO, the subtype should be specified in the argument description. But I'm open to accept using the Position subtypes instead of |
I also think they should be part of the description. |
It seems like most people who answered are for the position types, so I think changing it to them would be ideal. Not blocking, but if it doesn't make much labour I think it's worth while |
@@ -5,7 +5,7 @@ | |||
* | |||
* Arguments: | |||
* 0: Module logic <OBJECT> | |||
* 1: Position of the module <POSITION> | |||
* 1: Position of the module <ARRAY> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* 1: Position of the module <ARRAY> | |
* 1: Position of the module <POSITION> |
@@ -5,7 +5,7 @@ | |||
* | |||
* Arguments: | |||
* 0: Unit <OBJECT> | |||
* 1: Position to place explosive <POSITION> | |||
* 1: Position to place explosive <ARRAY> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* 1: Position to place explosive <ARRAY> | |
* 1: Position to place explosive <POSITION> |
* 0: Unit needing to be placed <UNIT> | ||
* 1: Position the unit need to be placed at <POSITION> | ||
* 0: Unit needing to be placed <OBJECT> | ||
* 1: Position the unit need to be placed at <ARRAY> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* 1: Position the unit need to be placed at <ARRAY> | |
* 1: Position the unit need to be placed at <POSITION> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these are the only 4 changes to revert and then we can merge it
If we introduce now a position type, how should it be written? I wish GitHub had a poll feature. Could you please vote with reactions? Multiple votes allowed.
|
Feels weird to have POSITION in the brackets, since it's not a type. Fwiw, I've always done: |
We had this discussion a few comments above. Since I'm unsure what the majority now wants, here's another poll. Multiple votes allowed.
|
When merged this pull request will:
s
for plural of typeor
for multiple optionsBOOLEAN
->BOOL
,POSITION
->ARRAY
)<OPTIONAL>
with(default: ...)
(default: ...)
after<TYPE>
IMPORTANT
Component - Add|Fix|Improve|Change|Make|Remove {changes}
.Discussion
Nested types
Currently, there are two syntax versions of how the types inside an array are represented:
ARRAY<NUMBER>
,ARRAY<ARRAY<OBJECT, NUMBER>>
ARRAY of ARRAYs of OBJECTs and NUMBERs
Which syntax should be used?
Enclosure
Furthermore, should each type be enclosed in their own
<TYPE>
when multiple types are an options?<CODE or STRING>
<CODE> or <STRING>
Plural
Should types be pluralized? If so, how?
<ARRAY of NUMBER>
<ARRAY of NUMBERs>
<ARRAY of NUMBERS>