Skip to content
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

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

Closed
zpdDG4gta8XKpMCd opened this issue May 8, 2016 · 5 comments
Closed

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

zpdDG4gta8XKpMCd opened this issue May 8, 2016 · 5 comments
Labels
Docs The issue relates to how you learn TypeScript Suggestion An idea for TypeScript

Comments

@zpdDG4gta8XKpMCd
Copy link

zpdDG4gta8XKpMCd commented May 8, 2016

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)

@DanielRosenwasser DanielRosenwasser added Docs The issue relates to how you learn TypeScript Suggestion An idea for TypeScript labels May 8, 2016
@mhegazy
Copy link
Contributor

mhegazy commented May 8, 2016

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.

@DanielRosenwasser
Copy link
Member

I agree with @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.

@basarat
Copy link
Contributor

basarat commented May 9, 2016

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) 🌹

@RyanCavanaugh
Copy link
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).

@falsandtru
Copy link
Contributor

I don't like hacks.

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Docs The issue relates to how you learn TypeScript Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

6 participants