Skip to content

Use static typing where available#216

Open
jacksonj04 wants to merge 4 commits intomainfrom
rfc/use-static-typing-where-available
Open

Use static typing where available#216
jacksonj04 wants to merge 4 commits intomainfrom
rfc/use-static-typing-where-available

Conversation

@jacksonj04
Copy link
Member

@jacksonj04 jacksonj04 commented Feb 24, 2023

tl;dr: we should try use static typing where it exists, because it helps protect us from easy mistakes and makes us more fully consider the structure of our application and how information is passed around.

Bikeshed for this at https://bikeshed.dxw.com/2023/02/24/just-my-type-why-we-should-start-using-more-static-typing/

@github-actions github-actions bot added the new New pull requests needing review label Feb 24, 2023
@jacksonj04 jacksonj04 force-pushed the rfc/use-static-typing-where-available branch 2 times, most recently from c5a0b64 to f922c4d Compare February 24, 2023 09:57
@jacksonj04 jacksonj04 marked this pull request as ready for review February 24, 2023 10:00
@snim2
Copy link
Contributor

snim2 commented Feb 24, 2023

Whilst I'm a big fan of external typing tools like MyPy, I'm a little more cautious about this proposal. Firstly, I think we need to differentiate a little between how we deal with:

  • New code and legacy code
  • Repos we have forked and ones we've created
  • Code that is relatively stand-alone, and codebases where the use of a larger framework or whatever might complicate the use of internal type annotations

I'd be interested to hear any thoughts @matthewpassmore and @serena-piccioni about how we might apply some of the thoughts in this draft to GovPress work.

Copy link
Contributor

@richpjames richpjames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this!
I would go as far as saying any non-trivial Javascript app MUST use typescript but in the interest of keeping this RFC as broad as possible I think SHOULD is fine.

@github-actions github-actions bot removed the new New pull requests needing review label Mar 10, 2023
@dragon-dxw
Copy link

I agree with this! I would go as far as saying any non-trivial Javascript app MUST use typescript but in the interest of keeping this RFC as broad as possible I think SHOULD is fine.

We should probably be explicit about per-language choices, even if they are only recommendations.

@jacksonj04 jacksonj04 force-pushed the rfc/use-static-typing-where-available branch from 290335d to 808423e Compare September 19, 2023 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants