user-documentation icon indicating copy to clipboard operation
user-documentation copied to clipboard

Clarify the purpose of `dynamic` more

Open fredemmott opened this issue 6 years ago • 5 comments

Received feedback that "This special type is used to help capture dynamism in the existing codebase in typed code, in a more manageable manner than mixed" implied that dynamic was usually preferable to mixed; I don't think this is the case as mixed is a real supertype-of-all.

fredemmott avatar Nov 19 '19 22:11 fredemmott

David has some feedback about this - in particular, dynamic can be safer than ($mixed as foo)->bar() if you are not absolutely certain that mixed is a foo

fredemmott avatar Nov 19 '19 23:11 fredemmott

Sorry, I still need to incorporate David's feedback

fredemmott avatar Dec 04 '19 17:12 fredemmott

whoops, did not mean to close it; still needs feedback addressing though

fredemmott avatar Dec 19 '19 20:12 fredemmott

Perhaps worth mentioning soft types? That gives you all the checking of hard types, but without the runtime risks.

Wilfred avatar Dec 23 '19 18:12 Wilfred

Hi @fredemmott!

Thank you for your pull request.

We require contributors to sign our Contributor License Agreement, and yours needs attention.

You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

facebook-github-bot avatar May 26 '22 13:05 facebook-github-bot

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

facebook-github-bot avatar Oct 27 '22 14:10 facebook-github-bot