facebookarchive / hack-langspec

The official Hack Language specification.
http://hacklang.org
Other
172 stars 48 forks source link

More clearly illustrate *type-specification*s #115

Open admdikramr opened 6 years ago

admdikramr commented 6 years ago

No example is provided for type-specification usage, so I add one. Overuse of base-type exposure through type-specifications has led to significant lost time and typing errors, so it makes sense to be clear about how it works. The best use case for base-type exposure is when a "raw" int or string is being migrated to be an Enum. The best practice, after a migration, is to explicitly cast the enum value to the base type whenever this is necessary.

facebook-github-bot commented 6 years ago

Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours has expired.

Before we can review or merge your code, we need you to email cla@fb.com with your details so we can update your status.

facebook-github-bot commented 6 years ago

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!