René's URL Explorer Experiment


Title: Design Meeting Notes for 3/11/2016 · Issue #7488 · microsoft/TypeScript · GitHub

Open Graph Title: Design Meeting Notes for 3/11/2016 · Issue #7488 · microsoft/TypeScript

X Title: Design Meeting Notes for 3/11/2016 · Issue #7488 · microsoft/TypeScript

Description: Non-nullable types (#7140) Question marks on types Let's start the bike-shedding! What does T? mean? function foo(x?: string) { // x: string | undefined } function foo(x: string?) { // ????? } function foo(x?: string?) { // x: string | u...

Open Graph Description: Non-nullable types (#7140) Question marks on types Let's start the bike-shedding! What does T? mean? function foo(x?: string) { // x: string | undefined } function foo(x: string?) { // ????? } func...

X Description: Non-nullable types (#7140) Question marks on types Let's start the bike-shedding! What does T? mean? function foo(x?: string) { // x: string | undefined } function foo(x: string?) { // ????? } ...

Opengraph URL: https://github.com/microsoft/TypeScript/issues/7488

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Design Meeting Notes for 3/11/2016","articleBody":"# Non-nullable types (#7140)\n## Question marks on types\n\nLet's start the bike-shedding! What does `T?` mean?\n\n``` ts\nfunction foo(x?: string) {\n    // x: string | undefined\n}\n\nfunction foo(x: string?) {\n    // ?????\n}\n\nfunction foo(x?: string?) {\n    // x: string | undefined | ?????\n}\n```\n- @ahejlsberg: It's hard to imagine a world where `T?` means _only_ `T | null` or _only_ `T | undefined`.\n- There is a school of thought that says \"neither - this just doesn't need to exist\".\n  - Just ship two type aliases for `T | null` and `T | undefined` in `lib.d.ts`\n  - We can sort of see that. It's not crazy.\n  - We can't satisfy everyone - we're going to piss someone off.\n  - But if we ship this without a `?` type modifier, it's the first thing we're going to hear, and we're going to hear it for the rest of our lives.\n- What's crazy about `T | null`?\n  - You have an optional accessor that returns `number? | undefined`.\n    - You end up with these awkward, funny-looking types.\n  - Lack of symmetry between optional members and nullish types.\n    - Becomes like the `const` modifier in C++.\n    - Nobody understands where the heck to put `const` (before `*`, after `*`, at the end of a signature), and the differences are hard for people to grasp.\n      - We understand it, but our users will get tripped up _a lot_.\n  - People will definitely be confused about which to do.\n    - Users on GitHub did not seem to be concerned with it - they understood very well.\n      - Confirmation bias - these are people who are interested in language design to begin with.\n- Too many people are doing `null` to ignore that scenario.\n  - Ultimately the question becomes is this disjoint or does it combine with the \"other\" use of `?` on optional parameters/properties.\n- @RyanCavanaugh: Extremely against `T?` meaning `T | null | undefined` because it muddies waters - So if we can't come to a conclusion, I think we should hold off on it.\n- We want to lead people to a pit of success, and we can't repeat the problem we have with modules. \n- Only consistency in discussion on thread is that there is no consistency. \n- We don't feel confident that we can do the \"right\" thing here out of the gate.\n- If people go out and fix type definitions and inappropriately use `?`, then you've made the ecosystem worse - we need to wary of this possibility.\n- @aleksey-bykov you get a :star:\n- Consensus: come back to this, since this is not a blocker for non-nullable types anyway.\n  - Also, look into supplying type aliases in `lib.d.ts`.\n## Optional members on new members\n- Considering adding question marks on other members (https://github.com/Microsoft/TypeScript/issues/7426#issuecomment-195392211)\n  - On local variable names (e.g. `let x?: number`).\n  - On property declarations in classes (e.g. `class Foo { x?: number }`).\n  - On call signatures (e.g. `function val(x?: string)?: number`).\n  - On index signatures (e.g. `[x: string]?: Entity`).\n- We said it wasn't necessary because classes always have `undefined` by default, but non-nullable types make the world quite different.\n- Variables are more of a _questionable_ (pun intended) case - not entirely certain.\n  - It seems like this would actually give you a case to say that your variable can be `undefined` and reflects that in the type.\n  - Can we use that to model the dual of this on `?` in types?\n    - Let's not go down that rabbit-hole.\n- Call signatures would have an awkward syntax.\n- Consensus: do it for properties, keep the rest this in mind, but come back to it.\n## Control-flow based type checking\n- We're going to need to do it.\n- We think we can do it with no significant perf hit.\n- Get perfect definite assignment errors.\n- Type guards should work perfectly.\n- We'll keep people posted.\n# UMD module support (#7264)\n- Idea with UMD modules is you write a declaration file.\n- In that same file, you write `export as namespace Foo` where `Foo` is some arbitrary identifier.\n- In a module, only if you use a `/// \u003creference path=\"...\" />`, is `Foo` visible.\n- In a script context, `Foo` is always visible if the `.d.ts` is in the compilation context.\n  - Idea is that you're in a script/\"non-module\" context.\n- This is the new, better, way to write type definitions that need to be shared between old script-style code and modules.\n  - The problem is that you always needed to duplicate your definitions across two different definition files, one which used an `export =`.\n- Problem: how do you reflect the type of the module itself?\n  - Sometimes modules have members that refer to themselves.\n  - We're still flexible here!\n  - Continue using some value, use `export =`, and then use an `export namespace as Foo`.\n    \n    ``` ts\n    interface jQueryStatic {\n        foo: jQueryStatic\n    }\n    \n    let jQuery: jQueryStatic;\n    export = jQuery;\n    export as namespace jQuery;\n    ```\n- Why does `/// \u003creference path=\"...\" />` affect things? Why not just use a global module augmentation?\n  - \n# Library include directives (#7263)\n- Answer to the question of \"How do we easily resolve types for script/global code?\"\n  - Need to avoid situations where users have duplicate definitions due to \"global code\" being treated as conflicting even though they might refer to the same entities.\n- Syntax: `/// \u003creference library=\"jquery\" />`\n- What is the order of resolution for declaration files?\n  - Take `/// \u003creference library=\"jquery\" />`.\n  - Start from current module location.\n  - Look for files walking up the spine of directories. For each directory:\n    1. If you see a file named `jquery.d.ts`, use that.\n    2. If you see a directory named `typings`, look in there.\n    3. If you see a directory named `node_modules`\n       1. Try to resolve in `node_modules/jquery/package.json` or use the `node_modules/jquery/index.d.ts`.\n       2. Try to resolve in `node_modules/jquery/package.json` or use the `node_modules/@types/jquery/index.d.ts` (or something similar).\n- Meeting cut short - may be more to the algorithm.\n","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2016-03-12T01:50:00Z","url":"https://github.com/microsoft/TypeScript/issues/7488"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:102824c7-23a2-b5f5-32a4-ade5bd1ec148
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB566:16EED3:13BD73B:1920269:6B0128AB
html-safe-noncec2a806a85c338e7f25f1fa100e98e035e730c8827c201b5089d864afe0f9af77
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTY2OjE2RUVEMzoxM0JENzNCOjE5MjAyNjk6NkIwMTI4QUIiLCJ2aXNpdG9yX2lkIjoiNjE5NTIxMzgwNzY5MDc4Njk4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmace47472bac8d94f672aaa621958e28314e0db7c073ab26a54b203be34b9a6d0ea
hovercard-subject-tagissue:140333724
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/7488/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ceda24ff3eeeb7b9c4cb182630e22855faa33ddf2c384c987ad231ee4e5426d2/microsoft/TypeScript/issues/7488
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ceda24ff3eeeb7b9c4cb182630e22855faa33ddf2c384c987ad231ee4e5426d2/microsoft/TypeScript/issues/7488
og:image:altNon-nullable types (#7140) Question marks on types Let's start the bike-shedding! What does T? mean? function foo(x?: string) { // x: string | undefined } function foo(x: string?) { // ????? } func...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameDanielRosenwasser
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id20929025
octolytics-dimension-repository_nwomicrosoft/TypeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id20929025
octolytics-dimension-repository_network_root_nwomicrosoft/TypeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/7488#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F7488
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F7488
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/issues/7488
Reloadhttps://github.com/microsoft/TypeScript/issues/7488
Reloadhttps://github.com/microsoft/TypeScript/issues/7488
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests311 (311)https://github.com/microsoft/TypeScript/pulls
Actionshttps://github.com/microsoft/TypeScript/actions
Projectshttps://github.com/microsoft/TypeScript/projects
Wikihttps://github.com/microsoft/TypeScript/wiki
Security and qualityhttps://github.com/microsoft/TypeScript/security
Insightshttps://github.com/microsoft/TypeScript/insights
https://github.com/microsoft/TypeScript
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/7488
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/7488
Design Meeting Notes for 3/11/2016https://github.com/microsoft/TypeScript/issues/7488#top
Design NotesNotes from our design meetingshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Design%20Notes%22
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on Mar 12, 2016https://github.com/microsoft/TypeScript/issues/7488#issue-140333724
#7140https://github.com/microsoft/TypeScript/pull/7140
Anders Hejlsberg (@ahejlsberg)https://github.com/ahejlsberg
Ryan Cavanaugh (@RyanCavanaugh)https://github.com/RyanCavanaugh
Aleksey-Bykovhttps://github.com/Aleksey-Bykov
[Request for feedback] Nullable types, null and undefined #7426 (comment)https://github.com/microsoft/TypeScript/issues/7426#issuecomment-195392211
#7264https://github.com/microsoft/TypeScript/pull/7264
#7263https://github.com/microsoft/TypeScript/pull/7263
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
Design NotesNotes from our design meetingshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Design%20Notes%22
on Mar 12, 2016https://github.com/microsoft/TypeScript/issues/7488#event-587194740
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Mar 12, 2016https://github.com/microsoft/TypeScript/issues/7488#event-587194905
microsofthttps://github.com/microsoft
on Jun 19, 2018https://github.com/microsoft/TypeScript/issues/7488#event-1689642820
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/7488
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/7488
Design NotesNotes from our design meetingshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Design%20Notes%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.