Skip to content

Would "Hacks and workarounds" section in Wiki helpful? #8517

Description

There is a long list of requested features that may or may not ever be implemented. In the meanwhile developers need a way to go without them. There is quite a number of witty workarounds to missing features have been posted in separate issues. These workarounds get lost among other issues and sometimes closed which makes them hard to find. The developer's community might benefit from making a list of them and publish it at a well seen sight. A format of such list might be as follows:

Nominal types #202 (in investigation)

Activity

  1. mhegazy commented on May 8, 2016

    @mhegazy
    Contributor

    I would rather have a section about nominal vs. structural type systems in the handbook, along with recommendations for emulating nominal types as suggested in #8510, #202 and #4895.

  2. DanielRosenwasser commented on May 9, 2016

    @DanielRosenwasser
    Member

    I agree with Mohamed Hegazy (@mhegazy), I'm not so sure I want to endorse "hacks and workarounds". Promoting certain patterns to achieve things is a sure-fire way to paint us into a corner when we assume no real world code would be impacted by certain changes.

  3. basarat commented on May 9, 2016

    @basarat
    Contributor

    Hacks and workarounds : https://basarat.gitbooks.io/typescript/content/docs/tips/main.html Indeed some from people like Aleksey-Bykov himself with my personal opinions mixed in (hacks are fundamentally personal) 🌹

  4. RyanCavanaugh commented on May 9, 2016

    @RyanCavanaugh
    Member

    I'm reminded of the T|void "workaround" people were using to emulate non-nullable types and how badly that code works with real nullable types. We should be careful here and only list things that we consider to be OK code to begin with (i.e. things we consider to be plausibly correct uses of the type system).

  5. falsandtru commented on May 9, 2016

    @falsandtru
    Contributor

    I don't like hacks.

  6. locked and limited conversation to collaborators on Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocsThe issue relates to how you learn TypeScriptSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions