CINXE.COM

how to update APIs for generics · golang/go · Discussion #48287 · GitHub

<!DOCTYPE html> <html lang="en" data-color-mode="auto" data-light-theme="light" data-dark-theme="dark" data-a11y-animated-images="system" data-a11y-link-underlines="true" > <head> <meta charset="utf-8"> <link rel="dns-prefetch" href="https://github.githubassets.com"> <link rel="dns-prefetch" href="https://avatars.githubusercontent.com"> <link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com"> <link rel="dns-prefetch" href="https://user-images.githubusercontent.com/"> <link rel="preconnect" href="https://github.githubassets.com" crossorigin> <link rel="preconnect" href="https://avatars.githubusercontent.com"> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/light-3e154969b9f9.css" /><link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/dark-9c5b7a476542.css" /><link data-color-theme="dark_dimmed" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_dimmed-afda8eb0fb33.css" /><link data-color-theme="dark_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_high_contrast-2494e44ccdc5.css" /><link data-color-theme="dark_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_colorblind-56fff47acadc.css" /><link data-color-theme="light_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_colorblind-71cd4cc132ec.css" /><link data-color-theme="light_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_high_contrast-fd5499848985.css" /><link data-color-theme="light_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_tritanopia-31d17ba3e139.css" /><link data-color-theme="dark_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_tritanopia-68d6b2c79663.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-primitives-4cf0d59ab51a.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-af846850481e.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-e41ff91f8baa.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/github-d3b66f11d613.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/repository-1e3bbbee6b91.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/discussions-adf1d1b8b95c.css" /> <script type="application/json" id="client-env">{"locale":"en","featureFlags":["copilot_new_references_ui","copilot_beta_features_opt_in","copilot_chat_static_thread_suggestions","copilot_conversational_ux_history_refs","copilot_implicit_context","copilot_smell_icebreaker_ux","experimentation_azure_variant_endpoint","failbot_handle_non_errors","geojson_azure_maps","ghost_pilot_confidence_truncation_25","ghost_pilot_confidence_truncation_40","hovercard_accessibility","issues_react_new_timeline","issues_react_avatar_refactor","issues_react_remove_placeholders","issues_react_cache_fix_workaround","issues_react_blur_item_picker_on_close","marketing_pages_search_explore_provider","remove_child_patch","sample_network_conn_type","site_metered_billing_update","issues_react_first_time_contribution_banner","jk_navigation_in_list_view","ui_commands_respect_modals","lifecycle_label_name_updates"]}</script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/wp-runtime-118ecaabd77e.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_dompurify_dist_purify_js-b73fdff77a4e.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_oddbird_popover-polyfill_dist_popover_js-aff936e590ed.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_arianotify-polyfill_ariaNotify-polyfill_js-node_modules_github_mi-247092-740e4ddd559d.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_failbot_failbot_ts-a46544e9ee5e.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/environment-cd35650c2e9c.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_primer_behaviors_dist_esm_index_mjs-4aa4b0e95669.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_selector-observer_dist_index_esm_js-f690fd9ae3d5.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_relative-time-element_dist_index_js-6d3967acd51c.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_combobox-nav_dist_index_js-node_modules_github_g-emoji-element_di-6ce195-53781cbc550f.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_auto-complete-element_dist_index_js-node_modules_github_catalyst_-6afc16-3cdfa69a0406.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_text-expander-element_dist_index_js-f5498b8d4e5d.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_filter-input-element_dist_index_js-node_modules_github_remote-inp-b5f1d7-492b5042c841.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_stacktrace-parser_dist_s-1f651a-1e3d784c897c.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_file-attachment-element_dist_index_js-node_modules_primer_view-co-7671f1-dc6cac136d88.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/github-elements-71486356f507.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/element-registry-e3ab8405ef80.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_braintree_browser-detection_dist_browser-detection_js-node_modules_githu-bb80ec-634de60bacfa.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_lit-html_lit-html_js-ce7225a304c5.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_hydro-analytics-client_dist_analytics-client_js-node_modules_gith-f3aee1-e6893db9c19e.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_morphdom_dist_morphdom-e-7c534c-f8a5485c982a.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_turbo_dist_turbo_es2017-esm_js-858e043fcf76.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-893f9f-6cf3320416b8.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_scroll-anchoring_dist_scroll-anchoring_esm_js-node_modules_stacktrace-pa-a71630-6f3c4f0189d8.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_color-convert_index_js-0e07cc183eed.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_quote-selection_dist_index_js-node_modules_github_session-resume_-0b5e12-889cec8cf448.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_updatable-content_updatable-content_ts-eae9df0dd562.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_task-list_ts-app_assets_modules_github_sso_ts-ui_packages-900dde-18d1c91a7872.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_sticky-scroll-into-view_ts-7cbef09a422c.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_ajax-error_ts-app_assets_modules_github_behaviors_include-d0d0a6-0e9fa537dc4f.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_commenting_edit_ts-app_assets_modules_github_behaviors_ht-83c235-c89801ebbe15.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/behaviors-93287f4de493.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_delegated-events_dist_index_js-node_modules_github_catalyst_lib_index_js-f6223d90c7ba.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/notifications-global-3366f6b6298e.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_delegated-events_dist_index_js-node_modules_github_hotkey_dist_index_js-d92e69b3521a.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_primer_live-region-element-32d343-56ceead9587a.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_github_session-resume_di-49b9c2-9360988cc3ad.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_form-utils_form-utils_ts-ui_packages_input-navigation-behavior_input-navigation-b-a97423-97468312ad00.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_inline-comment_ts-app_assets_modules_github_discussions_v-a47e26-864e9f3faf28.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/discussions-be72aac6e2c9.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/structured-issues-eb321c77cee9.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/primer-react-765944243383.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/react-core-cd0a67881543.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/react-lib-7b7b5264f6c1.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/octicons-react-45c3a19dd792.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_emotion_is-prop-valid_dist_emotion-is-prop-valid_esm_js-node_modules_emo-62da9f-54c0c921f04b.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_stacktrace-parser_dist_s-e7dcdd-285fc29e9fa5.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_oddbird_popover-polyfill_dist_popover-fn_js-4896ddd4b7bb.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/notifications-subscriptions-menu-1490f5bef85d.js"></script> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react.9fa170e9435ed4b922b9.module.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/notifications-subscriptions-menu.1bcff9205c241e99cff2.module.css" /> <title>how to update APIs for generics · golang/go · Discussion #48287 · GitHub</title> <meta name="route-pattern" content="/_view_fragments/Voltron::DiscussionsFragmentsController/show/:user_id/:repository/:discussion_number/discussion_layout(.:format)" data-turbo-transient> <meta name="route-controller" content="voltron_discussions_fragments" data-turbo-transient> <meta name="route-action" content="discussion_layout" data-turbo-transient> <meta name="current-catalog-service-hash" content="9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be"> <meta name="request-id" content="C1FC:FFEF4:13C93:162BA:6742DCA1" data-pjax-transient="true"/><meta name="html-safe-nonce" content="bfb04c868e43d81218bb42317e246ebf33cfd595b06269a1b4b28c4c7dd7bbe0" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMUZDOkZGRUY0OjEzQzkzOjE2MkJBOjY3NDJEQ0ExIiwidmlzaXRvcl9pZCI6IjQyMDQ0ODY4MjgwMjUzNzE4MDkiLCJyZWdpb25fZWRnZSI6InNvdXRoZWFzdGFzaWEiLCJyZWdpb25fcmVuZGVyIjoic291dGhlYXN0YXNpYSJ9" data-pjax-transient="true"/><meta name="visitor-hmac" content="8464557b57cec837f617ff7caf8aa33823417f9dfa80000b5b7b662d7cd89f34" data-pjax-transient="true"/> <meta name="hovercard-subject-tag" content="discussion:3563602" data-turbo-transient> <meta name="github-keyboard-shortcuts" content="repository,copilot" data-turbo-transient="true" /> <meta name="selected-link" value="repo_discussions" data-turbo-transient> <link rel="assets" href="https://github.githubassets.com/"> <meta name="google-site-verification" content="Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I"> <meta name="octolytics-url" content="https://collector.github.com/github/collect" /> <meta name="analytics-location" content="/&lt;user-name&gt;/&lt;repo-name&gt;/voltron/discussions_fragments/discussion_layout" data-turbo-transient="true" /> <meta name="user-login" content=""> <meta name="viewport" content="width=device-width"> <meta name="description" content="how to update APIs for generics"> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub"> <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub"> <meta property="fb:app_id" content="1401488693436528"> <meta name="apple-itunes-app" content="app-id=1477376905, app-argument=https://github.com/_view_fragments/Voltron::DiscussionsFragmentsController/show/golang/go/48287/discussion_layout" /> <meta name="twitter:image" content="https://opengraph.githubassets.com/c42b264163a84af18a17324ada2916bf8782641fd7d17b9966b334967d810547/golang/go/discussions/48287" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="how to update APIs for generics · golang/go · Discussion #48287" /><meta name="twitter:description" content="@ianlancetaylor, @griesemer, and I are wondering about different possible plans for updating APIs that would have used generics but currently use interface{}, and we wanted to cast a wider net for ..." /> <meta property="og:image" content="https://opengraph.githubassets.com/c42b264163a84af18a17324ada2916bf8782641fd7d17b9966b334967d810547/golang/go/discussions/48287" /><meta property="og:image:alt" content="@ianlancetaylor, @griesemer, and I are wondering about different possible plans for updating APIs that would have used generics but currently use interface{}, and we wanted to cast a wider net for ..." /><meta property="og:image:width" content="1200" /><meta property="og:image:height" content="600" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="how to update APIs for generics · golang/go · Discussion #48287" /><meta property="og:url" content="https://github.com/golang/go/discussions/48287" /><meta property="og:description" content="@ianlancetaylor, @griesemer, and I are wondering about different possible plans for updating APIs that would have used generics but currently use interface{}, and we wanted to cast a wider net for ..." /> <meta name="hostname" content="github.com"> <meta name="expected-hostname" content="github.com"> <meta http-equiv="x-pjax-version" content="272935131c2027f789efabd5bf30904ffaea35908a22afd03d8f75128cee7e1b" data-turbo-track="reload"> <meta http-equiv="x-pjax-csp-version" content="ace39c3b6632770952207593607e6e0be0db363435a8b877b1f96abe6430f345" data-turbo-track="reload"> <meta http-equiv="x-pjax-css-version" content="8968ee26e93ec8c6d3c4e91c77fb9d206091689d451ebbcddeca3832587a5b30" data-turbo-track="reload"> <meta http-equiv="x-pjax-js-version" content="c4972ae1cf5d4607c47252349fc1b47a24ff0ea303e5a8fbbe18ec27725a87ee" data-turbo-track="reload"> <meta name="turbo-cache-control" content="no-preview" data-turbo-transient=""> <meta name="voltron-timing" value="978"> <meta name="go-import" content="github.com/golang/go git https://github.com/golang/go.git"> <meta name="octolytics-dimension-user_id" content="4314092" /><meta name="octolytics-dimension-user_login" content="golang" /><meta name="octolytics-dimension-repository_id" content="23096959" /><meta name="octolytics-dimension-repository_nwo" content="golang/go" /><meta name="octolytics-dimension-repository_public" content="true" /><meta name="octolytics-dimension-repository_is_fork" content="false" /><meta name="octolytics-dimension-repository_network_root_id" content="23096959" /><meta name="octolytics-dimension-repository_network_root_nwo" content="golang/go" /> <link rel="canonical" href="https://github.com/golang/go/discussions/48287" data-turbo-transient> <meta name="turbo-body-classes" content="logged-out env-production page-responsive"> <meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats"> <meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors"> <link rel="mask-icon" href="https://github.githubassets.com/assets/pinned-octocat-093da3e6fa40.svg" color="#000000"> <link rel="alternate icon" class="js-site-favicon" type="image/png" href="https://github.githubassets.com/favicons/favicon.png"> <link rel="icon" class="js-site-favicon" type="image/svg+xml" href="https://github.githubassets.com/favicons/favicon.svg" data-base-href="https://github.githubassets.com/favicons/favicon"> <meta name="theme-color" content="#1e2327"> <meta name="color-scheme" content="light dark" /> <link rel="manifest" href="/manifest.json" crossOrigin="use-credentials"> </head> <body class="logged-out env-production page-responsive" style="word-wrap: break-word;"> <div data-turbo-body class="logged-out env-production page-responsive" style="word-wrap: break-word;"> <div class="position-relative header-wrapper js-header-wrapper "> <a href="#start-of-content" data-skip-target-assigned="false" class="px-2 py-4 color-bg-accent-emphasis color-fg-on-emphasis show-on-focus js-skip-to-content">Skip to content</a> <span data-view-component="true" class="progress-pjax-loader Progress position-fixed width-full"> <span style="width: 0%;" data-view-component="true" class="Progress-item progress-pjax-loader-bar left-0 top-0 color-bg-accent-emphasis"></span> </span> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/primer-react-765944243383.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/react-core-cd0a67881543.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/react-lib-7b7b5264f6c1.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/octicons-react-45c3a19dd792.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_emotion_is-prop-valid_dist_emotion-is-prop-valid_esm_js-node_modules_emo-62da9f-54c0c921f04b.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_stacktrace-parser_dist_s-e7dcdd-285fc29e9fa5.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_oddbird_popover-polyfill_dist_popover-fn_js-4896ddd4b7bb.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_ui-commands_ui-commands_ts-d25fac54a6bc.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/keyboard-shortcuts-dialog-ed30662f9578.js"></script> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-react.9fa170e9435ed4b922b9.module.css" /> <react-partial partial-name="keyboard-shortcuts-dialog" data-ssr="false" data-attempted-ssr="false" > <script type="application/json" data-target="react-partial.embeddedData">{"props":{"docsUrl":"https://docs.github.com/get-started/accessibility/keyboard-shortcuts"}}</script> <div data-target="react-partial.reactRoot"></div> </react-partial> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-94fd67-cf3dd69d89eb.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/sessions-8fa3b694f335.js"></script> <header class="HeaderMktg header-logged-out js-details-container js-header Details f4 py-3" role="banner" data-is-top="true" data-color-mode=light data-light-theme=light data-dark-theme=dark> <h2 class="sr-only">Navigation Menu</h2> <button type="button" class="HeaderMktg-backdrop d-lg-none border-0 position-fixed top-0 left-0 width-full height-full js-details-target" aria-label="Toggle navigation"> <span class="d-none">Toggle navigation</span> </button> <div class="d-flex flex-column flex-lg-row flex-items-center px-3 px-md-4 px-lg-5 height-full position-relative z-1"> <div class="d-flex flex-justify-between flex-items-center width-full width-lg-auto"> <div class="flex-1"> <button aria-label="Toggle navigation" aria-expanded="false" type="button" data-view-component="true" class="js-details-target js-nav-padding-recalculate js-header-menu-toggle Button--link Button--medium Button d-lg-none color-fg-inherit p-1"> <span class="Button-content"> <span class="Button-label"><div class="HeaderMenu-toggle-bar rounded my-1"></div> <div class="HeaderMenu-toggle-bar rounded my-1"></div> <div class="HeaderMenu-toggle-bar rounded my-1"></div></span> </span> </button> </div> <a class="mr-lg-3 color-fg-inherit flex-order-2 js-prevent-focus-on-mobile-nav" href="/" aria-label="Homepage" data-analytics-event="{&quot;category&quot;:&quot;Marketing nav&quot;,&quot;action&quot;:&quot;click to go to homepage&quot;,&quot;label&quot;:&quot;ref_page:Marketing;ref_cta:Logomark;ref_loc:Header&quot;}"> <svg height="32" aria-hidden="true" viewBox="0 0 24 24" version="1.1" width="32" data-view-component="true" class="octicon octicon-mark-github"> <path d="M12.5.75C6.146.75 1 5.896 1 12.25c0 5.089 3.292 9.387 7.863 10.91.575.101.79-.244.79-.546 0-.273-.014-1.178-.014-2.142-2.889.532-3.636-.704-3.866-1.35-.13-.331-.69-1.352-1.18-1.625-.402-.216-.977-.748-.014-.762.906-.014 1.553.834 1.769 1.179 1.035 1.74 2.688 1.25 3.349.948.1-.747.402-1.25.733-1.538-2.559-.287-5.232-1.279-5.232-5.678 0-1.25.445-2.285 1.178-3.09-.115-.288-.517-1.467.115-3.048 0 0 .963-.302 3.163 1.179.92-.259 1.897-.388 2.875-.388.977 0 1.955.13 2.875.388 2.2-1.495 3.162-1.179 3.162-1.179.633 1.581.23 2.76.115 3.048.733.805 1.179 1.825 1.179 3.09 0 4.413-2.688 5.39-5.247 5.678.417.36.776 1.05.776 2.128 0 1.538-.014 2.774-.014 3.162 0 .302.216.662.79.547C20.709 21.637 24 17.324 24 12.25 24 5.896 18.854.75 12.5.75Z"></path> </svg> </a> <div class="flex-1 flex-order-2 text-right"> <a href="/login?return_to=https%3A%2F%2Fgithub.com%2Fgolang%2Fgo%2Fdiscussions%2F48287" class="HeaderMenu-link HeaderMenu-button d-inline-flex d-lg-none flex-order-1 f5 no-underline border color-border-default rounded-2 px-2 py-1 color-fg-inherit js-prevent-focus-on-mobile-nav" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;site header menu&quot;,&quot;repository_id&quot;:null,&quot;auth_type&quot;:&quot;SIGN_UP&quot;,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="8d38a907c5dcfc634843efc0948a999dfec91d8b274fd3d8576c48145b2aa09c" data-analytics-event="{&quot;category&quot;:&quot;Marketing nav&quot;,&quot;action&quot;:&quot;click to Sign in&quot;,&quot;label&quot;:&quot;ref_page:Marketing;ref_cta:Sign in;ref_loc:Header&quot;}" > Sign in </a> </div> </div> <div class="HeaderMenu js-header-menu height-fit position-lg-relative d-lg-flex flex-column flex-auto top-0"> <div class="HeaderMenu-wrapper d-flex flex-column flex-self-start flex-lg-row flex-auto rounded rounded-lg-0"> <nav class="HeaderMenu-nav" aria-label="Global"> <ul class="d-lg-flex list-style-none"> <li class="HeaderMenu-item position-relative flex-wrap flex-justify-between flex-items-center d-block d-lg-flex flex-lg-nowrap flex-lg-items-center js-details-container js-header-menu-item"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Product <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path> </svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 pt-2 pt-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 pb-2 pb-lg-4 d-lg-flex flex-wrap dropdown-menu-wide"> <div class="HeaderMenu-column px-lg-4 border-lg-right mb-4 mb-lg-0 pr-lg-7"> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0"> <ul class="list-style-none f5" > <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;github_copilot&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;github_copilot_link_product_navbar&quot;}" href="https://github.com/features/copilot"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-copilot color-fg-subtle mr-3"> <path d="M23.922 16.992c-.861 1.495-5.859 5.023-11.922 5.023-6.063 0-11.061-3.528-11.922-5.023A.641.641 0 0 1 0 16.736v-2.869a.841.841 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.195 10.195 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952 1.399-1.136 3.392-2.093 6.122-2.093 2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.832.832 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256ZM12.172 11h-.344a4.323 4.323 0 0 1-.355.508C10.703 12.455 9.555 13 7.965 13c-1.725 0-2.989-.359-3.782-1.259a2.005 2.005 0 0 1-.085-.104L4 11.741v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.323 4.323 0 0 1-.355-.508h-.016.016Zm.641-2.935c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z"></path><path d="M14.5 14.25a1 1 0 0 1 1 1v2a1 1 0 0 1-2 0v-2a1 1 0 0 1 1-1Zm-5 0a1 1 0 0 1 1 1v2a1 1 0 0 1-2 0v-2a1 1 0 0 1 1-1Z"></path> </svg> <div> <div class="color-fg-default h4">GitHub Copilot</div> Write better code with AI </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;security&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;security_link_product_navbar&quot;}" href="https://github.com/features/security"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-shield-check color-fg-subtle mr-3"> <path d="M16.53 9.78a.75.75 0 0 0-1.06-1.06L11 13.19l-1.97-1.97a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.06 0l5-5Z"></path><path d="m12.54.637 8.25 2.675A1.75 1.75 0 0 1 22 4.976V10c0 6.19-3.771 10.704-9.401 12.83a1.704 1.704 0 0 1-1.198 0C5.77 20.705 2 16.19 2 10V4.976c0-.758.489-1.43 1.21-1.664L11.46.637a1.748 1.748 0 0 1 1.08 0Zm-.617 1.426-8.25 2.676a.249.249 0 0 0-.173.237V10c0 5.46 3.28 9.483 8.43 11.426a.199.199 0 0 0 .14 0C17.22 19.483 20.5 15.461 20.5 10V4.976a.25.25 0 0 0-.173-.237l-8.25-2.676a.253.253 0 0 0-.154 0Z"></path> </svg> <div> <div class="color-fg-default h4">Security</div> Find and fix vulnerabilities </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;actions&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;actions_link_product_navbar&quot;}" href="https://github.com/features/actions"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-workflow color-fg-subtle mr-3"> <path d="M1 3a2 2 0 0 1 2-2h6.5a2 2 0 0 1 2 2v6.5a2 2 0 0 1-2 2H7v4.063C7 16.355 7.644 17 8.438 17H12.5v-2.5a2 2 0 0 1 2-2H21a2 2 0 0 1 2 2V21a2 2 0 0 1-2 2h-6.5a2 2 0 0 1-2-2v-2.5H8.437A2.939 2.939 0 0 1 5.5 15.562V11.5H3a2 2 0 0 1-2-2Zm2-.5a.5.5 0 0 0-.5.5v6.5a.5.5 0 0 0 .5.5h6.5a.5.5 0 0 0 .5-.5V3a.5.5 0 0 0-.5-.5ZM14.5 14a.5.5 0 0 0-.5.5V21a.5.5 0 0 0 .5.5H21a.5.5 0 0 0 .5-.5v-6.5a.5.5 0 0 0-.5-.5Z"></path> </svg> <div> <div class="color-fg-default h4">Actions</div> Automate any workflow </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;codespaces&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;codespaces_link_product_navbar&quot;}" href="https://github.com/features/codespaces"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-codespaces color-fg-subtle mr-3"> <path d="M3.5 3.75C3.5 2.784 4.284 2 5.25 2h13.5c.966 0 1.75.784 1.75 1.75v7.5A1.75 1.75 0 0 1 18.75 13H5.25a1.75 1.75 0 0 1-1.75-1.75Zm-2 12c0-.966.784-1.75 1.75-1.75h17.5c.966 0 1.75.784 1.75 1.75v4a1.75 1.75 0 0 1-1.75 1.75H3.25a1.75 1.75 0 0 1-1.75-1.75ZM5.25 3.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h13.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Zm-2 12a.25.25 0 0 0-.25.25v4c0 .138.112.25.25.25h17.5a.25.25 0 0 0 .25-.25v-4a.25.25 0 0 0-.25-.25Z"></path><path d="M10 17.75a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1-.75-.75Zm-4 0a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1-.75-.75Z"></path> </svg> <div> <div class="color-fg-default h4">Codespaces</div> Instant dev environments </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;issues&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;issues_link_product_navbar&quot;}" href="https://github.com/features/issues"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-issue-opened color-fg-subtle mr-3"> <path d="M12 1c6.075 0 11 4.925 11 11s-4.925 11-11 11S1 18.075 1 12 5.925 1 12 1ZM2.5 12a9.5 9.5 0 0 0 9.5 9.5 9.5 9.5 0 0 0 9.5-9.5A9.5 9.5 0 0 0 12 2.5 9.5 9.5 0 0 0 2.5 12Zm9.5 2a2 2 0 1 1-.001-3.999A2 2 0 0 1 12 14Z"></path> </svg> <div> <div class="color-fg-default h4">Issues</div> Plan and track work </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;code_review&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;code_review_link_product_navbar&quot;}" href="https://github.com/features/code-review"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-code-review color-fg-subtle mr-3"> <path d="M10.3 6.74a.75.75 0 0 1-.04 1.06l-2.908 2.7 2.908 2.7a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 0 1 1.06.04Zm3.44 1.06a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.908-2.7-2.908-2.7Z"></path><path d="M1.5 4.25c0-.966.784-1.75 1.75-1.75h17.5c.966 0 1.75.784 1.75 1.75v12.5a1.75 1.75 0 0 1-1.75 1.75h-9.69l-3.573 3.573A1.458 1.458 0 0 1 5 21.043V18.5H3.25a1.75 1.75 0 0 1-1.75-1.75ZM3.25 4a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h2.5a.75.75 0 0 1 .75.75v3.19l3.72-3.72a.749.749 0 0 1 .53-.22h10a.25.25 0 0 0 .25-.25V4.25a.25.25 0 0 0-.25-.25Z"></path> </svg> <div> <div class="color-fg-default h4">Code Review</div> Manage code changes </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;discussions&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;discussions_link_product_navbar&quot;}" href="https://github.com/features/discussions"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-comment-discussion color-fg-subtle mr-3"> <path d="M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 14.25 14H8.061l-2.574 2.573A1.458 1.458 0 0 1 3 15.543V14H1.75A1.75 1.75 0 0 1 0 12.25v-9.5C0 1.784.784 1 1.75 1ZM1.5 2.75v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Z"></path><path d="M22.5 8.75a.25.25 0 0 0-.25-.25h-3.5a.75.75 0 0 1 0-1.5h3.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 22.25 20H21v1.543a1.457 1.457 0 0 1-2.487 1.03L15.939 20H10.75A1.75 1.75 0 0 1 9 18.25v-1.465a.75.75 0 0 1 1.5 0v1.465c0 .138.112.25.25.25h5.5a.75.75 0 0 1 .53.22l2.72 2.72v-2.19a.75.75 0 0 1 .75-.75h2a.25.25 0 0 0 .25-.25v-9.5Z"></path> </svg> <div> <div class="color-fg-default h4">Discussions</div> Collaborate outside of code </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;code_search&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;code_search_link_product_navbar&quot;}" href="https://github.com/features/code-search"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-code-square color-fg-subtle mr-3"> <path d="M10.3 8.24a.75.75 0 0 1-.04 1.06L7.352 12l2.908 2.7a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 0 1 1.06.04Zm3.44 1.06a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.908-2.7-2.908-2.7Z"></path><path d="M2 3.75C2 2.784 2.784 2 3.75 2h16.5c.966 0 1.75.784 1.75 1.75v16.5A1.75 1.75 0 0 1 20.25 22H3.75A1.75 1.75 0 0 1 2 20.25Zm1.75-.25a.25.25 0 0 0-.25.25v16.5c0 .138.112.25.25.25h16.5a.25.25 0 0 0 .25-.25V3.75a.25.25 0 0 0-.25-.25Z"></path> </svg> <div> <div class="color-fg-default h4">Code Search</div> Find more, search less </div> </a></li> </ul> </div> </div> <div class="HeaderMenu-column px-lg-4"> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0 border-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="product-explore-heading">Explore</span> <ul class="list-style-none f5" aria-labelledby="product-explore-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;all_features&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;all_features_link_product_navbar&quot;}" href="https://github.com/features"> All features </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary Link--external" target="_blank" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;documentation&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;documentation_link_product_navbar&quot;}" href="https://docs.github.com"> Documentation <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path> </svg> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary Link--external" target="_blank" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;github_skills&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;github_skills_link_product_navbar&quot;}" href="https://skills.github.com"> GitHub Skills <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path> </svg> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary Link--external" target="_blank" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;blog&quot;,&quot;context&quot;:&quot;product&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;blog_link_product_navbar&quot;}" href="https://github.blog"> Blog <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path> </svg> </a></li> </ul> </div> </div> </div> </li> <li class="HeaderMenu-item position-relative flex-wrap flex-justify-between flex-items-center d-block d-lg-flex flex-lg-nowrap flex-lg-items-center js-details-container js-header-menu-item"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Solutions <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path> </svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 pt-2 pt-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 d-lg-flex flex-wrap dropdown-menu-wide"> <div class="HeaderMenu-column px-lg-4 border-lg-right mb-4 mb-lg-0 pr-lg-7"> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0 pb-lg-3 mb-3 mb-lg-0"> <span class="d-block h4 color-fg-default my-1" id="solutions-by-company-size-heading">By company size</span> <ul class="list-style-none f5" aria-labelledby="solutions-by-company-size-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;enterprises&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;enterprises_link_solutions_navbar&quot;}" href="https://github.com/enterprise"> Enterprises </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;small_and_medium_teams&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;small_and_medium_teams_link_solutions_navbar&quot;}" href="https://github.com/team"> Small and medium teams </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;startups&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;startups_link_solutions_navbar&quot;}" href="https://github.com/enterprise/startups"> Startups </a></li> </ul> </div> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="solutions-by-use-case-heading">By use case</span> <ul class="list-style-none f5" aria-labelledby="solutions-by-use-case-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;devsecops&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;devsecops_link_solutions_navbar&quot;}" href="/solutions/use-case/devsecops"> DevSecOps </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;devops&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;devops_link_solutions_navbar&quot;}" href="/solutions/use-case/devops"> DevOps </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;ci_cd&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;ci_cd_link_solutions_navbar&quot;}" href="/solutions/use-case/ci-cd"> CI/CD </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;view_all_use_cases&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;view_all_use_cases_link_solutions_navbar&quot;}" href="/solutions/use-case"> View all use cases </a></li> </ul> </div> </div> <div class="HeaderMenu-column px-lg-4"> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="solutions-by-industry-heading">By industry</span> <ul class="list-style-none f5" aria-labelledby="solutions-by-industry-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;healthcare&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;healthcare_link_solutions_navbar&quot;}" href="/solutions/industry/healthcare"> Healthcare </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;financial_services&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;financial_services_link_solutions_navbar&quot;}" href="/solutions/industry/financial-services"> Financial services </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;manufacturing&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;manufacturing_link_solutions_navbar&quot;}" href="/solutions/industry/manufacturing"> Manufacturing </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;government&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;government_link_solutions_navbar&quot;}" href="/solutions/industry/government"> Government </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;view_all_industries&quot;,&quot;context&quot;:&quot;solutions&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;view_all_industries_link_solutions_navbar&quot;}" href="/solutions/industry"> View all industries </a></li> </ul> </div> </div> <div class="HeaderMenu-trailing-link rounded-bottom-2 flex-shrink-0 mt-lg-4 px-lg-4 py-4 py-lg-3 f5 text-semibold"> <a href="/solutions"> View all solutions <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-right HeaderMenu-trailing-link-icon"> <path d="M6.22 3.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L9.94 8 6.22 4.28a.75.75 0 0 1 0-1.06Z"></path> </svg> </a> </div> </div> </li> <li class="HeaderMenu-item position-relative flex-wrap flex-justify-between flex-items-center d-block d-lg-flex flex-lg-nowrap flex-lg-items-center js-details-container js-header-menu-item"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Resources <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path> </svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 pt-2 pt-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 pb-2 pb-lg-4 d-lg-flex flex-wrap dropdown-menu-wide"> <div class="HeaderMenu-column px-lg-4 border-lg-right mb-4 mb-lg-0 pr-lg-7"> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="resources-topics-heading">Topics</span> <ul class="list-style-none f5" aria-labelledby="resources-topics-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;ai&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;ai_link_resources_navbar&quot;}" href="/resources/articles/ai"> AI </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;devops&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;devops_link_resources_navbar&quot;}" href="/resources/articles/devops"> DevOps </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;security&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;security_link_resources_navbar&quot;}" href="/resources/articles/security"> Security </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;software_development&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;software_development_link_resources_navbar&quot;}" href="/resources/articles/software-development"> Software Development </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;view_all&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;view_all_link_resources_navbar&quot;}" href="/resources/articles"> View all </a></li> </ul> </div> </div> <div class="HeaderMenu-column px-lg-4"> <div class="border-bottom pb-3 pb-lg-0 border-lg-bottom-0 border-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="resources-explore-heading">Explore</span> <ul class="list-style-none f5" aria-labelledby="resources-explore-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary Link--external" target="_blank" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;learning_pathways&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;learning_pathways_link_resources_navbar&quot;}" href="https://resources.github.com/learn/pathways"> Learning Pathways <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path> </svg> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary Link--external" target="_blank" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;white_papers_ebooks_webinars&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;white_papers_ebooks_webinars_link_resources_navbar&quot;}" href="https://resources.github.com"> White papers, Ebooks, Webinars <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path> </svg> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;customer_stories&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;customer_stories_link_resources_navbar&quot;}" href="https://github.com/customer-stories"> Customer Stories </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary Link--external" target="_blank" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;partners&quot;,&quot;context&quot;:&quot;resources&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;partners_link_resources_navbar&quot;}" href="https://partner.github.com"> Partners <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path> </svg> </a></li> </ul> </div> </div> </div> </li> <li class="HeaderMenu-item position-relative flex-wrap flex-justify-between flex-items-center d-block d-lg-flex flex-lg-nowrap flex-lg-items-center js-details-container js-header-menu-item"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Open Source <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path> </svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 pt-2 pt-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 pb-2 pb-lg-4 px-lg-4"> <div class="HeaderMenu-column"> <div class="border-bottom pb-3 pb-lg-0 pb-lg-3 mb-3 mb-lg-0 mb-lg-3"> <ul class="list-style-none f5" > <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;github_sponsors&quot;,&quot;context&quot;:&quot;open_source&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;github_sponsors_link_open_source_navbar&quot;}" href="/sponsors"> <div> <div class="color-fg-default h4">GitHub Sponsors</div> Fund open source developers </div> </a></li> </ul> </div> <div class="border-bottom pb-3 pb-lg-0 pb-lg-3 mb-3 mb-lg-0 mb-lg-3"> <ul class="list-style-none f5" > <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;the_readme_project&quot;,&quot;context&quot;:&quot;open_source&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;the_readme_project_link_open_source_navbar&quot;}" href="https://github.com/readme"> <div> <div class="color-fg-default h4">The ReadME Project</div> GitHub community articles </div> </a></li> </ul> </div> <div class="border-bottom pb-3 pb-lg-0 border-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="open-source-repositories-heading">Repositories</span> <ul class="list-style-none f5" aria-labelledby="open-source-repositories-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;topics&quot;,&quot;context&quot;:&quot;open_source&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;topics_link_open_source_navbar&quot;}" href="https://github.com/topics"> Topics </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;trending&quot;,&quot;context&quot;:&quot;open_source&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;trending_link_open_source_navbar&quot;}" href="https://github.com/trending"> Trending </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;collections&quot;,&quot;context&quot;:&quot;open_source&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;collections_link_open_source_navbar&quot;}" href="https://github.com/collections"> Collections </a></li> </ul> </div> </div> </div> </li> <li class="HeaderMenu-item position-relative flex-wrap flex-justify-between flex-items-center d-block d-lg-flex flex-lg-nowrap flex-lg-items-center js-details-container js-header-menu-item"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Enterprise <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path> </svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 pt-2 pt-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 pb-2 pb-lg-4 px-lg-4"> <div class="HeaderMenu-column"> <div class="border-bottom pb-3 pb-lg-0 pb-lg-3 mb-3 mb-lg-0 mb-lg-3"> <ul class="list-style-none f5" > <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;enterprise_platform&quot;,&quot;context&quot;:&quot;enterprise&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;enterprise_platform_link_enterprise_navbar&quot;}" href="/enterprise"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-stack color-fg-subtle mr-3"> <path d="M11.063 1.456a1.749 1.749 0 0 1 1.874 0l8.383 5.316a1.751 1.751 0 0 1 0 2.956l-8.383 5.316a1.749 1.749 0 0 1-1.874 0L2.68 9.728a1.751 1.751 0 0 1 0-2.956Zm1.071 1.267a.25.25 0 0 0-.268 0L3.483 8.039a.25.25 0 0 0 0 .422l8.383 5.316a.25.25 0 0 0 .268 0l8.383-5.316a.25.25 0 0 0 0-.422Z"></path><path d="M1.867 12.324a.75.75 0 0 1 1.035-.232l8.964 5.685a.25.25 0 0 0 .268 0l8.964-5.685a.75.75 0 0 1 .804 1.267l-8.965 5.685a1.749 1.749 0 0 1-1.874 0l-8.965-5.685a.75.75 0 0 1-.231-1.035Z"></path><path d="M1.867 16.324a.75.75 0 0 1 1.035-.232l8.964 5.685a.25.25 0 0 0 .268 0l8.964-5.685a.75.75 0 0 1 .804 1.267l-8.965 5.685a1.749 1.749 0 0 1-1.874 0l-8.965-5.685a.75.75 0 0 1-.231-1.035Z"></path> </svg> <div> <div class="color-fg-default h4">Enterprise platform</div> AI-powered developer platform </div> </a></li> </ul> </div> <div class="border-bottom pb-3 pb-lg-0 border-bottom-0"> <span class="d-block h4 color-fg-default my-1" id="enterprise-available-add-ons-heading">Available add-ons</span> <ul class="list-style-none f5" aria-labelledby="enterprise-available-add-ons-heading"> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;advanced_security&quot;,&quot;context&quot;:&quot;enterprise&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;advanced_security_link_enterprise_navbar&quot;}" href="https://github.com/enterprise/advanced-security"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-shield-check color-fg-subtle mr-3"> <path d="M16.53 9.78a.75.75 0 0 0-1.06-1.06L11 13.19l-1.97-1.97a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.06 0l5-5Z"></path><path d="m12.54.637 8.25 2.675A1.75 1.75 0 0 1 22 4.976V10c0 6.19-3.771 10.704-9.401 12.83a1.704 1.704 0 0 1-1.198 0C5.77 20.705 2 16.19 2 10V4.976c0-.758.489-1.43 1.21-1.664L11.46.637a1.748 1.748 0 0 1 1.08 0Zm-.617 1.426-8.25 2.676a.249.249 0 0 0-.173.237V10c0 5.46 3.28 9.483 8.43 11.426a.199.199 0 0 0 .14 0C17.22 19.483 20.5 15.461 20.5 10V4.976a.25.25 0 0 0-.173-.237l-8.25-2.676a.253.253 0 0 0-.154 0Z"></path> </svg> <div> <div class="color-fg-default h4">Advanced Security</div> Enterprise-grade security features </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description pb-lg-3" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;github_copilot&quot;,&quot;context&quot;:&quot;enterprise&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;github_copilot_link_enterprise_navbar&quot;}" href="/features/copilot#enterprise"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-copilot color-fg-subtle mr-3"> <path d="M23.922 16.992c-.861 1.495-5.859 5.023-11.922 5.023-6.063 0-11.061-3.528-11.922-5.023A.641.641 0 0 1 0 16.736v-2.869a.841.841 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.195 10.195 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952 1.399-1.136 3.392-2.093 6.122-2.093 2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.832.832 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256ZM12.172 11h-.344a4.323 4.323 0 0 1-.355.508C10.703 12.455 9.555 13 7.965 13c-1.725 0-2.989-.359-3.782-1.259a2.005 2.005 0 0 1-.085-.104L4 11.741v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.323 4.323 0 0 1-.355-.508h-.016.016Zm.641-2.935c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z"></path><path d="M14.5 14.25a1 1 0 0 1 1 1v2a1 1 0 0 1-2 0v-2a1 1 0 0 1 1-1Zm-5 0a1 1 0 0 1 1 1v2a1 1 0 0 1-2 0v-2a1 1 0 0 1 1-1Z"></path> </svg> <div> <div class="color-fg-default h4">GitHub Copilot</div> Enterprise-grade AI features </div> </a></li> <li> <a class="HeaderMenu-dropdown-link d-block no-underline position-relative py-2 Link--secondary d-flex flex-items-center Link--has-description" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;premium_support&quot;,&quot;context&quot;:&quot;enterprise&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;premium_support_link_enterprise_navbar&quot;}" href="/premium-support"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-comment-discussion color-fg-subtle mr-3"> <path d="M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 14.25 14H8.061l-2.574 2.573A1.458 1.458 0 0 1 3 15.543V14H1.75A1.75 1.75 0 0 1 0 12.25v-9.5C0 1.784.784 1 1.75 1ZM1.5 2.75v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Z"></path><path d="M22.5 8.75a.25.25 0 0 0-.25-.25h-3.5a.75.75 0 0 1 0-1.5h3.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 22.25 20H21v1.543a1.457 1.457 0 0 1-2.487 1.03L15.939 20H10.75A1.75 1.75 0 0 1 9 18.25v-1.465a.75.75 0 0 1 1.5 0v1.465c0 .138.112.25.25.25h5.5a.75.75 0 0 1 .53.22l2.72 2.72v-2.19a.75.75 0 0 1 .75-.75h2a.25.25 0 0 0 .25-.25v-9.5Z"></path> </svg> <div> <div class="color-fg-default h4">Premium Support</div> Enterprise-grade 24/7 support </div> </a></li> </ul> </div> </div> </div> </li> <li class="HeaderMenu-item position-relative flex-wrap flex-justify-between flex-items-center d-block d-lg-flex flex-lg-nowrap flex-lg-items-center js-details-container js-header-menu-item"> <a class="HeaderMenu-link no-underline px-0 px-lg-2 py-3 py-lg-2 d-block d-lg-inline-block" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;pricing&quot;,&quot;context&quot;:&quot;global&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;pricing_link_global_navbar&quot;}" href="https://github.com/pricing">Pricing</a> </li> </ul> </nav> <div class="d-flex flex-column flex-lg-row width-full flex-justify-end flex-lg-items-center text-center mt-3 mt-lg-0 text-lg-left ml-lg-3"> <qbsearch-input class="search-input" data-scope="repo:golang/go" data-custom-scopes-path="/search/custom_scopes" data-delete-custom-scopes-csrf="H1kGGeC6DNFPFfxfExtWb3pxYX6DMdUBkOzt3ijo-CBrG0D0Gw3_hjWlK7XMgbNdWRYjfAowu9Fik3iT5bsAMg" data-max-custom-scopes="10" data-header-redesign-enabled="false" data-initial-value="" data-blackbird-suggestions-path="/search/suggestions" data-jump-to-suggestions-path="/_graphql/GetSuggestedNavigationDestinations" data-current-repository="golang/go" data-current-org="golang" data-current-owner="" data-logged-in="false" data-copilot-chat-enabled="false" data-nl-search-enabled="false" data-retain-scroll-position="true"> <div class="search-input-container search-with-dialog position-relative d-flex flex-row flex-items-center mr-4 rounded" data-action="click:qbsearch-input#searchInputContainerClicked" > <button type="button" class="header-search-button placeholder input-button form-control d-flex flex-1 flex-self-stretch flex-items-center no-wrap width-full py-0 pl-2 pr-0 text-left border-0 box-shadow-none" data-target="qbsearch-input.inputButton" aria-label="Search or jump to…" aria-haspopup="dialog" placeholder="Search or jump to..." data-hotkey=s,/ autocapitalize="off" data-analytics-event="{&quot;location&quot;:&quot;navbar&quot;,&quot;action&quot;:&quot;searchbar&quot;,&quot;context&quot;:&quot;global&quot;,&quot;tag&quot;:&quot;input&quot;,&quot;label&quot;:&quot;searchbar_input_global_navbar&quot;}" data-action="click:qbsearch-input#handleExpand" > <div class="mr-2 color-fg-muted"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path> </svg> </div> <span class="flex-1" data-target="qbsearch-input.inputButtonText">Search or jump to...</span> <div class="d-flex" data-target="qbsearch-input.hotkeyIndicator"> <svg xmlns="http://www.w3.org/2000/svg" width="22" height="20" aria-hidden="true" class="mr-1"><path fill="none" stroke="#979A9C" opacity=".4" d="M3.5.5h12c1.7 0 3 1.3 3 3v13c0 1.7-1.3 3-3 3h-12c-1.7 0-3-1.3-3-3v-13c0-1.7 1.3-3 3-3z"></path><path fill="#979A9C" d="M11.8 6L8 15.1h-.9L10.8 6h1z"></path></svg> </div> </button> <input type="hidden" name="type" class="js-site-search-type-field"> <div class="Overlay--hidden " data-modal-dialog-overlay> <modal-dialog data-action="close:qbsearch-input#handleClose cancel:qbsearch-input#handleClose" data-target="qbsearch-input.searchSuggestionsDialog" role="dialog" id="search-suggestions-dialog" aria-modal="true" aria-labelledby="search-suggestions-dialog-header" data-view-component="true" class="Overlay Overlay--width-large Overlay--height-auto"> <h1 id="search-suggestions-dialog-header" class="sr-only">Search code, repositories, users, issues, pull requests...</h1> <div class="Overlay-body Overlay-body--paddingNone"> <div data-view-component="true"> <div class="search-suggestions position-fixed width-full color-shadow-large border color-fg-default color-bg-default overflow-hidden d-flex flex-column query-builder-container" style="border-radius: 12px;" data-target="qbsearch-input.queryBuilderContainer" hidden > <!-- '"` --><!-- </textarea></xmp> --></option></form><form id="query-builder-test-form" action="" accept-charset="UTF-8" method="get"> <query-builder data-target="qbsearch-input.queryBuilder" id="query-builder-query-builder-test" data-filter-key=":" data-view-component="true" class="QueryBuilder search-query-builder"> <div class="FormControl FormControl--fullWidth"> <label id="query-builder-test-label" for="query-builder-test" class="FormControl-label sr-only"> Search </label> <div class="QueryBuilder-StyledInput width-fit " data-target="query-builder.styledInput" > <span id="query-builder-test-leadingvisual-wrap" class="FormControl-input-leadingVisualWrap QueryBuilder-leadingVisualWrap"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search FormControl-input-leadingVisual"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path> </svg> </span> <div data-target="query-builder.styledInputContainer" class="QueryBuilder-StyledInputContainer"> <div aria-hidden="true" class="QueryBuilder-StyledInputContent" data-target="query-builder.styledInputContent" ></div> <div class="QueryBuilder-InputWrapper"> <div aria-hidden="true" class="QueryBuilder-Sizer" data-target="query-builder.sizer"></div> <input id="query-builder-test" name="query-builder-test" value="" autocomplete="off" type="text" role="combobox" spellcheck="false" aria-expanded="false" aria-describedby="validation-54dcb3cb-5b0c-4d3c-af1d-fb85959230f3" data-target="query-builder.input" data-action=" input:query-builder#inputChange blur:query-builder#inputBlur keydown:query-builder#inputKeydown focus:query-builder#inputFocus " data-view-component="true" class="FormControl-input QueryBuilder-Input FormControl-medium" /> </div> </div> <span class="sr-only" id="query-builder-test-clear">Clear</span> <button role="button" id="query-builder-test-clear-button" aria-labelledby="query-builder-test-clear query-builder-test-label" data-target="query-builder.clearButton" data-action=" click:query-builder#clear focus:query-builder#clearButtonFocus blur:query-builder#clearButtonBlur " variant="small" hidden="hidden" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium mr-1 px-2 py-0 d-flex flex-items-center rounded-1 color-fg-muted"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x-circle-fill Button-visual"> <path d="M2.343 13.657A8 8 0 1 1 13.658 2.343 8 8 0 0 1 2.343 13.657ZM6.03 4.97a.751.751 0 0 0-1.042.018.751.751 0 0 0-.018 1.042L6.94 8 4.97 9.97a.749.749 0 0 0 .326 1.275.749.749 0 0 0 .734-.215L8 9.06l1.97 1.97a.749.749 0 0 0 1.275-.326.749.749 0 0 0-.215-.734L9.06 8l1.97-1.97a.749.749 0 0 0-.326-1.275.749.749 0 0 0-.734.215L8 6.94Z"></path> </svg> </button> </div> <template id="search-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path> </svg> </template> <template id="code-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code"> <path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path> </svg> </template> <template id="file-code-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file-code"> <path d="M4 1.75C4 .784 4.784 0 5.75 0h5.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v8.586A1.75 1.75 0 0 1 14.25 15h-9a.75.75 0 0 1 0-1.5h9a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 10 4.25V1.5H5.75a.25.25 0 0 0-.25.25v2.5a.75.75 0 0 1-1.5 0Zm1.72 4.97a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1 0 1.06l-2 2a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l1.47-1.47-1.47-1.47a.75.75 0 0 1 0-1.06ZM3.28 7.78 1.81 9.25l1.47 1.47a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018l-2-2a.75.75 0 0 1 0-1.06l2-2a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Zm8.22-6.218V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path> </svg> </template> <template id="history-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-history"> <path d="m.427 1.927 1.215 1.215a8.002 8.002 0 1 1-1.6 5.685.75.75 0 1 1 1.493-.154 6.5 6.5 0 1 0 1.18-4.458l1.358 1.358A.25.25 0 0 1 3.896 6H.25A.25.25 0 0 1 0 5.75V2.104a.25.25 0 0 1 .427-.177ZM7.75 4a.75.75 0 0 1 .75.75v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5A.75.75 0 0 1 7.75 4Z"></path> </svg> </template> <template id="repo-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path> </svg> </template> <template id="bookmark-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bookmark"> <path d="M3 2.75C3 1.784 3.784 1 4.75 1h6.5c.966 0 1.75.784 1.75 1.75v11.5a.75.75 0 0 1-1.227.579L8 11.722l-3.773 3.107A.751.751 0 0 1 3 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.91l3.023-2.489a.75.75 0 0 1 .954 0l3.023 2.49V2.75a.25.25 0 0 0-.25-.25Z"></path> </svg> </template> <template id="plus-circle-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-plus-circle"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm7.25-3.25v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5a.75.75 0 0 1 1.5 0Z"></path> </svg> </template> <template id="circle-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-dot-fill"> <path d="M8 4a4 4 0 1 1 0 8 4 4 0 0 1 0-8Z"></path> </svg> </template> <template id="trash-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-trash"> <path d="M11 1.75V3h2.25a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1 0-1.5H5V1.75C5 .784 5.784 0 6.75 0h2.5C10.216 0 11 .784 11 1.75ZM4.496 6.675l.66 6.6a.25.25 0 0 0 .249.225h5.19a.25.25 0 0 0 .249-.225l.66-6.6a.75.75 0 0 1 1.492.149l-.66 6.6A1.748 1.748 0 0 1 10.595 15h-5.19a1.75 1.75 0 0 1-1.741-1.575l-.66-6.6a.75.75 0 1 1 1.492-.15ZM6.5 1.75V3h3V1.75a.25.25 0 0 0-.25-.25h-2.5a.25.25 0 0 0-.25.25Z"></path> </svg> </template> <template id="team-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-people"> <path d="M2 5.5a3.5 3.5 0 1 1 5.898 2.549 5.508 5.508 0 0 1 3.034 4.084.75.75 0 1 1-1.482.235 4 4 0 0 0-7.9 0 .75.75 0 0 1-1.482-.236A5.507 5.507 0 0 1 3.102 8.05 3.493 3.493 0 0 1 2 5.5ZM11 4a3.001 3.001 0 0 1 2.22 5.018 5.01 5.01 0 0 1 2.56 3.012.749.749 0 0 1-.885.954.752.752 0 0 1-.549-.514 3.507 3.507 0 0 0-2.522-2.372.75.75 0 0 1-.574-.73v-.352a.75.75 0 0 1 .416-.672A1.5 1.5 0 0 0 11 5.5.75.75 0 0 1 11 4Zm-5.5-.5a2 2 0 1 0-.001 3.999A2 2 0 0 0 5.5 3.5Z"></path> </svg> </template> <template id="project-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path> </svg> </template> <template id="pencil-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-pencil"> <path d="M11.013 1.427a1.75 1.75 0 0 1 2.474 0l1.086 1.086a1.75 1.75 0 0 1 0 2.474l-8.61 8.61c-.21.21-.47.364-.756.445l-3.251.93a.75.75 0 0 1-.927-.928l.929-3.25c.081-.286.235-.547.445-.758l8.61-8.61Zm.176 4.823L9.75 4.81l-6.286 6.287a.253.253 0 0 0-.064.108l-.558 1.953 1.953-.558a.253.253 0 0 0 .108-.064Zm1.238-3.763a.25.25 0 0 0-.354 0L10.811 3.75l1.439 1.44 1.263-1.263a.25.25 0 0 0 0-.354Z"></path> </svg> </template> <template id="copilot-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copilot"> <path d="M7.998 15.035c-4.562 0-7.873-2.914-7.998-3.749V9.338c.085-.628.677-1.686 1.588-2.065.013-.07.024-.143.036-.218.029-.183.06-.384.126-.612-.201-.508-.254-1.084-.254-1.656 0-.87.128-1.769.693-2.484.579-.733 1.494-1.124 2.724-1.261 1.206-.134 2.262.034 2.944.765.05.053.096.108.139.165.044-.057.094-.112.143-.165.682-.731 1.738-.899 2.944-.765 1.23.137 2.145.528 2.724 1.261.566.715.693 1.614.693 2.484 0 .572-.053 1.148-.254 1.656.066.228.098.429.126.612.012.076.024.148.037.218.924.385 1.522 1.471 1.591 2.095v1.872c0 .766-3.351 3.795-8.002 3.795Zm0-1.485c2.28 0 4.584-1.11 5.002-1.433V7.862l-.023-.116c-.49.21-1.075.291-1.727.291-1.146 0-2.059-.327-2.71-.991A3.222 3.222 0 0 1 8 6.303a3.24 3.24 0 0 1-.544.743c-.65.664-1.563.991-2.71.991-.652 0-1.236-.081-1.727-.291l-.023.116v4.255c.419.323 2.722 1.433 5.002 1.433ZM6.762 2.83c-.193-.206-.637-.413-1.682-.297-1.019.113-1.479.404-1.713.7-.247.312-.369.789-.369 1.554 0 .793.129 1.171.308 1.371.162.181.519.379 1.442.379.853 0 1.339-.235 1.638-.54.315-.322.527-.827.617-1.553.117-.935-.037-1.395-.241-1.614Zm4.155-.297c-1.044-.116-1.488.091-1.681.297-.204.219-.359.679-.242 1.614.091.726.303 1.231.618 1.553.299.305.784.54 1.638.54.922 0 1.28-.198 1.442-.379.179-.2.308-.578.308-1.371 0-.765-.123-1.242-.37-1.554-.233-.296-.693-.587-1.713-.7Z"></path><path d="M6.25 9.037a.75.75 0 0 1 .75.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 .75-.75Zm4.25.75v1.501a.75.75 0 0 1-1.5 0V9.787a.75.75 0 0 1 1.5 0Z"></path> </svg> </template> <template id="copilot-error-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copilot-error"> <path d="M16 11.24c0 .112-.072.274-.21.467L13 9.688V7.862l-.023-.116c-.49.21-1.075.291-1.727.291-.198 0-.388-.009-.571-.029L6.833 5.226a4.01 4.01 0 0 0 .17-.782c.117-.935-.037-1.395-.241-1.614-.193-.206-.637-.413-1.682-.297-.683.076-1.115.231-1.395.415l-1.257-.91c.579-.564 1.413-.877 2.485-.996 1.206-.134 2.262.034 2.944.765.05.053.096.108.139.165.044-.057.094-.112.143-.165.682-.731 1.738-.899 2.944-.765 1.23.137 2.145.528 2.724 1.261.566.715.693 1.614.693 2.484 0 .572-.053 1.148-.254 1.656.066.228.098.429.126.612.012.076.024.148.037.218.924.385 1.522 1.471 1.591 2.095Zm-5.083-8.707c-1.044-.116-1.488.091-1.681.297-.204.219-.359.679-.242 1.614.091.726.303 1.231.618 1.553.299.305.784.54 1.638.54.922 0 1.28-.198 1.442-.379.179-.2.308-.578.308-1.371 0-.765-.123-1.242-.37-1.554-.233-.296-.693-.587-1.713-.7Zm2.511 11.074c-1.393.776-3.272 1.428-5.43 1.428-4.562 0-7.873-2.914-7.998-3.749V9.338c.085-.628.677-1.686 1.588-2.065.013-.07.024-.143.036-.218.029-.183.06-.384.126-.612-.18-.455-.241-.963-.252-1.475L.31 4.107A.747.747 0 0 1 0 3.509V3.49a.748.748 0 0 1 .625-.73c.156-.026.306.047.435.139l14.667 10.578a.592.592 0 0 1 .227.264.752.752 0 0 1 .046.249v.022a.75.75 0 0 1-1.19.596Zm-1.367-.991L5.635 7.964a5.128 5.128 0 0 1-.889.073c-.652 0-1.236-.081-1.727-.291l-.023.116v4.255c.419.323 2.722 1.433 5.002 1.433 1.539 0 3.089-.505 4.063-.934Z"></path> </svg> </template> <template id="workflow-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-workflow"> <path d="M0 1.75C0 .784.784 0 1.75 0h3.5C6.216 0 7 .784 7 1.75v3.5A1.75 1.75 0 0 1 5.25 7H4v4a1 1 0 0 0 1 1h4v-1.25C9 9.784 9.784 9 10.75 9h3.5c.966 0 1.75.784 1.75 1.75v3.5A1.75 1.75 0 0 1 14.25 16h-3.5A1.75 1.75 0 0 1 9 14.25v-.75H5A2.5 2.5 0 0 1 2.5 11V7h-.75A1.75 1.75 0 0 1 0 5.25Zm1.75-.25a.25.25 0 0 0-.25.25v3.5c0 .138.112.25.25.25h3.5a.25.25 0 0 0 .25-.25v-3.5a.25.25 0 0 0-.25-.25Zm9 9a.25.25 0 0 0-.25.25v3.5c0 .138.112.25.25.25h3.5a.25.25 0 0 0 .25-.25v-3.5a.25.25 0 0 0-.25-.25Z"></path> </svg> </template> <template id="book-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-book"> <path d="M0 1.75A.75.75 0 0 1 .75 1h4.253c1.227 0 2.317.59 3 1.501A3.743 3.743 0 0 1 11.006 1h4.245a.75.75 0 0 1 .75.75v10.5a.75.75 0 0 1-.75.75h-4.507a2.25 2.25 0 0 0-1.591.659l-.622.621a.75.75 0 0 1-1.06 0l-.622-.621A2.25 2.25 0 0 0 5.258 13H.75a.75.75 0 0 1-.75-.75Zm7.251 10.324.004-5.073-.002-2.253A2.25 2.25 0 0 0 5.003 2.5H1.5v9h3.757a3.75 3.75 0 0 1 1.994.574ZM8.755 4.75l-.004 7.322a3.752 3.752 0 0 1 1.992-.572H14.5v-9h-3.495a2.25 2.25 0 0 0-2.25 2.25Z"></path> </svg> </template> <template id="code-review-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code-review"> <path d="M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0 1 14.25 13H8.061l-2.574 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25v-8.5C0 1.784.784 1 1.75 1ZM1.5 2.75v8.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-8.5a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Zm5.28 1.72a.75.75 0 0 1 0 1.06L5.31 7l1.47 1.47a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018l-2-2a.75.75 0 0 1 0-1.06l2-2a.75.75 0 0 1 1.06 0Zm2.44 0a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1 0 1.06l-2 2a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L10.69 7 9.22 5.53a.75.75 0 0 1 0-1.06Z"></path> </svg> </template> <template id="codespaces-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-codespaces"> <path d="M0 11.25c0-.966.784-1.75 1.75-1.75h12.5c.966 0 1.75.784 1.75 1.75v3A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25Zm2-9.5C2 .784 2.784 0 3.75 0h8.5C13.216 0 14 .784 14 1.75v5a1.75 1.75 0 0 1-1.75 1.75h-8.5A1.75 1.75 0 0 1 2 6.75Zm1.75-.25a.25.25 0 0 0-.25.25v5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-5a.25.25 0 0 0-.25-.25Zm-2 9.5a.25.25 0 0 0-.25.25v3c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-3a.25.25 0 0 0-.25-.25Z"></path><path d="M7 12.75a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75Zm-4 0a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1-.75-.75Z"></path> </svg> </template> <template id="comment-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-comment"> <path d="M1 2.75C1 1.784 1.784 1 2.75 1h10.5c.966 0 1.75.784 1.75 1.75v7.5A1.75 1.75 0 0 1 13.25 12H9.06l-2.573 2.573A1.458 1.458 0 0 1 4 13.543V12H2.75A1.75 1.75 0 0 1 1 10.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h4.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path> </svg> </template> <template id="comment-discussion-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-comment-discussion"> <path d="M1.75 1h8.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 10.25 10H7.061l-2.574 2.573A1.458 1.458 0 0 1 2 11.543V10h-.25A1.75 1.75 0 0 1 0 8.25v-5.5C0 1.784.784 1 1.75 1ZM1.5 2.75v5.5c0 .138.112.25.25.25h1a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h3.5a.25.25 0 0 0 .25-.25v-5.5a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25Zm13 2a.25.25 0 0 0-.25-.25h-.5a.75.75 0 0 1 0-1.5h.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 14.25 12H14v1.543a1.458 1.458 0 0 1-2.487 1.03L9.22 12.28a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l2.22 2.22v-2.19a.75.75 0 0 1 .75-.75h1a.25.25 0 0 0 .25-.25Z"></path> </svg> </template> <template id="organization-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-organization"> <path d="M1.75 16A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0h8.5C11.216 0 12 .784 12 1.75v12.5c0 .085-.006.168-.018.25h2.268a.25.25 0 0 0 .25-.25V8.285a.25.25 0 0 0-.111-.208l-1.055-.703a.749.749 0 1 1 .832-1.248l1.055.703c.487.325.779.871.779 1.456v5.965A1.75 1.75 0 0 1 14.25 16h-3.5a.766.766 0 0 1-.197-.026c-.099.017-.2.026-.303.026h-3a.75.75 0 0 1-.75-.75V14h-1v1.25a.75.75 0 0 1-.75.75Zm-.25-1.75c0 .138.112.25.25.25H4v-1.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 .75.75v1.25h2.25a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25ZM3.75 6h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1 0-1.5ZM3 3.75A.75.75 0 0 1 3.75 3h.5a.75.75 0 0 1 0 1.5h-.5A.75.75 0 0 1 3 3.75Zm4 3A.75.75 0 0 1 7.75 6h.5a.75.75 0 0 1 0 1.5h-.5A.75.75 0 0 1 7 6.75ZM7.75 3h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1 0-1.5ZM3 9.75A.75.75 0 0 1 3.75 9h.5a.75.75 0 0 1 0 1.5h-.5A.75.75 0 0 1 3 9.75ZM7.75 9h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1 0-1.5Z"></path> </svg> </template> <template id="rocket-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-rocket"> <path d="M14.064 0h.186C15.216 0 16 .784 16 1.75v.186a8.752 8.752 0 0 1-2.564 6.186l-.458.459c-.314.314-.641.616-.979.904v3.207c0 .608-.315 1.172-.833 1.49l-2.774 1.707a.749.749 0 0 1-1.11-.418l-.954-3.102a1.214 1.214 0 0 1-.145-.125L3.754 9.816a1.218 1.218 0 0 1-.124-.145L.528 8.717a.749.749 0 0 1-.418-1.11l1.71-2.774A1.748 1.748 0 0 1 3.31 4h3.204c.288-.338.59-.665.904-.979l.459-.458A8.749 8.749 0 0 1 14.064 0ZM8.938 3.623h-.002l-.458.458c-.76.76-1.437 1.598-2.02 2.5l-1.5 2.317 2.143 2.143 2.317-1.5c.902-.583 1.74-1.26 2.499-2.02l.459-.458a7.25 7.25 0 0 0 2.123-5.127V1.75a.25.25 0 0 0-.25-.25h-.186a7.249 7.249 0 0 0-5.125 2.123ZM3.56 14.56c-.732.732-2.334 1.045-3.005 1.148a.234.234 0 0 1-.201-.064.234.234 0 0 1-.064-.201c.103-.671.416-2.273 1.15-3.003a1.502 1.502 0 1 1 2.12 2.12Zm6.94-3.935c-.088.06-.177.118-.266.175l-2.35 1.521.548 1.783 1.949-1.2a.25.25 0 0 0 .119-.213ZM3.678 8.116 5.2 5.766c.058-.09.117-.178.176-.266H3.309a.25.25 0 0 0-.213.119l-1.2 1.95ZM12 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path> </svg> </template> <template id="shield-check-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-shield-check"> <path d="m8.533.133 5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667l5.25-1.68a1.748 1.748 0 0 1 1.066 0Zm-.61 1.429.001.001-5.25 1.68a.251.251 0 0 0-.174.237V7c0 1.36.275 2.666 1.057 3.859.784 1.194 2.121 2.342 4.366 3.298a.196.196 0 0 0 .154 0c2.245-.957 3.582-2.103 4.366-3.297C13.225 9.666 13.5 8.358 13.5 7V3.48a.25.25 0 0 0-.174-.238l-5.25-1.68a.25.25 0 0 0-.153 0ZM11.28 6.28l-3.5 3.5a.75.75 0 0 1-1.06 0l-1.5-1.5a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l.97.97 2.97-2.97a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path> </svg> </template> <template id="heart-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-heart"> <path d="m8 14.25.345.666a.75.75 0 0 1-.69 0l-.008-.004-.018-.01a7.152 7.152 0 0 1-.31-.17 22.055 22.055 0 0 1-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.066 22.066 0 0 1-3.744 2.584l-.018.01-.006.003h-.002ZM4.25 2.5c-1.336 0-2.75 1.164-2.75 3 0 2.15 1.58 4.144 3.365 5.682A20.58 20.58 0 0 0 8 13.393a20.58 20.58 0 0 0 3.135-2.211C12.92 9.644 14.5 7.65 14.5 5.5c0-1.836-1.414-3-2.75-3-1.373 0-2.609.986-3.029 2.456a.749.749 0 0 1-1.442 0C6.859 3.486 5.623 2.5 4.25 2.5Z"></path> </svg> </template> <template id="server-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-server"> <path d="M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v4c0 .372-.116.717-.314 1 .198.283.314.628.314 1v4a1.75 1.75 0 0 1-1.75 1.75H1.75A1.75 1.75 0 0 1 0 12.75v-4c0-.358.109-.707.314-1a1.739 1.739 0 0 1-.314-1v-4C0 1.784.784 1 1.75 1ZM1.5 2.75v4c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-4a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Zm.25 5.75a.25.25 0 0 0-.25.25v4c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-4a.25.25 0 0 0-.25-.25ZM7 4.75A.75.75 0 0 1 7.75 4h4.5a.75.75 0 0 1 0 1.5h-4.5A.75.75 0 0 1 7 4.75ZM7.75 10h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM3 4.75A.75.75 0 0 1 3.75 4h.5a.75.75 0 0 1 0 1.5h-.5A.75.75 0 0 1 3 4.75ZM3.75 10h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1 0-1.5Z"></path> </svg> </template> <template id="globe-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-globe"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM5.78 8.75a9.64 9.64 0 0 0 1.363 4.177c.255.426.542.832.857 1.215.245-.296.551-.705.857-1.215A9.64 9.64 0 0 0 10.22 8.75Zm4.44-1.5a9.64 9.64 0 0 0-1.363-4.177c-.307-.51-.612-.919-.857-1.215a9.927 9.927 0 0 0-.857 1.215A9.64 9.64 0 0 0 5.78 7.25Zm-5.944 1.5H1.543a6.507 6.507 0 0 0 4.666 5.5c-.123-.181-.24-.365-.352-.552-.715-1.192-1.437-2.874-1.581-4.948Zm-2.733-1.5h2.733c.144-2.074.866-3.756 1.58-4.948.12-.197.237-.381.353-.552a6.507 6.507 0 0 0-4.666 5.5Zm10.181 1.5c-.144 2.074-.866 3.756-1.58 4.948-.12.197-.237.381-.353.552a6.507 6.507 0 0 0 4.666-5.5Zm2.733-1.5a6.507 6.507 0 0 0-4.666-5.5c.123.181.24.365.353.552.714 1.192 1.436 2.874 1.58 4.948Z"></path> </svg> </template> <template id="issue-opened-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-issue-opened"> <path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path> </svg> </template> <template id="device-mobile-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-device-mobile"> <path d="M3.75 0h8.5C13.216 0 14 .784 14 1.75v12.5A1.75 1.75 0 0 1 12.25 16h-8.5A1.75 1.75 0 0 1 2 14.25V1.75C2 .784 2.784 0 3.75 0ZM3.5 1.75v12.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25ZM8 13a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path> </svg> </template> <template id="package-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-package"> <path d="m8.878.392 5.25 3.045c.54.314.872.89.872 1.514v6.098a1.75 1.75 0 0 1-.872 1.514l-5.25 3.045a1.75 1.75 0 0 1-1.756 0l-5.25-3.045A1.75 1.75 0 0 1 1 11.049V4.951c0-.624.332-1.201.872-1.514L7.122.392a1.75 1.75 0 0 1 1.756 0ZM7.875 1.69l-4.63 2.685L8 7.133l4.755-2.758-4.63-2.685a.248.248 0 0 0-.25 0ZM2.5 5.677v5.372c0 .09.047.171.125.216l4.625 2.683V8.432Zm6.25 8.271 4.625-2.683a.25.25 0 0 0 .125-.216V5.677L8.75 8.432Z"></path> </svg> </template> <template id="credit-card-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-credit-card"> <path d="M10.75 9a.75.75 0 0 0 0 1.5h1.5a.75.75 0 0 0 0-1.5h-1.5Z"></path><path d="M0 3.75C0 2.784.784 2 1.75 2h12.5c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0 1 14.25 14H1.75A1.75 1.75 0 0 1 0 12.25ZM14.5 6.5h-13v5.75c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25Zm0-2.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25V5h13Z"></path> </svg> </template> <template id="play-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-play"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"></path> </svg> </template> <template id="gift-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-gift"> <path d="M2 2.75A2.75 2.75 0 0 1 4.75 0c.983 0 1.873.42 2.57 1.232.268.318.497.668.68 1.042.183-.375.411-.725.68-1.044C9.376.42 10.266 0 11.25 0a2.75 2.75 0 0 1 2.45 4h.55c.966 0 1.75.784 1.75 1.75v2c0 .698-.409 1.301-1 1.582v4.918A1.75 1.75 0 0 1 13.25 16H2.75A1.75 1.75 0 0 1 1 14.25V9.332C.409 9.05 0 8.448 0 7.75v-2C0 4.784.784 4 1.75 4h.55c-.192-.375-.3-.8-.3-1.25ZM7.25 9.5H2.5v4.75c0 .138.112.25.25.25h4.5Zm1.5 0v5h4.5a.25.25 0 0 0 .25-.25V9.5Zm0-4V8h5.5a.25.25 0 0 0 .25-.25v-2a.25.25 0 0 0-.25-.25Zm-7 0a.25.25 0 0 0-.25.25v2c0 .138.112.25.25.25h5.5V5.5h-5.5Zm3-4a1.25 1.25 0 0 0 0 2.5h2.309c-.233-.818-.542-1.401-.878-1.793-.43-.502-.915-.707-1.431-.707ZM8.941 4h2.309a1.25 1.25 0 0 0 0-2.5c-.516 0-1 .205-1.43.707-.337.392-.646.975-.879 1.793Z"></path> </svg> </template> <template id="code-square-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code-square"> <path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25Zm7.47 3.97a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1 0 1.06l-2 2a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L10.69 8 9.22 6.53a.75.75 0 0 1 0-1.06ZM6.78 6.53 5.31 8l1.47 1.47a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215l-2-2a.75.75 0 0 1 0-1.06l2-2a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path> </svg> </template> <template id="device-desktop-icon"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-device-desktop"> <path d="M14.25 1c.966 0 1.75.784 1.75 1.75v7.5A1.75 1.75 0 0 1 14.25 12h-3.727c.099 1.041.52 1.872 1.292 2.757A.752.752 0 0 1 11.25 16h-6.5a.75.75 0 0 1-.565-1.243c.772-.885 1.192-1.716 1.292-2.757H1.75A1.75 1.75 0 0 1 0 10.25v-7.5C0 1.784.784 1 1.75 1ZM1.75 2.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25ZM9.018 12H6.982a5.72 5.72 0 0 1-.765 2.5h3.566a5.72 5.72 0 0 1-.765-2.5Z"></path> </svg> </template> <div class="position-relative"> <ul role="listbox" class="ActionListWrap QueryBuilder-ListWrap" aria-label="Suggestions" data-action=" combobox-commit:query-builder#comboboxCommit mousedown:query-builder#resultsMousedown " data-target="query-builder.resultsList" data-persist-list=false id="query-builder-test-results" ></ul> </div> <div class="FormControl-inlineValidation" id="validation-54dcb3cb-5b0c-4d3c-af1d-fb85959230f3" hidden="hidden"> <span class="FormControl-inlineValidation--visual"> <svg aria-hidden="true" height="12" viewBox="0 0 12 12" version="1.1" width="12" data-view-component="true" class="octicon octicon-alert-fill"> <path d="M4.855.708c.5-.896 1.79-.896 2.29 0l4.675 8.351a1.312 1.312 0 0 1-1.146 1.954H1.33A1.313 1.313 0 0 1 .183 9.058ZM7 7V3H5v4Zm-1 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"></path> </svg> </span> <span></span> </div> </div> <div data-target="query-builder.screenReaderFeedback" aria-live="polite" aria-atomic="true" class="sr-only"></div> </query-builder></form> <div class="d-flex flex-row color-fg-muted px-3 text-small color-bg-default search-feedback-prompt"> <a target="_blank" href="https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax" data-view-component="true" class="Link color-fg-accent text-normal ml-2"> Search syntax tips </a> <div class="d-flex flex-1"></div> </div> </div> </div> </div> </modal-dialog></div> </div> <div data-action="click:qbsearch-input#retract" class="dark-backdrop position-fixed" hidden data-target="qbsearch-input.darkBackdrop"></div> <div class="color-fg-default"> <dialog-helper> <dialog data-target="qbsearch-input.feedbackDialog" data-action="close:qbsearch-input#handleDialogClose cancel:qbsearch-input#handleDialogClose" id="feedback-dialog" aria-modal="true" aria-labelledby="feedback-dialog-title" aria-describedby="feedback-dialog-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="feedback-dialog-title"> Provide feedback </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="feedback-dialog" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="feedback-dialog-title"> <div data-view-component="true" class="Overlay-body"> <!-- '"` --><!-- </textarea></xmp> --></option></form><form id="code-search-feedback-form" data-turbo="false" action="/search/feedback" accept-charset="UTF-8" method="post"><input type="hidden" data-csrf="true" name="authenticity_token" value="BribnAJg3sjJwrikag75HnY+56+v2LkBSz330DUnfuZWP6GlhLbSgOpvf9+VPWnw2UrAk9M85lYHlrr7holICA==" /> <p>We read every piece of feedback, and take your input very seriously.</p> <textarea name="feedback" class="form-control width-full mb-2" style="height: 120px" id="feedback"></textarea> <input name="include_email" id="include_email" aria-label="Include my email address so I can be contacted" class="form-control mr-2" type="checkbox"> <label for="include_email" style="font-weight: normal">Include my email address so I can be contacted</label> </form></div> </scrollable-region> <div data-view-component="true" class="Overlay-footer Overlay-footer--alignEnd"> <button data-close-dialog-id="feedback-dialog" type="button" data-view-component="true" class="btn"> Cancel </button> <button form="code-search-feedback-form" data-action="click:qbsearch-input#submitFeedback" type="submit" data-view-component="true" class="btn-primary btn"> Submit feedback </button> </div> </dialog></dialog-helper> <custom-scopes data-target="qbsearch-input.customScopesManager"> <dialog-helper> <dialog data-target="custom-scopes.customScopesModalDialog" data-action="close:qbsearch-input#handleDialogClose cancel:qbsearch-input#handleDialogClose" id="custom-scopes-dialog" aria-modal="true" aria-labelledby="custom-scopes-dialog-title" aria-describedby="custom-scopes-dialog-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header Overlay-header--divided"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="custom-scopes-dialog-title"> Saved searches </h1> <h2 id="custom-scopes-dialog-description" class="Overlay-description">Use saved searches to filter your results more quickly</h2> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="custom-scopes-dialog" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="custom-scopes-dialog-title"> <div data-view-component="true" class="Overlay-body"> <div data-target="custom-scopes.customScopesModalDialogFlash"></div> <div hidden class="create-custom-scope-form" data-target="custom-scopes.createCustomScopeForm"> <!-- '"` --><!-- </textarea></xmp> --></option></form><form id="custom-scopes-dialog-form" data-turbo="false" action="/search/custom_scopes" accept-charset="UTF-8" method="post"><input type="hidden" data-csrf="true" name="authenticity_token" value="V3nkq2BBkOcfQmLYAwpMMhCDnZ3j6vcPC/i2sxJ/Dy+80uVRazjYBTMxzOZYirOSA7S0S4ha3p+taVfK5++PkQ==" /> <div data-target="custom-scopes.customScopesModalDialogFlash"></div> <input type="hidden" id="custom_scope_id" name="custom_scope_id" data-target="custom-scopes.customScopesIdField"> <div class="form-group"> <label for="custom_scope_name">Name</label> <auto-check src="/search/custom_scopes/check_name" required> <input type="text" name="custom_scope_name" id="custom_scope_name" data-target="custom-scopes.customScopesNameField" class="form-control" autocomplete="off" placeholder="github-ruby" required maxlength="50"> <input type="hidden" data-csrf="true" value="cFxAa6OFg1mJCxwgHE2HJnGTLLHknOfnq3J6uzKJC6zfelbHB5OkJlI++oJB0H/LuwqXXAWGT8lv0BOR4bBBJg==" /> </auto-check> </div> <div class="form-group"> <label for="custom_scope_query">Query</label> <input type="text" name="custom_scope_query" id="custom_scope_query" data-target="custom-scopes.customScopesQueryField" class="form-control" autocomplete="off" placeholder="(repo:mona/a OR repo:mona/b) AND lang:python" required maxlength="500"> </div> <p class="text-small color-fg-muted"> To see all available qualifiers, see our <a class="Link--inTextBlock" href="https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax">documentation</a>. </p> </form> </div> <div data-target="custom-scopes.manageCustomScopesForm"> <div data-target="custom-scopes.list"></div> </div> </div> </scrollable-region> <div data-view-component="true" class="Overlay-footer Overlay-footer--alignEnd Overlay-footer--divided"> <button data-action="click:custom-scopes#customScopesCancel" type="button" data-view-component="true" class="btn"> Cancel </button> <button form="custom-scopes-dialog-form" data-action="click:custom-scopes#customScopesSubmit" data-target="custom-scopes.customScopesSubmitButton" type="submit" data-view-component="true" class="btn-primary btn"> Create saved search </button> </div> </dialog></dialog-helper> </custom-scopes> </div> </qbsearch-input> <div class="position-relative HeaderMenu-link-wrap d-lg-inline-block"> <a href="/login?return_to=https%3A%2F%2Fgithub.com%2Fgolang%2Fgo%2Fdiscussions%2F48287" class="HeaderMenu-link HeaderMenu-link--sign-in HeaderMenu-button flex-shrink-0 no-underline d-none d-lg-inline-flex border border-lg-0 rounded rounded-lg-0 px-2 py-1" style="margin-left: 12px;" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;site header menu&quot;,&quot;repository_id&quot;:null,&quot;auth_type&quot;:&quot;SIGN_UP&quot;,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="8d38a907c5dcfc634843efc0948a999dfec91d8b274fd3d8576c48145b2aa09c" data-analytics-event="{&quot;category&quot;:&quot;Marketing nav&quot;,&quot;action&quot;:&quot;click to go to homepage&quot;,&quot;label&quot;:&quot;ref_page:Marketing;ref_cta:Sign in;ref_loc:Header&quot;}" > Sign in </a> </div> <a href="/signup?ref_cta=Sign+up&amp;ref_loc=header+logged+out&amp;ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fdiscussions_fragments%2Fdiscussion_layout&amp;source=header-repo&amp;source_repo=golang%2Fgo" class="HeaderMenu-link HeaderMenu-link--sign-up HeaderMenu-button flex-shrink-0 d-flex d-lg-inline-flex no-underline border color-border-default rounded px-2 py-1" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;site header menu&quot;,&quot;repository_id&quot;:null,&quot;auth_type&quot;:&quot;SIGN_UP&quot;,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="8d38a907c5dcfc634843efc0948a999dfec91d8b274fd3d8576c48145b2aa09c" data-analytics-event="{&quot;category&quot;:&quot;Sign up&quot;,&quot;action&quot;:&quot;click to sign up for account&quot;,&quot;label&quot;:&quot;ref_page:/&lt;user-name&gt;/&lt;repo-name&gt;/voltron/discussions_fragments/discussion_layout;ref_cta:Sign up;ref_loc:header logged out&quot;}" > Sign up </a> <button type="button" class="sr-only js-header-menu-focus-trap d-block d-lg-none">Reseting focus</button> </div> </div> </div> </div> </header> <div hidden="hidden" data-view-component="true" class="js-stale-session-flash stale-session-flash flash flash-warn flash-full"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path> </svg> <span class="js-stale-session-flash-signed-in" hidden>You signed in with another tab or window. <a class="Link--inTextBlock" href="">Reload</a> to refresh your session.</span> <span class="js-stale-session-flash-signed-out" hidden>You signed out in another tab or window. <a class="Link--inTextBlock" href="">Reload</a> to refresh your session.</span> <span class="js-stale-session-flash-switched" hidden>You switched accounts on another tab or window. <a class="Link--inTextBlock" href="">Reload</a> to refresh your session.</span> <button id="icon-button-7c9de75b-0a9a-47d5-9b28-ec1b6d6f5a5e" aria-labelledby="tooltip-9c247c2c-78d1-4918-85d2-bd623f1a5ab6" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium flash-close js-flash-close"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x Button-visual"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg> </button><tool-tip id="tooltip-9c247c2c-78d1-4918-85d2-bd623f1a5ab6" for="icon-button-7c9de75b-0a9a-47d5-9b28-ec1b6d6f5a5e" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Dismiss alert</tool-tip> </div> </div> <div id="start-of-content" class="show-on-focus"></div> <div id="js-flash-container" class="flash-container" data-turbo-replace> <template class="js-flash-template"> <div class="flash flash-full {{ className }}"> <div > <button autofocus class="flash-close js-flash-close" type="button" aria-label="Dismiss this message"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg> </button> <div aria-atomic="true" role="alert" class="js-flash-alert"> <div>{{ message }}</div> </div> </div> </div> </template> </div> <div class="application-main " data-commit-hovercards-enabled data-discussion-hovercards-enabled data-issue-and-pr-hovercards-enabled > <div itemscope itemtype="http://schema.org/SoftwareSourceCode" class=""> <main id="js-repo-pjax-container" > <div id="repository-container-header" class="pt-3 hide-full-screen" style="background-color: var(--page-header-bgColor, var(--color-page-header-bg));" data-turbo-replace> <div class="d-flex flex-nowrap flex-justify-end mb-3 px-3 px-lg-5" style="gap: 1rem;"> <div class="flex-auto min-width-0 width-fit"> <div class=" d-flex flex-wrap flex-items-center wb-break-word f3 text-normal"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo color-fg-muted mr-2"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path> </svg> <span class="author flex-self-stretch" itemprop="author"> <a class="url fn" rel="author" data-hovercard-type="organization" data-hovercard-url="/orgs/golang/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/golang"> golang </a> </span> <span class="mx-1 flex-self-stretch color-fg-muted">/</span> <strong itemprop="name" class="mr-2 flex-self-stretch"> <a data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" href="/golang/go">go</a> </strong> <span></span><span class="Label Label--secondary v-align-middle mr-1">Public</span> </div> </div> <div id="repository-details-container" class="flex-shrink-0" data-turbo-replace style="max-width: 70%;"> <ul class="pagehead-actions flex-shrink-0 d-none d-md-inline" style="padding: 2px 0;"> <li> <a href="/login?return_to=%2Fgolang%2Fgo" rel="nofollow" id="repository-details-watch-button" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;notification subscription menu watch&quot;,&quot;repository_id&quot;:null,&quot;auth_type&quot;:&quot;LOG_IN&quot;,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="f5da27a072ad352c8edb3dfc0d6dfed754e9eb38841a6c307758b857a4239390" aria-label="You must be signed in to change notification settings" data-view-component="true" class="btn-sm btn"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bell mr-2"> <path d="M8 16a2 2 0 0 0 1.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 0 0 8 16ZM3 5a5 5 0 0 1 10 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.519 1.519 0 0 1 13.482 13H2.518a1.516 1.516 0 0 1-1.263-2.36l1.703-2.554A.255.255 0 0 0 3 7.947Zm5-3.5A3.5 3.5 0 0 0 4.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.017.017 0 0 0-.003.01l.001.006c0 .002.002.004.004.006l.006.004.007.001h10.964l.007-.001.006-.004.004-.006.001-.007a.017.017 0 0 0-.003-.01l-1.703-2.554a1.745 1.745 0 0 1-.294-.97V5A3.5 3.5 0 0 0 8 1.5Z"></path> </svg>Notifications </a> <tool-tip id="tooltip-3eec80f4-ed30-49f4-94e4-0d3a904b3c6e" for="repository-details-watch-button" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be signed in to change notification settings</tool-tip> </li> <li> <a icon="repo-forked" id="fork-button" href="/login?return_to=%2Fgolang%2Fgo" rel="nofollow" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;repo details fork button&quot;,&quot;repository_id&quot;:23096959,&quot;auth_type&quot;:&quot;LOG_IN&quot;,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="0b70626909f4470013e2bed0f324fa420364e9f66aca8a40231fdb8b24e2c4ba" data-view-component="true" class="btn-sm btn"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo-forked mr-2"> <path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path> </svg>Fork <span id="repo-network-counter" data-pjax-replace="true" data-turbo-replace="true" title="17,700" data-view-component="true" class="Counter">17.7k</span> </a> </li> <li> <div data-view-component="true" class="BtnGroup d-flex"> <a href="/login?return_to=%2Fgolang%2Fgo" rel="nofollow" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;star button&quot;,&quot;repository_id&quot;:23096959,&quot;auth_type&quot;:&quot;LOG_IN&quot;,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="5d3ce59d319f93a3e0f64d179c93ebaaa7fca472d41895ec0fd37b4e0797df9f" aria-label="You must be signed in to star a repository" data-view-component="true" class="tooltipped tooltipped-sw btn-sm btn"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-star v-align-text-bottom d-inline-block mr-2"> <path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path> </svg><span data-view-component="true" class="d-inline"> Star </span> <span id="repo-stars-counter-star" aria-label="124236 users starred this repository" data-singular-suffix="user starred this repository" data-plural-suffix="users starred this repository" data-turbo-replace="true" title="124,236" data-view-component="true" class="Counter js-social-count">124k</span> </a></div> </li> </ul> </div> </div> <div id="responsive-meta-container" data-turbo-replace> </div> <nav data-pjax="#js-repo-pjax-container" aria-label="Repository" data-view-component="true" class="js-repo-nav js-sidenav-container-pjax js-responsive-underlinenav overflow-hidden UnderlineNav px-3 px-md-4 px-lg-5"> <ul data-view-component="true" class="UnderlineNav-body list-style-none"> <li data-view-component="true" class="d-inline-flex"> <a id="code-tab" href="/golang/go" data-tab-item="i0code-tab" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches repo_packages repo_deployments repo_attestations /golang/go" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g c" data-analytics-event="{&quot;category&quot;:&quot;Underline navbar&quot;,&quot;action&quot;:&quot;Click tab&quot;,&quot;label&quot;:&quot;Code&quot;,&quot;target&quot;:&quot;UNDERLINE_NAV.TAB&quot;}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code UnderlineNav-octicon d-none d-sm-inline"> <path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path> </svg> <span data-content="Code">Code</span> <span id="code-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="Not available" data-view-component="true" class="Counter"></span> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="issues-tab" href="/golang/go/issues" data-tab-item="i1issues-tab" data-selected-links="repo_issues repo_labels repo_milestones /golang/go/issues" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g i" data-analytics-event="{&quot;category&quot;:&quot;Underline navbar&quot;,&quot;action&quot;:&quot;Click tab&quot;,&quot;label&quot;:&quot;Issues&quot;,&quot;target&quot;:&quot;UNDERLINE_NAV.TAB&quot;}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-issue-opened UnderlineNav-octicon d-none d-sm-inline"> <path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path> </svg> <span data-content="Issues">Issues</span> <span id="issues-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="5,000+" data-view-component="true" class="Counter">5k+</span> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="pull-requests-tab" href="/golang/go/pulls" data-tab-item="i2pull-requests-tab" data-selected-links="repo_pulls checks /golang/go/pulls" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g p" data-analytics-event="{&quot;category&quot;:&quot;Underline navbar&quot;,&quot;action&quot;:&quot;Click tab&quot;,&quot;label&quot;:&quot;Pull requests&quot;,&quot;target&quot;:&quot;UNDERLINE_NAV.TAB&quot;}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-pull-request UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z"></path> </svg> <span data-content="Pull requests">Pull requests</span> <span id="pull-requests-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="485" data-view-component="true" class="Counter">485</span> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="discussions-tab" href="/golang/go/discussions" data-tab-item="i3discussions-tab" data-selected-links="repo_discussions /golang/go/discussions" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g g" data-analytics-event="{&quot;category&quot;:&quot;Underline navbar&quot;,&quot;action&quot;:&quot;Click tab&quot;,&quot;label&quot;:&quot;Discussions&quot;,&quot;target&quot;:&quot;UNDERLINE_NAV.TAB&quot;}" aria-current="page" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item selected"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-comment-discussion UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.75 1h8.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 10.25 10H7.061l-2.574 2.573A1.458 1.458 0 0 1 2 11.543V10h-.25A1.75 1.75 0 0 1 0 8.25v-5.5C0 1.784.784 1 1.75 1ZM1.5 2.75v5.5c0 .138.112.25.25.25h1a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h3.5a.25.25 0 0 0 .25-.25v-5.5a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25Zm13 2a.25.25 0 0 0-.25-.25h-.5a.75.75 0 0 1 0-1.5h.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 14.25 12H14v1.543a1.458 1.458 0 0 1-2.487 1.03L9.22 12.28a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l2.22 2.22v-2.19a.75.75 0 0 1 .75-.75h1a.25.25 0 0 0 .25-.25Z"></path> </svg> <span data-content="Discussions">Discussions</span> <span id="discussions-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="Not available" data-view-component="true" class="Counter"></span> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="actions-tab" href="/golang/go/actions" data-tab-item="i4actions-tab" data-selected-links="repo_actions /golang/go/actions" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g a" data-analytics-event="{&quot;category&quot;:&quot;Underline navbar&quot;,&quot;action&quot;:&quot;Click tab&quot;,&quot;label&quot;:&quot;Actions&quot;,&quot;target&quot;:&quot;UNDERLINE_NAV.TAB&quot;}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-play UnderlineNav-octicon d-none d-sm-inline"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"></path> </svg> <span data-content="Actions">Actions</span> <span id="actions-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="Not available" data-view-component="true" class="Counter"></span> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="projects-tab" href="/golang/go/projects" data-tab-item="i5projects-tab" data-selected-links="repo_projects new_repo_project repo_project /golang/go/projects" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g b" data-analytics-event="{&quot;category&quot;:&quot;Underline navbar&quot;,&quot;action&quot;:&quot;Click tab&quot;,&quot;label&quot;:&quot;Projects&quot;,&quot;target&quot;:&quot;UNDERLINE_NAV.TAB&quot;}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-table UnderlineNav-octicon d-none d-sm-inline"> <path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25ZM6.5 6.5v8h7.75a.25.25 0 0 0 .25-.25V6.5Zm8-1.5V1.75a.25.25 0 0 0-.25-.25H6.5V5Zm-13 1.5v7.75c0 .138.112.25.25.25H5v-8ZM5 5V1.5H1.75a.25.25 0 0 0-.25.25V5Z"></path> </svg> <span data-content="Projects">Projects</span> <span id="projects-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="4" data-view-component="true" class="Counter">4</span> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="wiki-tab" href="/golang/go/wiki" data-tab-item="i6wiki-tab" data-selected-links="repo_wiki /golang/go/wiki" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g w" data-analytics-event="{&quot;category&quot;:&quot;Underline navbar&quot;,&quot;action&quot;:&quot;Click tab&quot;,&quot;label&quot;:&quot;Wiki&quot;,&quot;target&quot;:&quot;UNDERLINE_NAV.TAB&quot;}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-book UnderlineNav-octicon d-none d-sm-inline"> <path d="M0 1.75A.75.75 0 0 1 .75 1h4.253c1.227 0 2.317.59 3 1.501A3.743 3.743 0 0 1 11.006 1h4.245a.75.75 0 0 1 .75.75v10.5a.75.75 0 0 1-.75.75h-4.507a2.25 2.25 0 0 0-1.591.659l-.622.621a.75.75 0 0 1-1.06 0l-.622-.621A2.25 2.25 0 0 0 5.258 13H.75a.75.75 0 0 1-.75-.75Zm7.251 10.324.004-5.073-.002-2.253A2.25 2.25 0 0 0 5.003 2.5H1.5v9h3.757a3.75 3.75 0 0 1 1.994.574ZM8.755 4.75l-.004 7.322a3.752 3.752 0 0 1 1.992-.572H14.5v-9h-3.495a2.25 2.25 0 0 0-2.25 2.25Z"></path> </svg> <span data-content="Wiki">Wiki</span> <span id="wiki-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="Not available" data-view-component="true" class="Counter"></span> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="security-tab" href="/golang/go/security" data-tab-item="i7security-tab" data-selected-links="security overview alerts policy token_scanning code_scanning /golang/go/security" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-hotkey="g s" data-analytics-event="{&quot;category&quot;:&quot;Underline navbar&quot;,&quot;action&quot;:&quot;Click tab&quot;,&quot;label&quot;:&quot;Security&quot;,&quot;target&quot;:&quot;UNDERLINE_NAV.TAB&quot;}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-shield UnderlineNav-octicon d-none d-sm-inline"> <path d="M7.467.133a1.748 1.748 0 0 1 1.066 0l5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667Zm.61 1.429a.25.25 0 0 0-.153 0l-5.25 1.68a.25.25 0 0 0-.174.238V7c0 1.358.275 2.666 1.057 3.86.784 1.194 2.121 2.34 4.366 3.297a.196.196 0 0 0 .154 0c2.245-.956 3.582-2.104 4.366-3.298C13.225 9.666 13.5 8.36 13.5 7V3.48a.251.251 0 0 0-.174-.237l-5.25-1.68ZM8.75 4.75v3a.75.75 0 0 1-1.5 0v-3a.75.75 0 0 1 1.5 0ZM9 10.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path> </svg> <span data-content="Security">Security</span> <include-fragment src="/golang/go/security/overall-count" accept="text/fragment+html"></include-fragment> </a></li> <li data-view-component="true" class="d-inline-flex"> <a id="insights-tab" href="/golang/go/pulse" data-tab-item="i8insights-tab" data-selected-links="repo_graphs repo_contributors dependency_graph dependabot_updates pulse people community /golang/go/pulse" data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" data-analytics-event="{&quot;category&quot;:&quot;Underline navbar&quot;,&quot;action&quot;:&quot;Click tab&quot;,&quot;label&quot;:&quot;Insights&quot;,&quot;target&quot;:&quot;UNDERLINE_NAV.TAB&quot;}" data-view-component="true" class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-graph UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 1.75V13.5h13.75a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1-.75-.75V1.75a.75.75 0 0 1 1.5 0Zm14.28 2.53-5.25 5.25a.75.75 0 0 1-1.06 0L7 7.06 4.28 9.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.25-3.25a.75.75 0 0 1 1.06 0L10 7.94l4.72-4.72a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path> </svg> <span data-content="Insights">Insights</span> <span id="insights-repo-tab-count" data-pjax-replace="" data-turbo-replace="" title="Not available" data-view-component="true" class="Counter"></span> </a></li> </ul> <div style="visibility:hidden;" data-view-component="true" class="UnderlineNav-actions js-responsive-underlinenav-overflow position-absolute pr-3 pr-md-4 pr-lg-5 right-0"> <action-menu data-select-variant="none" data-view-component="true"> <focus-group direction="vertical" mnemonics retain> <button id="action-menu-aa651537-2718-44bb-bd51-9d5e956fb576-button" popovertarget="action-menu-aa651537-2718-44bb-bd51-9d5e956fb576-overlay" aria-controls="action-menu-aa651537-2718-44bb-bd51-9d5e956fb576-list" aria-haspopup="true" aria-labelledby="tooltip-96973154-8096-4c9d-b411-507ec8e88ab7" type="button" data-view-component="true" class="Button Button--iconOnly Button--secondary Button--medium UnderlineNav-item"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-96973154-8096-4c9d-b411-507ec8e88ab7" for="action-menu-aa651537-2718-44bb-bd51-9d5e956fb576-button" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Additional navigation options</tool-tip> <anchored-position id="action-menu-aa651537-2718-44bb-bd51-9d5e956fb576-overlay" anchor="action-menu-aa651537-2718-44bb-bd51-9d5e956fb576-button" align="start" side="outside-bottom" anchor-offset="normal" popover="auto" data-view-component="true"> <div data-view-component="true" class="Overlay Overlay--size-auto"> <div data-view-component="true" class="Overlay-body Overlay-body--paddingNone"> <action-list> <div data-view-component="true"> <ul aria-labelledby="action-menu-aa651537-2718-44bb-bd51-9d5e956fb576-button" id="action-menu-aa651537-2718-44bb-bd51-9d5e956fb576-list" role="menu" data-view-component="true" class="ActionListWrap--inset ActionListWrap"> <li hidden="hidden" data-menu-item="i0code-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-98584612-c40d-4215-b603-a804ce8b9a0f" href="/golang/go" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code"> <path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Code </span> </a> </li> <li hidden="hidden" data-menu-item="i1issues-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-07ccbdc8-e40e-4960-b125-33736367ca1f" href="/golang/go/issues" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-issue-opened"> <path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Issues </span> </a> </li> <li hidden="hidden" data-menu-item="i2pull-requests-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-4977f04a-0de0-4b67-ae43-cf8889d56295" href="/golang/go/pulls" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-pull-request"> <path d="M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Pull requests </span> </a> </li> <li hidden="hidden" data-menu-item="i3discussions-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-77bebaef-0919-4dbc-993f-b6dad9d911d1" href="/golang/go/discussions" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-comment-discussion"> <path d="M1.75 1h8.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 10.25 10H7.061l-2.574 2.573A1.458 1.458 0 0 1 2 11.543V10h-.25A1.75 1.75 0 0 1 0 8.25v-5.5C0 1.784.784 1 1.75 1ZM1.5 2.75v5.5c0 .138.112.25.25.25h1a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h3.5a.25.25 0 0 0 .25-.25v-5.5a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25Zm13 2a.25.25 0 0 0-.25-.25h-.5a.75.75 0 0 1 0-1.5h.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 14.25 12H14v1.543a1.458 1.458 0 0 1-2.487 1.03L9.22 12.28a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l2.22 2.22v-2.19a.75.75 0 0 1 .75-.75h1a.25.25 0 0 0 .25-.25Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Discussions </span> </a> </li> <li hidden="hidden" data-menu-item="i4actions-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-3788fa36-de1a-4869-9b45-5a0f7490a030" href="/golang/go/actions" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-play"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Actions </span> </a> </li> <li hidden="hidden" data-menu-item="i5projects-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-f4aaf472-4e6a-4d1a-8e66-b912850de0f6" href="/golang/go/projects" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-table"> <path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25ZM6.5 6.5v8h7.75a.25.25 0 0 0 .25-.25V6.5Zm8-1.5V1.75a.25.25 0 0 0-.25-.25H6.5V5Zm-13 1.5v7.75c0 .138.112.25.25.25H5v-8ZM5 5V1.5H1.75a.25.25 0 0 0-.25.25V5Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Projects </span> </a> </li> <li hidden="hidden" data-menu-item="i6wiki-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-baa8f50a-2abe-48e7-bffb-d534c757bb20" href="/golang/go/wiki" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-book"> <path d="M0 1.75A.75.75 0 0 1 .75 1h4.253c1.227 0 2.317.59 3 1.501A3.743 3.743 0 0 1 11.006 1h4.245a.75.75 0 0 1 .75.75v10.5a.75.75 0 0 1-.75.75h-4.507a2.25 2.25 0 0 0-1.591.659l-.622.621a.75.75 0 0 1-1.06 0l-.622-.621A2.25 2.25 0 0 0 5.258 13H.75a.75.75 0 0 1-.75-.75Zm7.251 10.324.004-5.073-.002-2.253A2.25 2.25 0 0 0 5.003 2.5H1.5v9h3.757a3.75 3.75 0 0 1 1.994.574ZM8.755 4.75l-.004 7.322a3.752 3.752 0 0 1 1.992-.572H14.5v-9h-3.495a2.25 2.25 0 0 0-2.25 2.25Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Wiki </span> </a> </li> <li hidden="hidden" data-menu-item="i7security-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-3d07be35-5c00-451c-aee3-90bd08193599" href="/golang/go/security" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-shield"> <path d="M7.467.133a1.748 1.748 0 0 1 1.066 0l5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667Zm.61 1.429a.25.25 0 0 0-.153 0l-5.25 1.68a.25.25 0 0 0-.174.238V7c0 1.358.275 2.666 1.057 3.86.784 1.194 2.121 2.34 4.366 3.297a.196.196 0 0 0 .154 0c2.245-.956 3.582-2.104 4.366-3.298C13.225 9.666 13.5 8.36 13.5 7V3.48a.251.251 0 0 0-.174-.237l-5.25-1.68ZM8.75 4.75v3a.75.75 0 0 1-1.5 0v-3a.75.75 0 0 1 1.5 0ZM9 10.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Security </span> </a> </li> <li hidden="hidden" data-menu-item="i8insights-tab" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <a tabindex="-1" id="item-62b9e80f-ebe4-4f7e-8bf2-ddf4bd4e1f19" href="/golang/go/pulse" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-graph"> <path d="M1.5 1.75V13.5h13.75a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1-.75-.75V1.75a.75.75 0 0 1 1.5 0Zm14.28 2.53-5.25 5.25a.75.75 0 0 1-1.06 0L7 7.06 4.28 9.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.25-3.25a.75.75 0 0 1 1.06 0L10 7.94l4.72-4.72a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Insights </span> </a> </li> </ul> </div></action-list> </div> </div></anchored-position> </focus-group> </action-menu></div> </nav> </div> <turbo-frame id="repo-content-turbo-frame" target="_top" data-turbo-action="advance" class=""> <div id="repo-content-pjax-container" class="repository-content " > <div class="clearfix new-discussion-timeline js-check-all-container container-xl px-3 px-md-4 px-lg-5 mt-4" data-pjax="" data-turbo-frame=""> <div id="discussion_bucket" class="gutter-condensed gutter-lg flex-column flex-md-row d-flex flex-wrap"> <div class="clearfix flex-shrink-0 js-issues-results col-12 flex-wrap"> <div id="partial-discussion-header" class="gh-header js-details-container Details js-socket-channel js-updatable-content js-discussions-title-container" data-channel="eyJjIjoiZGlzY3Vzc2lvbjozNTYzNjAyIiwidCI6MTczMjQzNTEwNX0=--b0b9ec9991531ad5791eb54667e0abf37006af380ac7eca512b0d8dce5420a3d" data-gid="MDEwOkRpc2N1c3Npb24zNTYzNjAy" data-url="/golang/go/discussions/48287/title" > <div class="gh-header-show gh-header-no-access"> <div class="d-flex flex-column flex-md-row flex-items-start"> <div class="d-flex width-full flex-order-1 flex-md-order-none"> <div class="d-flex flex-column"> <h1 class="gh-header-title flex-auto wb-break-word f1 mr-0"> <span class="js-issue-title markdown-title" > how to update APIs for generics </span> <span class="gh-header-number f1-light">#48287</span> </h1> <div class="d-flex flex-wrap flex-items-center mb-3 mt-2"> <span title="Status: Closed as resolved" data-view-component="true" class="State State--merged d-flex flex-items-center mr-2"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-discussion-closed flex-items-center mr-1"> <path d="M0 2.75C0 1.783.784 1 1.75 1h8.5c.967 0 1.75.783 1.75 1.75v5.5A1.75 1.75 0 0 1 10.25 10H7.061l-2.574 2.573A1.457 1.457 0 0 1 2 11.543V10h-.25A1.75 1.75 0 0 1 0 8.25Zm1.75-.25a.25.25 0 0 0-.25.25v5.5c0 .138.112.25.25.25h1a.75.75 0 0 1 .75.75v2.189L6.22 8.72a.747.747 0 0 1 .53-.22h3.5a.25.25 0 0 0 .25-.25v-5.5a.25.25 0 0 0-.25-.25Zm12.5 2h-.5a.75.75 0 0 1 0-1.5h.5c.967 0 1.75.783 1.75 1.75v5.5A1.75 1.75 0 0 1 14.25 12H14v1.543a1.457 1.457 0 0 1-2.487 1.03L9.22 12.28a.749.749 0 1 1 1.06-1.06l2.22 2.219V11.25a.75.75 0 0 1 .75-.75h1a.25.25 0 0 0 .25-.25v-5.5a.25.25 0 0 0-.25-.25Zm-5.47.28-3 3a.747.747 0 0 1-1.06 0l-1.5-1.5a.749.749 0 1 1 1.06-1.06l.97.969L7.72 3.72a.749.749 0 1 1 1.06 1.06Z"></path> </svg> Closed </span> <span title="Locked" data-view-component="true" class="State mr-2"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-lock color-fg-on-emphasis flex-items-center"> <path d="M4 4a4 4 0 0 1 8 0v2h.25c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 12.25 15h-8.5A1.75 1.75 0 0 1 2 13.25v-5.5C2 6.784 2.784 6 3.75 6H4Zm8.25 3.5h-8.5a.25.25 0 0 0-.25.25v5.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-5.5a.25.25 0 0 0-.25-.25ZM10.5 6V4a2.5 2.5 0 1 0-5 0v2Z"></path> </svg> Locked </span> <div class="color-fg-muted my-1" > <a href="/rsc" class="Link--secondary text-bold d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:null,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="02d7cfd14e40a400d0fc2f2ec0c46ee8702545ae614b77c0a2286a0048813c0a" data-hovercard-type="user" data-hovercard-url="/users/rsc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" > <span >rsc</span> </a> announced in <a class="color-fg-inherit text-bold" href="/golang/go/discussions/categories/discussions">Discussions</a> </div> </div> </div> </div> <div class="gh-header-actions mt-0 mt-md-1 mb-2 mb-md-0 flex-shrink-0 d-flex"> </div> </div> </div> <div class="js-sticky js-sticky-offset-scroll top-0 gh-header-sticky"> <div class="sticky-content"> <div class="d-flex flex-items-center"> <div class="d-flex flex-1 flex-row flex-items-center min-width-0 my-2"> <div class="min-width-0"> <div class="d-flex text-bold f5"> <a class="js-issue-title css-truncate css-truncate-target Link--primary width-fit markdown-title js-smoothscroll-anchor" href="#top"> how to update APIs for generics </a> <span class="gh-header-number color-fg-muted pl-1">#48287</span> </div> <div class="meta color-fg-muted width-fit"> <div class="d-flex flex-row flex-items-center"> <div class="pr-2 d-flex flex-row"> <a href="/rsc" class="author d-flex flex-items-center Link--primary text-bold" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:null,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="02d7cfd14e40a400d0fc2f2ec0c46ee8702545ae614b77c0a2286a0048813c0a" data-hovercard-type="user" data-hovercard-url="/users/rsc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" data-hovercard-z-index-override="111" > <img class="mr-1 avatar mt-0 avatar-user" src="https://avatars.githubusercontent.com/u/104030?s=40&amp;v=4" width="20" height="20" alt="@rsc" /> <span class="d-none d-md-inline-block mr-1" > rsc </span> </a> </div> <div > <relative-time datetime="2021-09-09T15:02:57Z" class="no-wrap">Sep 9, 2021</relative-time> <span class="mx-1">&middot;</span> 45 comments <span class="mx-1">&middot;</span> 211 replies </div> </div> </div> </div> </div> <div class="ml-3"> <a href="#top" class="color-fg-muted py-3 ml-2 f6 d-none d-md-inline-block">Return to top</a> </div> </div> </div> </div> <div class="gh-header-shadow color-shadow-small js-notification-shelf-offset-top"></div> </div> </div> <div class="flex-shrink-0 col-12 col-md-9 mb-4 mb-md-0"> <div class="js-quote-selection-container js-discussion-quote-selection" data-quote-markdown=".js-comment-body" data-issue-and-pr-hovercards-enabled data-discussion-hovercards-enabled data-team-hovercards-enabled data-timeline-item-src="/golang/go/discussions/48287/timeline_anchor" id="js-discussions-timeline-anchor-loader" > <div class="discussion js-discussion js-socket-channel js-updatable-content" data-discussion-hovercards-enabled data-repository-hovercards-enabled data-commit-hovercards-enabled data-channel="eyJjIjoiZGlzY3Vzc2lvbjozNTYzNjAyIiwidCI6MTczMjQzNTEwNX0=--b0b9ec9991531ad5791eb54667e0abf37006af380ac7eca512b0d8dce5420a3d" > <div class="TimelineItem pt-0 js-comment-container discussion-timeline-item ml-0" data-gid="MDEwOkRpc2N1c3Npb24zNTYzNjAy" data-url="/golang/go/discussions/48287/body" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussion-3563602" data-hpc > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="f5afdc76c3105eb411f4e05afdd17ec6e0452070fa859adecb495943b206ab50" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Discussion-actions-3563602-text" aria-haspopup="true" aria-expanded="false" aria-controls="Discussion-actions-3563602-list" aria-labelledby="tooltip-1ac09918-b642-4fa1-a428-99c6c5f3e01e" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-1ac09918-b642-4fa1-a428-99c6c5f3e01e" for="Discussion-actions-3563602-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Discussion options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Discussion-actions-3563602-list" role="menu" aria-labelledby="Discussion-actions-3563602-text"> <include-fragment src="/golang/go/discussions/48287/actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h2 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:null,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="02d7cfd14e40a400d0fc2f2ec0c46ee8702545ae614b77c0a2286a0048813c0a" data-hovercard-type="user" data-hovercard-url="/users/rsc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/rsc" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/104030?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">rsc</span> </div> </a> <a href="#discussion-3563602" id="discussion-3563602-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-09T15:02:57Z" class="no-wrap">Sep 9, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > <span title="This user is a maintainer on this repository." data-view-component="true" class="Label py-0 ml-1"> Maintainer </span> </div> </div> </h2> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="3563602" data-target-translation-type="discussion" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ianlancetaylor/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ianlancetaylor">@ianlancetaylor</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/griesemer/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/griesemer">@griesemer</a>, and I are wondering about different possible plans for updating APIs that would have used generics but currently use interface{}, and we wanted to cast a wider net for ideas.</p> <p dir="auto">There exist types and functions that clearly would use generics if we wrote them today. For example:</p> <ul dir="auto"> <li>type sync.Pool would naturally be sync.Pool[T]</li> <li>type sync.Map would naturally be sync.Map[K, V]</li> <li>type atomic.Value would naturally be atomic.Value[T]</li> <li>type list.List would naturally be list.List[T]</li> <li>func math.Abs would naturally be math.Abs[T]</li> <li>func math.Min would naturally be math.Min[T]</li> <li>func math.Max would naturally be math.Max[T]</li> </ul> <p dir="auto">There are certainly more of these, both in Go repos and everyone else's code.<br> The question is what should be the established convention for updating them.</p> <p dir="auto">One suggestion is to adopt an "Of" suffix, as in PoolOf[T], MinOf[T], and so on.<br> For types, which require the parameter list, that kind of works.<br> For functions, which will often infer it, the result is strange:<br> there is no obvious difference between math.MinOf(1, 2) and math.Min(1, 2).<br> Any new, from-scratch, post-generics API would presumably not include the Of - Tree[K,V], not TreeOf[K,V] -<br> so the "Of" in these names would be a persistent awkward reminder of our pre-generics past.</p> <p dir="auto">Another possibility is to adopt some kind of notation for default type parameters.<br> For example, suppose you could write</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="type List[E any (= interface{})] struct { ... } func Min[T comparable (= float64)](x, y T) T { ... }"><pre class="notranslate"><code class="notranslate">type List[E any (= interface{})] struct { ... } func Min[T comparable (= float64)](x, y T) T { ... } </code></pre></div> <p dir="auto">The (= ...) sets the default for a type parameter.<br> The rule for types could be that the bracketed type parameter list may be omitted when all parameters have defaults,<br> so saying List would be equivalent to List[interface{}], which, if we are careful, would be identical to the current code,<br> making the introduction of a generic List as list.List not a backwards-incompatible change.</p> <p dir="auto">The rule for functions could be that when parameters have defaults,<br> those defaults are applied just before the application of default constant types in the type inference algorithm.<br> That way, Min(1, 2) stays a float64, while Min(i, j) for i, j of type int, infers int instead.</p> <p dir="auto">The downside of this is a little bit more complexity in the language spec,<br> while the upside is potentially smoother migration for users.<br> Like the "Of" suffix, an API with type defaults would be a persistent awkward reminder of our pre-generics past,<br> but it would remind mainly the author of the code rather than all the users.<br> And users would not need to remember which APIs need an "Of" suffix added.</p> <p dir="auto">Are there other options we haven't considered?<br> Are there arguments for or against these options that haven't been mentioned?</p> <p dir="auto">Thanks very much.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 161" aria-disabled="true" id="discussion-upvote-button-Discussion-3563602" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>161</span> </button> <tool-tip id="tooltip-f1149785-77ae-4a3c-87cc-5ec6a173c921" for="discussion-upvote-button-Discussion-3563602" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-ebd4f8" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>143</span> </button> <button name="input[content]" id="reactions--reaction_button_component-f502cc" value="THUMBS_DOWN react" data-button-index-position="1" data-reaction-label="-1" data-reaction-content="-1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>16</span> </button> <button name="input[content]" id="reactions--reaction_button_component-33c209" value="CONFUSED react" data-button-index-position="4" data-reaction-label="Confused" data-reaction-content="thinking_face" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="thinking_face" fallback-src="https://github.githubassets.com/assets/1f615-4bb1369c4251.png" class="social-button-emoji">😕</g-emoji> <span>10</span> </button> <button name="input[content]" id="reactions--reaction_button_component-55ab18" value="HEART react" data-button-index-position="5" data-reaction-label="Heart" data-reaction-content="heart" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="heart" fallback-src="https://github.githubassets.com/assets/2764-982dc91ea48a.png" class="social-button-emoji">❤️</g-emoji> <span>39</span> </button> <button name="input[content]" id="reactions--reaction_button_component-94b144" value="EYES react" data-button-index-position="7" data-reaction-label="Eyes" data-reaction-content="eyes" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="eyes" fallback-src="https://github.githubassets.com/assets/1f440-ee44e91e92a7.png" class="social-button-emoji">👀</g-emoji> <span>13</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>143</span> </li> <li class="dropdown-item" aria-label="-1"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>16</span> </li> <li class="dropdown-item" aria-label="thinking_face"> <g-emoji alias="thinking_face" fallback-src="https://github.githubassets.com/assets/1f615-4bb1369c4251.png" class="social-button-emoji">😕</g-emoji> <span>10</span> </li> <li class="dropdown-item" aria-label="heart"> <g-emoji alias="heart" fallback-src="https://github.githubassets.com/assets/2764-982dc91ea48a.png" class="social-button-emoji">❤️</g-emoji> <span>39</span> </li> <li class="dropdown-item" aria-label="eyes"> <g-emoji alias="eyes" fallback-src="https://github.githubassets.com/assets/1f440-ee44e91e92a7.png" class="social-button-emoji">👀</g-emoji> <span>13</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="js-timeline-marker"> <div class="d-flex flex-items-center flex-wrap"> <div class="js-socket-channel js-updatable-content d-flex flex-auto" data-channel="eyJjIjoiZGlzY3Vzc2lvbjozNTYzNjAyIiwidCI6MTczMjQzNTEwNn0=--d8379c507d895aeac016c25e39bcf1c004ac4db3a0bfb567467eb5ddb481c035" data-url="/golang/go/discussions/48287/comment_count" data-gid="MDEwOkRpc2N1c3Npb24zNTYzNjAy" > <h2 id="discussion-comment-count" data-view-component="true" class="f4 my-2"> <span class="sr-only">Replies: </span> <span > 45 comments </span> <span aria-hidden="true">&middot;</span> <span class="text-normal" > 211 replies </span> </h2></div> <nav aria-label="Sort comments" id="discussion-comment-header"> <segmented-control> <ul aria-labelledby="discussion-comment-header" role="list" data-view-component="true" class="SegmentedControl--medium SegmentedControl"> <li class="SegmentedControl-item SegmentedControl-item--selected" role="listitem" data-targets="segmented-control.items"> <a href="/golang/go/discussions/48287?sort=old" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.comment_sort_click&quot;,&quot;payload&quot;:{&quot;repository_id&quot;:23096959,&quot;discussion_id&quot;:3563602,&quot;sort&quot;:&quot;old&quot;,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="3531801a22716db36acca9d642387172236276d60fbd514c24b84314d733db11" aria-current="true" data-view-component="true" class="Button--invisible Button--medium Button Button--invisible-noVisuals"> <span class="Button-content"> <span class="Button-label">Oldest</span> </span> </a> </li> <li class="SegmentedControl-item" role="listitem" data-targets="segmented-control.items"> <a href="/golang/go/discussions/48287?sort=new" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.comment_sort_click&quot;,&quot;payload&quot;:{&quot;repository_id&quot;:23096959,&quot;discussion_id&quot;:3563602,&quot;sort&quot;:&quot;new&quot;,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="4d6d678b81306b6be66a4e90a92b70245abdc4020b6d91d320680f0e1ca8de19" aria-current="false" data-view-component="true" class="Button--invisible Button--medium Button Button--invisible-noVisuals"> <span class="Button-content"> <span class="Button-label">Newest</span> </span> </a> </li> <li class="SegmentedControl-item" role="listitem" data-targets="segmented-control.items"> <a href="/golang/go/discussions/48287?sort=top" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.comment_sort_click&quot;,&quot;payload&quot;:{&quot;repository_id&quot;:23096959,&quot;discussion_id&quot;:3563602,&quot;sort&quot;:&quot;top&quot;,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="04ac02f77668290f5cf16042c2e98df0a9183c0fd11a686f4a41c8b68268cc9b" aria-current="false" data-view-component="true" class="Button--invisible Button--medium Button Button--invisible-noVisuals"> <span class="Button-content"> <span class="Button-label">Top</span> </span> </a> </li> </ul></segmented-control> </nav> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AE98d" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-1302301" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="01ab6ba5868263f00063e944f8950e45486c906df063b5c41ae0cfaf418bdee0" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1302301-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1302301-list" aria-labelledby="tooltip-fd6353c4-f05e-465f-a85d-df25c19dfe0a" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-fd6353c4-f05e-465f-a85d-df25c19dfe0a" for="Comment-actions-1302301-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1302301-list" role="menu" aria-labelledby="Comment-actions-1302301-text"> <include-fragment src="/golang/go/discussions/48287/comments/1302301/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1302301" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1302301,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="c1de236de71033e2fd84c0ffc601dd72d29b18a84ffbda9579356aad7f370795" data-hovercard-type="user" data-hovercard-url="/users/randall77/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/randall77" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/6889504?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">randall77</span> </div> </a> <a href="#discussioncomment-1302301" id="discussioncomment-1302301-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-09T15:24:25Z" class="no-wrap">Sep 9, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > <span title="This user is a maintainer on this repository." data-view-component="true" class="Label py-0 ml-1"> Maintainer </span> </div> </div> </h3> </div> </div> <div class="color-bg-default border-bottom position-relative"> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1302301/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1302301" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var i int Min(i, 5) // is Min[int] Min(3, 5) // is Min[float64]"><pre class="notranslate"><code class="notranslate">var i int Min(i, 5) // is Min[int] Min(3, 5) // is Min[float64] </code></pre></div> <p dir="auto">Would definitely be confusing. Especially if you converted from the former to the latter while debugging something.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 39" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-1302301" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>39</span> </button> <tool-tip id="tooltip-b8184430-de2e-408e-a4ea-12d3ab087179" for="discussion-upvote-button-DiscussionComment-1302301" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-44fdf4" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>26</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>26</span> </li> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 11 replies </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker color-bg-inset border-top color-border-default mt-n1 rounded-bottom-2" data-child-comments id="child-comments-discussioncomment-1302301"> <div data-view-component="true" class="TimelineItem TimelineItem--condensed discussion-nested-comment-paging-form pt-0 ml-0"> <div style="background-color: transparent; left: 30px;" data-view-component="true" class="TimelineItem-badge discussion-nested-comment-paging-badge pb-3 mt-0 pt-4"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg></div> <div data-view-component="true" class="TimelineItem-body discussion-nested-comment-paging-form-body"> <!-- '"` --><!-- </textarea></xmp> --></option></form><form data-replace-remote-form-target="child-comments-discussioncomment-1302301" data-replace-remote-form="true" data-turbo="false" action="/golang/go/discussions/48287/comments/1302301/threads" accept-charset="UTF-8" method="get"> <input type="hidden" name="back_page" value="1"> <input type="hidden" name="forward_page" value="0"> <input type="hidden" name="anchor_id" value="1316625"> <button data-disable-with="Loading more replies..." type="submit" data-view-component="true" class="Button--link Button--medium Button mb-2 pl-2 pt-2"> <span class="Button-content"> <span class="Button-label">Show 6 previous replies</span> </span> </button> </form></div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1316625,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="d321fdf7978acaff80894e8e46e4567f5652917aa764b74b8cd2115412f18775" data-hovercard-type="user" data-hovercard-url="/users/mibk/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/mibk"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/2324898?s=60&amp;v=4" width="30" height="30" alt="@mibk" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1316625" data-gid="DC_kwDOAWBuf84AFBcR" data-url="/golang/go/discussions/48287/comments/1316625" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="243713f169a12ebb8ed60cf15b8163b65de42e0a4ec89ea8c567d991b39c29b5" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1316625-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1316625-list" aria-labelledby="tooltip-106bb4c9-bbd8-4b69-8557-de700e526d8c" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-106bb4c9-bbd8-4b69-8557-de700e526d8c" for="Comment-actions-1316625-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1316625-list" role="menu" aria-labelledby="Comment-actions-1316625-text"> <include-fragment src="/golang/go/discussions/48287/comments/1316625/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1316625" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1316625,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="d321fdf7978acaff80894e8e46e4567f5652917aa764b74b8cd2115412f18775" data-hovercard-type="user" data-hovercard-url="/users/mibk/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/mibk" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> mibk </a> <a href="#discussioncomment-1316625" id="discussioncomment-1316625-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-13T14:51:53Z" class="no-wrap">Sep 13, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1316625/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1316625" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">And what about using <code class="notranslate">!go1.18</code> and <code class="notranslate">go1.18</code> build tags and actually change the definition, so modules using <code class="notranslate">go 1.18</code> would need to be adjusted to the new syntax?</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1316641,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="787063be6c6a9652603d8de61ddbe6e565811496dccae2bedded27501403b4d5" data-hovercard-type="user" data-hovercard-url="/users/bcmills/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/bcmills"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/5200974?s=60&amp;v=4" width="30" height="30" alt="@bcmills" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1316641" data-gid="DC_kwDOAWBuf84AFBch" data-url="/golang/go/discussions/48287/comments/1316641" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="1727f7a35a9e4e436684486d3df67381386d3b4f14ee8a352947a030facfdca8" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1316641-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1316641-list" aria-labelledby="tooltip-27165805-28fc-4368-a038-2e21bf92eee5" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-27165805-28fc-4368-a038-2e21bf92eee5" for="Comment-actions-1316641-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1316641-list" role="menu" aria-labelledby="Comment-actions-1316641-text"> <include-fragment src="/golang/go/discussions/48287/comments/1316641/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1316641" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1316641,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="787063be6c6a9652603d8de61ddbe6e565811496dccae2bedded27501403b4d5" data-hovercard-type="user" data-hovercard-url="/users/bcmills/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/bcmills" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> bcmills </a> <a href="#discussioncomment-1316641" id="discussioncomment-1316641-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-13T14:54:18Z" class="no-wrap">Sep 13, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1316641/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1316641" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mibk/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mibk">@mibk</a>, <code class="notranslate">!go1.18</code> and <code class="notranslate">go1.18</code> build tags would change the definition of the package, not its contents as viewed by the importer.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1342307,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="f882a87b2055f5b1cd9aaf85c40a0719b82e14e5c27a45ba4b968e2ac63a8254" data-hovercard-type="user" data-hovercard-url="/users/rsc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/rsc"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/104030?s=60&amp;v=4" width="30" height="30" alt="@rsc" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1342307" data-gid="DC_kwDOAWBuf84AFHtj" data-url="/golang/go/discussions/48287/comments/1342307" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="cab4dca3a4726242c5c60792c5950e799f3b3eb922bf8b624855a1fc5bcc87a3" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1342307-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1342307-list" aria-labelledby="tooltip-4394ed1c-7fa7-44a3-9154-61e87c22088a" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-4394ed1c-7fa7-44a3-9154-61e87c22088a" for="Comment-actions-1342307-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1342307-list" role="menu" aria-labelledby="Comment-actions-1342307-text"> <include-fragment src="/golang/go/discussions/48287/comments/1342307/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1342307" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1342307,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="f882a87b2055f5b1cd9aaf85c40a0719b82e14e5c27a45ba4b968e2ac63a8254" data-hovercard-type="user" data-hovercard-url="/users/rsc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/rsc" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> rsc </a> <a href="#discussioncomment-1342307" id="discussioncomment-1342307-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-16T13:31:09Z" class="no-wrap">Sep 16, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > <span title="This user is a maintainer on this repository." data-view-component="true" class="Label py-0 ml-1"> Maintainer </span> <span title="This user is the author of this discussion." data-view-component="true" class="Label py-0 ml-1"> Author </span> </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1342307/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1342307" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">Min is probably just a bad example.<br> I agree with Keith that Min(i, j) being int but Min(1, 2) not being int is probably too surprising.<br> (And Min(1, 2) must stay a float64 for x := Min(1,2).)<br> So let's take Min off the table.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-de5a4f" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>7</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>7</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1345354,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="19fb8e1eec25a808e1c167cd4bbf56f469f6927f0382f24f1354db4771ffab38" data-hovercard-type="user" data-hovercard-url="/users/nirui/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/nirui"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/30656734?s=60&amp;v=4" width="30" height="30" alt="@nirui" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1345354" data-gid="DC_kwDOAWBuf84AFIdK" data-url="/golang/go/discussions/48287/comments/1345354" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="6f4d634815b8e8391f79e43e570117da0e7cd58838e9b298d012ef56fc89d512" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1345354-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1345354-list" aria-labelledby="tooltip-1088e849-2354-4805-b7f7-3fb987678cbf" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-1088e849-2354-4805-b7f7-3fb987678cbf" for="Comment-actions-1345354-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1345354-list" role="menu" aria-labelledby="Comment-actions-1345354-text"> <include-fragment src="/golang/go/discussions/48287/comments/1345354/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1345354" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1345354,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="19fb8e1eec25a808e1c167cd4bbf56f469f6927f0382f24f1354db4771ffab38" data-hovercard-type="user" data-hovercard-url="/users/nirui/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/nirui" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> nirui </a> <a href="#discussioncomment-1345354" id="discussioncomment-1345354-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-17T03:10:42Z" class="no-wrap">Sep 17, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1345354/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1345354" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">But what about</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="func min() int { return math.Min(3, 5) }"><pre class="notranslate"><code class="notranslate">func min() int { return math.Min(3, 5) } </code></pre></div> <p dir="auto">or</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="func getPool() int { return pool.Get() }"><pre class="notranslate"><code class="notranslate">func getPool() int { return pool.Get() } </code></pre></div> <p dir="auto">etc? Will they still be inferred as <code class="notranslate">math.Min[float64]</code>&amp;<code class="notranslate">sync.Pool[interface{}]{}</code>, or they will be inferred to <code class="notranslate">math.Min[int]</code>&amp;<code class="notranslate">sync.Pool[int]{}</code> to match the return type?</p> <p dir="auto">IMO a reasonable default is fine. <code class="notranslate">math</code> was accept&amp;/returning <code class="notranslate">float64</code> only, dudes just silently sit there casting <code class="notranslate">int32</code> to <code class="notranslate">float64</code> before feeding them to <code class="notranslate">math.Abs</code> (maybe crying internally at the same time). Now you can have <code class="notranslate">math.Abs</code> take and return <code class="notranslate">float64</code>, <code class="notranslate">int32</code>, <code class="notranslate">int</code>, <code class="notranslate">uint</code>, <code class="notranslate">PackOf6</code> etc. So at very least the <code class="notranslate">func Min[T comparable (= float64)](x, y T) T { ... }</code> (or whatever syntax it will become) approach is not a lost.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1438149,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="cdf74ee6af94f4870f936c03a3261d2aa93a2b86104f54b42855abddaf157727" data-hovercard-type="user" data-hovercard-url="/users/ianlancetaylor/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/ianlancetaylor"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/3194333?s=60&amp;v=4" width="30" height="30" alt="@ianlancetaylor" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1438149" data-gid="DC_kwDOAWBuf84AFfHF" data-url="/golang/go/discussions/48287/comments/1438149" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="63cc6c2614a77d882869262abb0209e62d8dcf949e60c6d5d0dee7037fcab5fb" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1438149-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1438149-list" aria-labelledby="tooltip-54a34a8c-8203-4c00-9bc2-ebaed787a536" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-54a34a8c-8203-4c00-9bc2-ebaed787a536" for="Comment-actions-1438149-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1438149-list" role="menu" aria-labelledby="Comment-actions-1438149-text"> <include-fragment src="/golang/go/discussions/48287/comments/1438149/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1438149" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1438149,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="cdf74ee6af94f4870f936c03a3261d2aa93a2b86104f54b42855abddaf157727" data-hovercard-type="user" data-hovercard-url="/users/ianlancetaylor/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/ianlancetaylor" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> ianlancetaylor </a> <a href="#discussioncomment-1438149" id="discussioncomment-1438149-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-10-06T17:53:55Z" class="no-wrap">Oct 6, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > <span title="This user is a maintainer on this repository." data-view-component="true" class="Label py-0 ml-1"> Maintainer </span> </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1438149/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1438149" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">I want to note that this example:</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var i int Min(i, 5) // is Min[int] Min(3, 5) // is Min[float64]"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">i</span> <span class="pl-smi">int</span> <span class="pl-en">Min</span>(<span class="pl-s1">i</span>, <span class="pl-c1">5</span>) <span class="pl-c">// is Min[int]</span> <span class="pl-en">Min</span>(<span class="pl-c1">3</span>, <span class="pl-c1">5</span>) <span class="pl-c">// is Min[float64]</span></pre></div> <p dir="auto">is an issue in general, even without default type arguments. Suppose we have a hypothetical</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="alg.Min[T constraints.Ordered](a, b T) T"><pre class="notranslate">alg.<span class="pl-smi">Min</span>[<span class="pl-s1">T</span> constraints.<span class="pl-smi">Ordered</span>](<span class="pl-s1">a</span>, <span class="pl-s1">b</span> <span class="pl-s1">T</span>) <span class="pl-s1">T</span></pre></div> <p dir="auto">with no default type argument. Now we get</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var f float64 Min(f, 5) // is Min[float64] Min(3, 5) // is Min[int]"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">f</span> <span class="pl-smi">float64</span> <span class="pl-en">Min</span>(<span class="pl-s1">f</span>, <span class="pl-c1">5</span>) <span class="pl-c">// is Min[float64]</span> <span class="pl-en">Min</span>(<span class="pl-c1">3</span>, <span class="pl-c1">5</span>) <span class="pl-c">// is Min[int]</span></pre></div> <p dir="auto">So I don't think introducing default type arguments makes this any worse.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-7c8c77" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>6</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>6</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AE984" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-1302328" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="6082bf576c3e869ddec0ef716e87c1ad270a246e076a85f2518adfbd2cb89066" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1302328-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1302328-list" aria-labelledby="tooltip-48220b3c-9277-4c49-8abb-def1a453b4db" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-48220b3c-9277-4c49-8abb-def1a453b4db" for="Comment-actions-1302328-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1302328-list" role="menu" aria-labelledby="Comment-actions-1302328-text"> <include-fragment src="/golang/go/discussions/48287/comments/1302328/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1302328" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1302328,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="5d86e5c276f0057e1f44d79f3651a7ac4b590c7e3b842135ea4d089a9738ad92" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Merovius" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/720787?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">Merovius</span> </div> </a> <a href="#discussioncomment-1302328" id="discussioncomment-1302328-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-09T15:30:40Z" class="no-wrap">Sep 9, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h3> </div> </div> <div class="color-bg-default border-bottom position-relative"> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1302328/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1302328" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto">Personally, I don't like the asymmetry this would create between type-parameters and regular parameters. Default values for arguments is something that has often been asked about, but we never did it. To me, the case for default type arguments isn't really stronger than for default regular arguments though.</p> <p dir="auto">I also don't like introducing a new language feature just for a one-time migration. If the motivator for this feature is just the migration of pre-generics APIs to post-generics APIs, it will become de-facto obsolete in a year or so. I don't like that idea.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 47" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-1302328" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>47</span> </button> <tool-tip id="tooltip-0cd3c254-f92b-4fd2-8d82-b14f02c1caf0" for="discussion-upvote-button-DiscussionComment-1302328" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-1131c5" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>78</span> </button> <button name="input[content]" id="reactions--reaction_button_component-e4c8de" value="THUMBS_DOWN react" data-button-index-position="1" data-reaction-label="-1" data-reaction-content="-1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>3</span> </button> <button name="input[content]" id="reactions--reaction_button_component-8dd978" value="HEART react" data-button-index-position="5" data-reaction-label="Heart" data-reaction-content="heart" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="heart" fallback-src="https://github.githubassets.com/assets/2764-982dc91ea48a.png" class="social-button-emoji">❤️</g-emoji> <span>9</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>78</span> </li> <li class="dropdown-item" aria-label="-1"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>3</span> </li> <li class="dropdown-item" aria-label="heart"> <g-emoji alias="heart" fallback-src="https://github.githubassets.com/assets/2764-982dc91ea48a.png" class="social-button-emoji">❤️</g-emoji> <span>9</span> </li> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 7 replies </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker color-bg-inset border-top color-border-default mt-n1 rounded-bottom-2" data-child-comments id="child-comments-discussioncomment-1302328"> <div data-view-component="true" class="TimelineItem TimelineItem--condensed discussion-nested-comment-paging-form pt-0 ml-0"> <div style="background-color: transparent; left: 30px;" data-view-component="true" class="TimelineItem-badge discussion-nested-comment-paging-badge pb-3 mt-0 pt-4"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg></div> <div data-view-component="true" class="TimelineItem-body discussion-nested-comment-paging-form-body"> <!-- '"` --><!-- </textarea></xmp> --></option></form><form data-replace-remote-form-target="child-comments-discussioncomment-1302328" data-replace-remote-form="true" data-turbo="false" action="/golang/go/discussions/48287/comments/1302328/threads" accept-charset="UTF-8" method="get"> <input type="hidden" name="back_page" value="1"> <input type="hidden" name="forward_page" value="0"> <input type="hidden" name="anchor_id" value="1306718"> <button data-disable-with="Loading more replies..." type="submit" data-view-component="true" class="Button--link Button--medium Button mb-2 pl-2 pt-2"> <span class="Button-content"> <span class="Button-label">Show 2 previous replies</span> </span> </button> </form></div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1306718,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="2e9e77d886f69e04a8c5a2f0d57e76426ca91c5102814d2953e4d06fc7e1f8b2" data-hovercard-type="user" data-hovercard-url="/users/rogpeppe/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/rogpeppe"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/66491?s=60&amp;v=4" width="30" height="30" alt="@rogpeppe" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1306718" data-gid="DC_kwDOAWBuf84AE_Be" data-url="/golang/go/discussions/48287/comments/1306718" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="d637b8e4534542f6ed99d551dbb88983dbc8de3de3e212d6d368739a4e7c5629" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1306718-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1306718-list" aria-labelledby="tooltip-d0d6cfd4-50fd-4d18-8410-59a5fc0b26fb" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-d0d6cfd4-50fd-4d18-8410-59a5fc0b26fb" for="Comment-actions-1306718-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1306718-list" role="menu" aria-labelledby="Comment-actions-1306718-text"> <include-fragment src="/golang/go/discussions/48287/comments/1306718/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1306718" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1306718,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="2e9e77d886f69e04a8c5a2f0d57e76426ca91c5102814d2953e4d06fc7e1f8b2" data-hovercard-type="user" data-hovercard-url="/users/rogpeppe/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/rogpeppe" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> rogpeppe </a> <a href="#discussioncomment-1306718" id="discussioncomment-1306718-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-10T12:30:19Z" class="no-wrap">Sep 10, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > <span title="This user is a collaborator on this repository." data-view-component="true" class="Label py-0 ml-1"> Collaborator </span> </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1306718/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1306718" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <blockquote> <p dir="auto">Default type arguments, however, are motivated by a one-time migration of pre-generics APIs to post-generics APIs. At some point, there won't be any pre-generics APIs left (i.e. every new API created after go 1.18 is a post-generics API) and they become obsolete.</p> </blockquote> <p dir="auto">I'm not sure that's true. With a small tweak to the rules, default type arguments could be useful any time a type parameter is added to an existing API, which I suspect will be more than we currently think, particularly in larger programs.</p> <p dir="auto">The rule that I'd suggest tweaking would be this one:</p> <blockquote> <p dir="auto">The rule for types could be that the bracketed type parameter list may be omitted when all parameters have defaults</p> </blockquote> <p dir="auto">in favour of:</p> <blockquote> <p dir="auto">The rule for types is that they may be omitted if that parameter and all following parameters have defaults and all the following types are omitted as well.</p> </blockquote> <p dir="auto">That change could also be made at a later date without problem, I think.</p> <p dir="auto">I don't really buy the parallel with default function arguments - functions are first-class values in Go but generic types and functions are not, so the impact of adding default arguments to functions is considerably deeper and has more runtime implications (think of the issues that Python has with default arguments, for example) than adding them for type arguments.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-ad1ee5" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>14</span> </button> <button name="input[content]" id="reactions--reaction_button_component-d4c8e5" value="CONFUSED react" data-button-index-position="4" data-reaction-label="Confused" data-reaction-content="thinking_face" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="thinking_face" fallback-src="https://github.githubassets.com/assets/1f615-4bb1369c4251.png" class="social-button-emoji">😕</g-emoji> <span>2</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>14</span> </li> <li class="dropdown-item" aria-label="thinking_face"> <g-emoji alias="thinking_face" fallback-src="https://github.githubassets.com/assets/1f615-4bb1369c4251.png" class="social-button-emoji">😕</g-emoji> <span>2</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1307044,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="8e70f82112cacffcdfcad2049e6a527ed0725dbb706053d5ae7fecd18a80425c" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Merovius"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/720787?s=60&amp;v=4" width="30" height="30" alt="@Merovius" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1307044" data-gid="DC_kwDOAWBuf84AE_Gk" data-url="/golang/go/discussions/48287/comments/1307044" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="60af41e0e5024a4051d4465905fe119499226461893c58dcd48f7383b60ef1fa" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1307044-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1307044-list" aria-labelledby="tooltip-8a5df1c8-6146-4cd3-a607-c3a976c8ce3a" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-8a5df1c8-6146-4cd3-a607-c3a976c8ce3a" for="Comment-actions-1307044-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1307044-list" role="menu" aria-labelledby="Comment-actions-1307044-text"> <include-fragment src="/golang/go/discussions/48287/comments/1307044/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1307044" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1307044,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="8e70f82112cacffcdfcad2049e6a527ed0725dbb706053d5ae7fecd18a80425c" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Merovius" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> Merovius </a> <a href="#discussioncomment-1307044" id="discussioncomment-1307044-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-10T13:44:52Z" class="no-wrap">Sep 10, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1307044/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1307044" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <blockquote> <p dir="auto">I'm not sure that's true. With a small tweak to the rules, default type arguments could be useful any time a type parameter is added to an existing API, which I suspect will be more than we currently think, particularly in larger programs.</p> </blockquote> <p dir="auto">I think wanting to add parameters to functions is even more common. And yet we never made that easier with default arguments. There are many changes to APIs which are fairly commonly useful. We don't support most of them.</p> <p dir="auto">If I want to, say, add a <code class="notranslate">context.Context</code> argument to a function, I have to come up with a new name for the migration. I don't see why adding type parameters should get any preferential treatment here.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-c26e13" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>11</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>11</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1309974,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="954b9ecaf2fdca0f720640fe4e673aee96777dbd8b374ecf7ca40931e60da2d5" data-hovercard-type="user" data-hovercard-url="/users/rogpeppe/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/rogpeppe"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/66491?s=60&amp;v=4" width="30" height="30" alt="@rogpeppe" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1309974" data-gid="DC_kwDOAWBuf84AE_0W" data-url="/golang/go/discussions/48287/comments/1309974" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="902f9bb0c268293df4cc122e1e13d6c32494a8da40981e9f4c5b5d75256c93ba" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1309974-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1309974-list" aria-labelledby="tooltip-9bec370b-3788-431a-a235-e1d5373ecf02" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-9bec370b-3788-431a-a235-e1d5373ecf02" for="Comment-actions-1309974-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1309974-list" role="menu" aria-labelledby="Comment-actions-1309974-text"> <include-fragment src="/golang/go/discussions/48287/comments/1309974/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1309974" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1309974,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="954b9ecaf2fdca0f720640fe4e673aee96777dbd8b374ecf7ca40931e60da2d5" data-hovercard-type="user" data-hovercard-url="/users/rogpeppe/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/rogpeppe" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> rogpeppe </a> <a href="#discussioncomment-1309974" id="discussioncomment-1309974-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-11T10:52:22Z" class="no-wrap">Sep 11, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > <span title="This user is a collaborator on this repository." data-view-component="true" class="Label py-0 ml-1"> Collaborator </span> </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1309974/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1309974" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <blockquote> <p dir="auto">I think wanting to add parameters to functions is even more common. And yet we never made that easier with default arguments.</p> </blockquote> <p dir="auto">It might be more common, but adding function default parameters to the language is <em>hard</em>. I don't think anyone knows how to do it, and it would have big implications for existing code (I'm not sure it would be possible to add them without breaking compatibility). By contrast, adding default type arguments is easy.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-26a0fc" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>4</span> </button> <button name="input[content]" id="reactions--reaction_button_component-1f562d" value="THUMBS_DOWN react" data-button-index-position="1" data-reaction-label="-1" data-reaction-content="-1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>1</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>4</span> </li> <li class="dropdown-item" aria-label="-1"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>1</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1345715,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="f083285581c9a39fdbfc432acaec5ab7e3e9bd17436485727d68101b7fe74e66" data-hovercard-type="user" data-hovercard-url="/users/AndrewHarrisSPU/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/AndrewHarrisSPU"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/44661351?s=60&amp;v=4" width="30" height="30" alt="@AndrewHarrisSPU" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1345715" data-gid="DC_kwDOAWBuf84AFIiz" data-url="/golang/go/discussions/48287/comments/1345715" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="d5810ec04daf629ea78b0ffa6fea22a258904ff6e5fca4e259f0469c89d5b6ba" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1345715-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1345715-list" aria-labelledby="tooltip-80fce16a-96ff-443e-9fcc-f98f369b9b92" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-80fce16a-96ff-443e-9fcc-f98f369b9b92" for="Comment-actions-1345715-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1345715-list" role="menu" aria-labelledby="Comment-actions-1345715-text"> <include-fragment src="/golang/go/discussions/48287/comments/1345715/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1345715" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> <edit-history> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" aria-haspopup="true" aria-controls="discussion-edit-history-1345715-list" aria-expanded="false" id="discussion-edit-history-1345715-text" data-target="edit-history.menuTrigger" type="button" data-view-component="true" class="Button--invisible Button--small Button"> <span class="Button-content"> <span class="Button-label">edited</span> </span> <span class="Button-visual Button-trailingAction"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path> </svg> </span> </button> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="discussion-edit-history-1345715-list" role="menu" aria-labelledby="discussion-edit-history-1345715-text"> <include-fragment src="/golang/go/discussions/48287/comments/1345715/edits_log" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="edit-history.deletedDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> {{actor}} deleted this content <relative-time class="no-wrap" datetime="{{datetime}}"></relative-time>. </div> </scrollable-region> </dialog></dialog-helper> </template> <template data-target="edit-history.diffDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-large Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body p-0"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> </edit-history> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1345715,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="f083285581c9a39fdbfc432acaec5ab7e3e9bd17436485727d68101b7fe74e66" data-hovercard-type="user" data-hovercard-url="/users/AndrewHarrisSPU/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/AndrewHarrisSPU" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> AndrewHarrisSPU </a> <a href="#discussioncomment-1345715" id="discussioncomment-1345715-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-17T06:05:46Z" class="no-wrap">Sep 17, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1345715/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1345715" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">I hope I'm not saying this in too abruptly - maybe I'm missing something - but would the rule rewrite effectively mean this:</p> <blockquote> <blockquote> <p dir="auto">The rule for types is that they may be omitted if that parameter and all following parameters have defaults and all the following types are omitted as well. <em>Also, that the default won't be changed at a later point in time.</em></p> </blockquote> </blockquote> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:3747004,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="2e028c4ad22f090ae66638b057325afca7ac984b4cc02ac853cae20cc091a5a3" data-hovercard-type="user" data-hovercard-url="/users/apparentlymart/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/apparentlymart"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/20180?s=60&amp;v=4" width="30" height="30" alt="@apparentlymart" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-3747004" data-gid="DC_kwDOAWBuf84AOSy8" data-url="/golang/go/discussions/48287/comments/3747004" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="f534cdb3f1bb09b20c1b8f00c486e99becc09714a5a08faa3ac95a4bc2971b28" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-3747004-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-3747004-list" aria-labelledby="tooltip-f9faadf2-65ad-4ce4-912e-05e8d526d46c" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-f9faadf2-65ad-4ce4-912e-05e8d526d46c" for="Comment-actions-3747004-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-3747004-list" role="menu" aria-labelledby="Comment-actions-3747004-text"> <include-fragment src="/golang/go/discussions/48287/comments/3747004/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F3747004" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> <edit-history> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" aria-haspopup="true" aria-controls="discussion-edit-history-3747004-list" aria-expanded="false" id="discussion-edit-history-3747004-text" data-target="edit-history.menuTrigger" type="button" data-view-component="true" class="Button--invisible Button--small Button"> <span class="Button-content"> <span class="Button-label">edited</span> </span> <span class="Button-visual Button-trailingAction"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path> </svg> </span> </button> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="discussion-edit-history-3747004-list" role="menu" aria-labelledby="discussion-edit-history-3747004-text"> <include-fragment src="/golang/go/discussions/48287/comments/3747004/edits_log" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="edit-history.deletedDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> {{actor}} deleted this content <relative-time class="no-wrap" datetime="{{datetime}}"></relative-time>. </div> </scrollable-region> </dialog></dialog-helper> </template> <template data-target="edit-history.diffDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-large Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body p-0"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> </edit-history> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:3747004,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="2e028c4ad22f090ae66638b057325afca7ac984b4cc02ac853cae20cc091a5a3" data-hovercard-type="user" data-hovercard-url="/users/apparentlymart/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/apparentlymart" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> apparentlymart </a> <a href="#discussioncomment-3747004" id="discussioncomment-3747004-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2022-09-27T21:55:15Z" class="no-wrap">Sep 27, 2022</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/3747004/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="3747004" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">I must admit that I'm not really sure how I feel about default types for type parameters or default values for function parameters, but one difference I can see between those two situations is that the patterns often employed to create later-extensible function signatures (e.g. a single argument of a struct type representing all the args, or the de-facto functional options pattern) are not applicable to type signatures.</p> <p dir="auto">In other words, if I have the foresight to predict that a particular function might need additional arguments later then there are API design patterns I can follow to make it possible to do so without a breaking change. It isn't clear yet what I would do if I anticipate additional type parameters being added in future. Perhaps optional type parameters with defaults is an answer to that (with that also being useful to retrofit type parameters where there were originally none), or perhaps there's some other answer (which may or may not address the problem of retroactively introducing type parameters to a pre-generics codebase).</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-38c9d7" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>3</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>3</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AE99D" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-1302339" data-gid="DC_kwDOAWBuf84AE99D" data-url="/golang/go/discussions/48287/comments/1302339" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="e3c51ec1c54b6b65bedf1b5fedafe4d1cd84c9e914c2735b5b1cdfd8f5c6429f" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1302339-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1302339-list" aria-labelledby="tooltip-aace9c82-2de4-408f-84ba-073142c235e6" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-aace9c82-2de4-408f-84ba-073142c235e6" for="Comment-actions-1302339-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1302339-list" role="menu" aria-labelledby="Comment-actions-1302339-text"> <include-fragment src="/golang/go/discussions/48287/comments/1302339/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1302339" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1302339,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="db00bea70143d990354017f5cc6685bc9979c29dd2578ffeafc4d7aef4b3f842" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Merovius" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/720787?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">Merovius</span> </div> </a> <a href="#discussioncomment-1302339" id="discussioncomment-1302339-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-09T15:33:07Z" class="no-wrap">Sep 9, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h3> </div> </div> <div class="color-bg-default border-bottom position-relative"> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1302339/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1302339" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto">One more data-point: This strategy wouldn't help with <code class="notranslate">sort.Slice</code>, for example. At least as far as I can tell. Even though it looks like we might lean towards making that <code class="notranslate">slices.Sort</code>, I feel like this speaks against this as a general strategy. Many generic APIs can't just replace an <code class="notranslate">interface{}</code> with a type-parameter.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 5" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-1302339" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>5</span> </button> <tool-tip id="tooltip-916fcd82-f534-4ecf-89f9-4082d4348e8f" for="discussion-upvote-button-DiscussionComment-1302339" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-717730" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>4</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>4</span> </li> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 4 replies </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker color-bg-inset border-top color-border-default mt-n1 rounded-bottom-2" data-child-comments id="child-comments-discussioncomment-1302339"> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1302378,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="fb390449c19dea5f6cedcc4240c27daaaa80e1ab48017c832c8fdde80d28e7cd" data-hovercard-type="user" data-hovercard-url="/users/rsc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/rsc"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/104030?s=60&amp;v=4" width="30" height="30" alt="@rsc" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1302378" data-gid="DC_kwDOAWBuf84AE99q" data-url="/golang/go/discussions/48287/comments/1302378" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="3468e9982b1308a397aab52108ebdad6182176c2d434ff75c229820843917016" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1302378-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1302378-list" aria-labelledby="tooltip-96a06300-3b5f-45ab-aadd-e9d0d51fb7df" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-96a06300-3b5f-45ab-aadd-e9d0d51fb7df" for="Comment-actions-1302378-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1302378-list" role="menu" aria-labelledby="Comment-actions-1302378-text"> <include-fragment src="/golang/go/discussions/48287/comments/1302378/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1302378" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1302378,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="fb390449c19dea5f6cedcc4240c27daaaa80e1ab48017c832c8fdde80d28e7cd" data-hovercard-type="user" data-hovercard-url="/users/rsc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/rsc" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> rsc </a> <a href="#discussioncomment-1302378" id="discussioncomment-1302378-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-09T15:42:37Z" class="no-wrap">Sep 9, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > <span title="This user is a maintainer on this repository." data-view-component="true" class="Label py-0 ml-1"> Maintainer </span> <span title="This user is the author of this discussion." data-view-component="true" class="Label py-0 ml-1"> Author </span> </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1302378/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1302378" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">sort.Slice was always an odd-ball, because of the comparison function taking indexes and not values. It was never going to transition smoothly to generics.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1302417,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="08a491b399a1f32799b0a6d15da6fa74af5e9624dbd7282170dd95ccc2a1a992" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Merovius"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/720787?s=60&amp;v=4" width="30" height="30" alt="@Merovius" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1302417" data-gid="DC_kwDOAWBuf84AE9-R" data-url="/golang/go/discussions/48287/comments/1302417" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="7d26fa3a7094f8a686b30ab61685133c5ea9f543af7faf82c55058ce9fcd956c" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1302417-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1302417-list" aria-labelledby="tooltip-b68221d0-e8c0-4e30-95f0-0e9b2f4ae491" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-b68221d0-e8c0-4e30-95f0-0e9b2f4ae491" for="Comment-actions-1302417-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1302417-list" role="menu" aria-labelledby="Comment-actions-1302417-text"> <include-fragment src="/golang/go/discussions/48287/comments/1302417/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1302417" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1302417,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="08a491b399a1f32799b0a6d15da6fa74af5e9624dbd7282170dd95ccc2a1a992" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Merovius" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> Merovius </a> <a href="#discussioncomment-1302417" id="discussioncomment-1302417-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-09T15:51:57Z" class="no-wrap">Sep 9, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1302417/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1302417" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">Yes. That's pretty much my argument :) I don't see a general strategy for smooth transition to generics working.</p> <p dir="auto">Personally, I'd rather figure out if we can do a <code class="notranslate">v2</code> of stdlib packages or something like that and lean into cleaning up APIs for generics.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-47d3a5" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>70</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>70</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1302562,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="b7cdde065e810bf70a9c92d17018d366e0249c89f93b099f1f2e88ac8535a69f" data-hovercard-type="user" data-hovercard-url="/users/rsc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/rsc"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/104030?s=60&amp;v=4" width="30" height="30" alt="@rsc" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1302562" data-gid="DC_kwDOAWBuf84AE-Ai" data-url="/golang/go/discussions/48287/comments/1302562" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="c1ad54deaa75a74c7f8b67298067a5d5eced2f2e2029628d082ba3bd61468d84" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1302562-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1302562-list" aria-labelledby="tooltip-ec4f25c5-6e67-45eb-b7a4-768b873d7182" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-ec4f25c5-6e67-45eb-b7a4-768b873d7182" for="Comment-actions-1302562-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1302562-list" role="menu" aria-labelledby="Comment-actions-1302562-text"> <include-fragment src="/golang/go/discussions/48287/comments/1302562/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1302562" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1302562,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="b7cdde065e810bf70a9c92d17018d366e0249c89f93b099f1f2e88ac8535a69f" data-hovercard-type="user" data-hovercard-url="/users/rsc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/rsc" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> rsc </a> <a href="#discussioncomment-1302562" id="discussioncomment-1302562-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-09T16:18:00Z" class="no-wrap">Sep 9, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > <span title="This user is a maintainer on this repository." data-view-component="true" class="Label py-0 ml-1"> Maintainer </span> <span title="This user is the author of this discussion." data-view-component="true" class="Label py-0 ml-1"> Author </span> </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1302562/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1302562" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">Most types are nothing like sort.Slice.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-884c71" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>13</span> </button> <button name="input[content]" id="reactions--reaction_button_component-bb0128" value="THUMBS_DOWN react" data-button-index-position="1" data-reaction-label="-1" data-reaction-content="-1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>1</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>13</span> </li> <li class="dropdown-item" aria-label="-1"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>1</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1343627,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="d972cc815abb409697732ed8ecfa6b89bffafe7e1c0de98e950a8fd59c0b796d" data-hovercard-type="user" data-hovercard-url="/users/earthboundkid/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/earthboundkid"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/222245?s=60&amp;v=4" width="30" height="30" alt="@earthboundkid" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1343627" data-gid="DC_kwDOAWBuf84AFICL" data-url="/golang/go/discussions/48287/comments/1343627" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="2121d5d6ff71c1266d14b3b04e37caa5e64fb5b4972020489d15dd20892c1536" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1343627-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1343627-list" aria-labelledby="tooltip-4477ef4f-2976-4069-abe0-8b3fc70ff5fa" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-4477ef4f-2976-4069-abe0-8b3fc70ff5fa" for="Comment-actions-1343627-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1343627-list" role="menu" aria-labelledby="Comment-actions-1343627-text"> <include-fragment src="/golang/go/discussions/48287/comments/1343627/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1343627" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1343627,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="d972cc815abb409697732ed8ecfa6b89bffafe7e1c0de98e950a8fd59c0b796d" data-hovercard-type="user" data-hovercard-url="/users/earthboundkid/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/earthboundkid" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> earthboundkid </a> <a href="#discussioncomment-1343627" id="discussioncomment-1343627-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-16T17:47:08Z" class="no-wrap">Sep 16, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1343627/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1343627" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">containers/heap has the same problem as sort.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-7560e8" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>1</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>1</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AE-Kg" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-1303200" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="275baf489431cca9dc0c47f7a34af65309de6989dfe655b565e05fb73ff0d4c3" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1303200-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1303200-list" aria-labelledby="tooltip-bc4ea2ba-ee3b-41b3-849d-d7d089d716ae" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-bc4ea2ba-ee3b-41b3-849d-d7d089d716ae" for="Comment-actions-1303200-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1303200-list" role="menu" aria-labelledby="Comment-actions-1303200-text"> <include-fragment src="/golang/go/discussions/48287/comments/1303200/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1303200" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1303200,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="95262304ee6fe4682893c0a46862dab87aece7f4bd1fd09f8f17ab9dd9c037bc" data-hovercard-type="user" data-hovercard-url="/users/zephyrtronium/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/zephyrtronium" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/1428115?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">zephyrtronium</span> </div> </a> <a href="#discussioncomment-1303200" id="discussioncomment-1303200-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-09T18:33:06Z" class="no-wrap">Sep 9, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h3> </div> </div> <div class="color-bg-default border-bottom position-relative"> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1303200/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1303200" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto">Using new major versions for stdlib packages, e.g. <code class="notranslate">sort/v2</code>, seems like a clean solution to me. I've seen a few people mention this, generally with a disclaimer like "there seems to be opposition to the idea," but I haven't seen the counterarguments. As a bonus, the precedent could also facilitate redesigns independent of generics, like <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="339152918" data-permission-text="Title is private" data-url="https://github.com/golang/go/issues/26263" data-hovercard-type="issue" data-hovercard-url="/golang/go/issues/26263/hovercard" href="https://github.com/golang/go/issues/26263">#26263</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="273589055" data-permission-text="Title is private" data-url="https://github.com/golang/go/issues/22697" data-hovercard-type="issue" data-hovercard-url="/golang/go/issues/22697/hovercard" href="https://github.com/golang/go/issues/22697">#22697</a>.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 104" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-1303200" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>104</span> </button> <tool-tip id="tooltip-500f89a5-96b8-4e34-8d9d-25aa75bcb701" for="discussion-upvote-button-DiscussionComment-1303200" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-5e2334" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>147</span> </button> <button name="input[content]" id="reactions--reaction_button_component-eda51c" value="THUMBS_DOWN react" data-button-index-position="1" data-reaction-label="-1" data-reaction-content="-1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>14</span> </button> <button name="input[content]" id="reactions--reaction_button_component-f16e98" value="CONFUSED react" data-button-index-position="4" data-reaction-label="Confused" data-reaction-content="thinking_face" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="thinking_face" fallback-src="https://github.githubassets.com/assets/1f615-4bb1369c4251.png" class="social-button-emoji">😕</g-emoji> <span>3</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>147</span> </li> <li class="dropdown-item" aria-label="-1"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>14</span> </li> <li class="dropdown-item" aria-label="thinking_face"> <g-emoji alias="thinking_face" fallback-src="https://github.githubassets.com/assets/1f615-4bb1369c4251.png" class="social-button-emoji">😕</g-emoji> <span>3</span> </li> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 37 replies </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker color-bg-inset border-top color-border-default mt-n1 rounded-bottom-2" data-child-comments id="child-comments-discussioncomment-1303200"> <div data-view-component="true" class="TimelineItem TimelineItem--condensed discussion-nested-comment-paging-form pt-0 ml-0"> <div style="background-color: transparent; left: 30px;" data-view-component="true" class="TimelineItem-badge discussion-nested-comment-paging-badge pb-3 mt-0 pt-4"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg></div> <div data-view-component="true" class="TimelineItem-body discussion-nested-comment-paging-form-body"> <!-- '"` --><!-- </textarea></xmp> --></option></form><form data-replace-remote-form-target="child-comments-discussioncomment-1303200" data-replace-remote-form="true" data-turbo="false" action="/golang/go/discussions/48287/comments/1303200/threads" accept-charset="UTF-8" method="get"> <input type="hidden" name="back_page" value="1"> <input type="hidden" name="forward_page" value="0"> <input type="hidden" name="anchor_id" value="1364787"> <button data-disable-with="Loading more replies..." type="submit" data-view-component="true" class="Button--link Button--medium Button mb-2 pl-2 pt-2"> <span class="Button-content"> <span class="Button-label">Show 32 previous replies</span> </span> </button> </form></div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1364787,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="b3ba33957dbbf7fcd30a02ec78baa9c9f7a9691676f95d044e097c9f8dfe05e8" data-hovercard-type="user" data-hovercard-url="/users/smyrman/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/smyrman"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/75205?s=60&amp;v=4" width="30" height="30" alt="@smyrman" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1364787" data-gid="DC_kwDOAWBuf84AFNMz" data-url="/golang/go/discussions/48287/comments/1364787" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="3208c77ccb2d245ea5df06471cb87f50f709023174d8154d6c4fe3d7ce597294" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1364787-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1364787-list" aria-labelledby="tooltip-fb3310a7-f47a-408e-b462-19fd9442e115" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-fb3310a7-f47a-408e-b462-19fd9442e115" for="Comment-actions-1364787-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1364787-list" role="menu" aria-labelledby="Comment-actions-1364787-text"> <include-fragment src="/golang/go/discussions/48287/comments/1364787/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1364787" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1364787,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="b3ba33957dbbf7fcd30a02ec78baa9c9f7a9691676f95d044e097c9f8dfe05e8" data-hovercard-type="user" data-hovercard-url="/users/smyrman/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/smyrman" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> smyrman </a> <a href="#discussioncomment-1364787" id="discussioncomment-1364787-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-21T23:15:59Z" class="no-wrap">Sep 21, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1364787/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1364787" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <blockquote> <p dir="auto">I don't see any inherent difficulty with net/http/v2 and encoding/json/v2 and archive/zip/v2. I don't think it would make sense to have net/v2/http`. Maybe I'm missing something.</p> </blockquote> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ianlancetaylor/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ianlancetaylor">@ianlancetaylor</a>, usually sub-packages import the parent package, so I wold think there are potentially acceptable reasons you might want the versioning to be after the first element. E.g. if introducing a breaking change to <code class="notranslate">net.Listener</code> in <code class="notranslate">net/v2</code> (arbitrary example), then surely you would need a <code class="notranslate">v2</code> pacakge of <code class="notranslate">net/http</code> as well, and then <code class="notranslate">net/v2/http</code> would be a sensible way of communicating that dependency.</p> <p dir="auto">Given package versioning in the standard library is done <em>infrequently</em> and with <em>great care</em>, then the added duplication and potential cleanup that would result of introducing versioning after the first path element, might be an acceptable trade-off.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-44dc0a" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>2</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>2</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1364805,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="d944af46a272e481c435b70cd7f99f6d155b9f94bfadedbf54eaef1510d8ef53" data-hovercard-type="user" data-hovercard-url="/users/ianlancetaylor/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/ianlancetaylor"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/3194333?s=60&amp;v=4" width="30" height="30" alt="@ianlancetaylor" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1364805" data-gid="DC_kwDOAWBuf84AFNNF" data-url="/golang/go/discussions/48287/comments/1364805" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="3be9f3338eb7758b129e55a310e55d3f38f6247ae7b2fbb2917b1607a138431a" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1364805-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1364805-list" aria-labelledby="tooltip-d522a14c-e478-44ad-96be-7a4e6fd2ed63" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-d522a14c-e478-44ad-96be-7a4e6fd2ed63" for="Comment-actions-1364805-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1364805-list" role="menu" aria-labelledby="Comment-actions-1364805-text"> <include-fragment src="/golang/go/discussions/48287/comments/1364805/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1364805" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1364805,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="d944af46a272e481c435b70cd7f99f6d155b9f94bfadedbf54eaef1510d8ef53" data-hovercard-type="user" data-hovercard-url="/users/ianlancetaylor/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/ianlancetaylor" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> ianlancetaylor </a> <a href="#discussioncomment-1364805" id="discussioncomment-1364805-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-21T23:25:40Z" class="no-wrap">Sep 21, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > <span title="This user is a maintainer on this repository." data-view-component="true" class="Label py-0 ml-1"> Maintainer </span> </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1364805/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1364805" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">I don't think the interesting argument is whether the subpackage imports the parent package. I think the interesting argument is whether we would normally want to have a v2 version of all the subpackages at the same time. For example, it seems to me that writing a v2 of encoding/json or encoding/xml in no way implies that we need or want a v2 of encoding/binary or encoding/base64 or encoding/hex, or, for that matter, of encoding itself.</p> <p dir="auto">For the case of archive/zip, note that archive/zip does not import archive. In fact, there is no archive package.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-d323bd" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>5</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>5</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1367458,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="f175fa6dc4db136ca7e56128da52a635938e865bdd4647769135a74a47ba55f3" data-hovercard-type="user" data-hovercard-url="/users/smyrman/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/smyrman"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/75205?s=60&amp;v=4" width="30" height="30" alt="@smyrman" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1367458" data-gid="DC_kwDOAWBuf84AFN2i" data-url="/golang/go/discussions/48287/comments/1367458" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="af6459ec2f1a6cf88cd15c0259017c32e49333f7f761ed79cd8b5c8441b7030b" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1367458-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1367458-list" aria-labelledby="tooltip-535d3080-07a7-4777-ae28-b2ffb93ae559" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-535d3080-07a7-4777-ae28-b2ffb93ae559" for="Comment-actions-1367458-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1367458-list" role="menu" aria-labelledby="Comment-actions-1367458-text"> <include-fragment src="/golang/go/discussions/48287/comments/1367458/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1367458" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> <edit-history> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" aria-haspopup="true" aria-controls="discussion-edit-history-1367458-list" aria-expanded="false" id="discussion-edit-history-1367458-text" data-target="edit-history.menuTrigger" type="button" data-view-component="true" class="Button--invisible Button--small Button"> <span class="Button-content"> <span class="Button-label">edited</span> </span> <span class="Button-visual Button-trailingAction"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path> </svg> </span> </button> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="discussion-edit-history-1367458-list" role="menu" aria-labelledby="discussion-edit-history-1367458-text"> <include-fragment src="/golang/go/discussions/48287/comments/1367458/edits_log" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="edit-history.deletedDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> {{actor}} deleted this content <relative-time class="no-wrap" datetime="{{datetime}}"></relative-time>. </div> </scrollable-region> </dialog></dialog-helper> </template> <template data-target="edit-history.diffDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-large Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body p-0"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> </edit-history> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1367458,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="f175fa6dc4db136ca7e56128da52a635938e865bdd4647769135a74a47ba55f3" data-hovercard-type="user" data-hovercard-url="/users/smyrman/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/smyrman" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> smyrman </a> <a href="#discussioncomment-1367458" id="discussioncomment-1367458-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-22T06:44:12Z" class="no-wrap">Sep 22, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1367458/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1367458" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <blockquote> <p dir="auto">I think the interesting argument is whether we would normally want to have a v2 version of all the sub-packages at the same time.</p> </blockquote> <p dir="auto">I completely agree to that. I am not to worried either way, as I think the answer to this question would become more clear with proto-types. The more v2 proto-types (related to generics or not) the better. If the proto-type doesn't have to be in code, but could be in the form of a Gist or a blog article, then anyone can write one.</p> <p dir="auto">I won't be writing any proto-types in code, but I though I would do a few articles to visualize how a <code class="notranslate">v2</code> of different packages might look like for generics in particular. I have started out with an article for <code class="notranslate">sync/v2</code>, showing a potential <code class="notranslate">sync/v2/atomic</code> as well. I will share it when it's in a more ready state. I also started looking at <code class="notranslate">math/v2</code> which has a higher number of sub-packages. If anyone feeels inspired to write a piece on this, and beats me to it, then I don't mind.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1471062,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="91dfeadd9f136d59555d139eb55750f24d5f427a8b144ae3025684b88b24beb4" data-hovercard-type="user" data-hovercard-url="/users/lpar/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/lpar"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/857035?s=60&amp;v=4" width="30" height="30" alt="@lpar" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1471062" data-gid="DC_kwDOAWBuf84AFnJW" data-url="/golang/go/discussions/48287/comments/1471062" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="a900424215b22f54589e940bae0d7f2d332366ecbbfbc42a164d7814674e8066" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1471062-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1471062-list" aria-labelledby="tooltip-dda4c014-b7d8-4e29-b7c5-c1756d607e3f" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-dda4c014-b7d8-4e29-b7c5-c1756d607e3f" for="Comment-actions-1471062-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1471062-list" role="menu" aria-labelledby="Comment-actions-1471062-text"> <include-fragment src="/golang/go/discussions/48287/comments/1471062/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1471062" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> <edit-history> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" aria-haspopup="true" aria-controls="discussion-edit-history-1471062-list" aria-expanded="false" id="discussion-edit-history-1471062-text" data-target="edit-history.menuTrigger" type="button" data-view-component="true" class="Button--invisible Button--small Button"> <span class="Button-content"> <span class="Button-label">edited</span> </span> <span class="Button-visual Button-trailingAction"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path> </svg> </span> </button> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="discussion-edit-history-1471062-list" role="menu" aria-labelledby="discussion-edit-history-1471062-text"> <include-fragment src="/golang/go/discussions/48287/comments/1471062/edits_log" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="edit-history.deletedDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> {{actor}} deleted this content <relative-time class="no-wrap" datetime="{{datetime}}"></relative-time>. </div> </scrollable-region> </dialog></dialog-helper> </template> <template data-target="edit-history.diffDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-large Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body p-0"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> </edit-history> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1471062,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="91dfeadd9f136d59555d139eb55750f24d5f427a8b144ae3025684b88b24beb4" data-hovercard-type="user" data-hovercard-url="/users/lpar/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/lpar" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> lpar </a> <a href="#discussioncomment-1471062" id="discussioncomment-1471062-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-10-13T13:50:46Z" class="no-wrap">Oct 13, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1471062/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1471062" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <blockquote> <p dir="auto">None of this is meant to imply that versioning standard library packages is a good idea, or a bad idea. It does solve the problem at hand, but it's a little weird to have to remember to write <code class="notranslate">math/v2</code>.</p> </blockquote> <p dir="auto">Well, that’s a problem with Go’s package system in general, not specific to generics. I can’t be the only person who has gotten half way through using a third party library for something and only then discovered that I want the <code class="notranslate">v2</code> version. (Or in some cases the v4 version, I’m looking at you UUID.)</p> <p dir="auto">A solution, of course, would be for the default to be the most recent if the version is not explicitly specified. Perhaps doing generics using regular package naming conventions could apply some pressure to solve that problem for packages in general?</p> <blockquote> <p dir="auto">There is no <code class="notranslate">math2.h</code> or <code class="notranslate">java.lang.Math2</code>.</p> </blockquote> <p dir="auto">On the other hand, Java’s library is now a decent date and time library plus an unholy mess of obsolete non-thread-safe functions that programmers have to remember to avoid. And there’s <code class="notranslate">java.io2</code>, they just decided to call it <code class="notranslate">nio</code> for New IO instead.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-da10e6" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>6</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>6</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1494399,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="d792ccbee7915aeaa676661a7114fd78bd1dc996bd89ce025d040940142faf78" data-hovercard-type="user" data-hovercard-url="/users/smyrman/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/smyrman"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/75205?s=60&amp;v=4" width="30" height="30" alt="@smyrman" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1494399" data-gid="DC_kwDOAWBuf84AFs1_" data-url="/golang/go/discussions/48287/comments/1494399" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="0443942b53e95acc001bca41c03275dbd536d40cc4bdc39dd818843e5601073b" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1494399-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1494399-list" aria-labelledby="tooltip-a08debb4-1d77-4159-b5ac-7bf2946ba1ae" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-a08debb4-1d77-4159-b5ac-7bf2946ba1ae" for="Comment-actions-1494399-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1494399-list" role="menu" aria-labelledby="Comment-actions-1494399-text"> <include-fragment src="/golang/go/discussions/48287/comments/1494399/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1494399" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> <edit-history> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" aria-haspopup="true" aria-controls="discussion-edit-history-1494399-list" aria-expanded="false" id="discussion-edit-history-1494399-text" data-target="edit-history.menuTrigger" type="button" data-view-component="true" class="Button--invisible Button--small Button"> <span class="Button-content"> <span class="Button-label">edited</span> </span> <span class="Button-visual Button-trailingAction"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path> </svg> </span> </button> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="discussion-edit-history-1494399-list" role="menu" aria-labelledby="discussion-edit-history-1494399-text"> <include-fragment src="/golang/go/discussions/48287/comments/1494399/edits_log" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="edit-history.deletedDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> {{actor}} deleted this content <relative-time class="no-wrap" datetime="{{datetime}}"></relative-time>. </div> </scrollable-region> </dialog></dialog-helper> </template> <template data-target="edit-history.diffDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-large Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body p-0"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> </edit-history> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1494399,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="d792ccbee7915aeaa676661a7114fd78bd1dc996bd89ce025d040940142faf78" data-hovercard-type="user" data-hovercard-url="/users/smyrman/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/smyrman" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> smyrman </a> <a href="#discussioncomment-1494399" id="discussioncomment-1494399-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-10-18T09:57:01Z" class="no-wrap">Oct 18, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1494399/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1494399" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <blockquote> <p dir="auto">I though I would do a few articles to visualize how a v2 of different packages might look like for generics in particular. I have started out with an article for sync/v2, showing a potential sync/v2/atomic as well. I will share it when it's in a more ready state.</p> </blockquote> <p dir="auto">My progress on this has been very slow as I have been busy with other stuff, but here is an early draft that might already be useful to read:</p> <ul dir="auto"> <li>intro: <a href="https://github.com/smyrman/blog/blob/master/2021-09-v2-for-generics/1-v2-for-generics.md">https://github.com/smyrman/blog/blob/master/2021-09-v2-for-generics/1-v2-for-generics.md</a></li> <li>sync/v2 + sync/v2/atomics: <a href="https://github.com/smyrman/blog/blob/master/2021-09-v2-for-generics/2-sync-v2.md">https://github.com/smyrman/blog/blob/master/2021-09-v2-for-generics/2-sync-v2.md</a></li> </ul> <p dir="auto">There is a very nice overview of suggestions to changes in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3563602" data-permission-text="Title is private" data-url="https://github.com/golang/go/discussions/48287" data-hovercard-type="discussion" data-hovercard-url="/golang/go/discussions/48287/hovercard?comment_id=1347902" href="https://github.com/golang/go/discussions/48287#discussioncomment-1347902">#48287 (comment)</a>, but I have tried to go a little-bit more in depth. E.g. could we <em>extend</em> the assembly syntax to allow writing a generic version of the various functions in <code class="notranslate">atomic</code>? If so, we could reduce the number of functions from 29 to 5.</p> <p dir="auto">I haven't gotten down to write anything about the <code class="notranslate">math</code> package yet, not to mention <code class="notranslate">math/big</code>. I probably won't get the time to do so anytime soon, but I would actually accept PRs, and be sure to mention anyone contributing to the article if/when I decide to release them for a wider audience.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AE-Lf" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-1303263" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="7597f8c3f505ce47904c513b98e4b38a8e2f77a6b8d0b9f375245f274194b8cf" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1303263-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1303263-list" aria-labelledby="tooltip-12179d65-f52b-4102-a212-6ff038bbee5a" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-12179d65-f52b-4102-a212-6ff038bbee5a" for="Comment-actions-1303263-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1303263-list" role="menu" aria-labelledby="Comment-actions-1303263-text"> <include-fragment src="/golang/go/discussions/48287/comments/1303263/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1303263" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1303263,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="e3699456f0325fd9bc36286c791d590c1029048a063f311e24511d4785f20224" data-hovercard-type="user" data-hovercard-url="/users/ianlancetaylor/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/ianlancetaylor" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/3194333?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">ianlancetaylor</span> </div> </a> <a href="#discussioncomment-1303263" id="discussioncomment-1303263-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-09T18:48:56Z" class="no-wrap">Sep 9, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > <span title="This user is a maintainer on this repository." data-view-component="true" class="Label py-0 ml-1"> Maintainer </span> </div> </div> </h3> </div> </div> <div class="color-bg-default border-bottom position-relative"> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1303263/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1303263" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto">Another approach is to observe that the language supports type aliases to support transitions. So let's use type aliases.</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="type Pool[T any] ... type Pool = Pool[interface{}]"><pre class="notranslate"><span class="pl-k">type</span> <span class="pl-s1">Pool</span>[<span class="pl-s1">T</span> <span class="pl-smi">any</span>] <span class="pl-c1">...</span> <span class="pl-k">type</span> <span class="pl-smi">Pool</span> <span class="pl-c1">=</span> <span class="pl-smi">Pool</span>[<span class="pl-k">interface</span>{}]</pre></div> <p dir="auto">The rules here would be:</p> <ol dir="auto"> <li>The type alias must be at the same scope as the type (which currently means only at package scope).</li> <li>The type alias identifier would be the same as the alias target (otherwise it is an ordinary alias).</li> <li>The type alias identifier must not have any type parameters.</li> <li>The type alias target must specify arguments for all type parameters.</li> </ol> <p dir="auto">This alias rule does not work for functions. We can either say there is no transition for functions, or we can introduce another rule.</p> <p dir="auto">A function may be defined both with and without type parameters. A reference to the function (not a call) with no type arguments is permitted, and gets the version without type parameters. A call of the function with no type arguments gets the version with type parameters and does type inference as usual. If type inference fails, the call is instead made to the version without type parameters (and may fail if the arguments type are not assignable).</p> <p dir="auto">That gives us</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="func Min[T constraints.Ordered](a, b T) T { ... } func Min(a, b float64) float64 { return Min[float64](a, b) }"><pre class="notranslate"><span class="pl-k">func</span> <span class="pl-en">Min</span>[<span class="pl-s1">T</span> constraints.<span class="pl-smi">Ordered</span>](<span class="pl-s1">a</span>, <span class="pl-s1">b</span> <span class="pl-smi">T</span>) <span class="pl-smi">T</span> { <span class="pl-c1">...</span> } <span class="pl-k">func</span> <span class="pl-en">Min</span>(<span class="pl-s1">a</span>, <span class="pl-s1">b</span> <span class="pl-smi">float64</span>) <span class="pl-smi">float64</span> { <span class="pl-k">return</span> <span class="pl-en">Min</span>[<span class="pl-smi">float64</span>](<span class="pl-s1">a</span>, <span class="pl-s1">b</span>) }</pre></div> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 68" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-1303263" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>68</span> </button> <tool-tip id="tooltip-3429ad5d-1974-429d-9cef-b92ebc87f4a9" for="discussion-upvote-button-DiscussionComment-1303263" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-96385d" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>84</span> </button> <button name="input[content]" id="reactions--reaction_button_component-7975d2" value="THUMBS_DOWN react" data-button-index-position="1" data-reaction-label="-1" data-reaction-content="-1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>9</span> </button> <button name="input[content]" id="reactions--reaction_button_component-be59ac" value="HEART react" data-button-index-position="5" data-reaction-label="Heart" data-reaction-content="heart" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="heart" fallback-src="https://github.githubassets.com/assets/2764-982dc91ea48a.png" class="social-button-emoji">❤️</g-emoji> <span>9</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>84</span> </li> <li class="dropdown-item" aria-label="-1"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>9</span> </li> <li class="dropdown-item" aria-label="heart"> <g-emoji alias="heart" fallback-src="https://github.githubassets.com/assets/2764-982dc91ea48a.png" class="social-button-emoji">❤️</g-emoji> <span>9</span> </li> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 17 replies </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker color-bg-inset border-top color-border-default mt-n1 rounded-bottom-2" data-child-comments id="child-comments-discussioncomment-1303263"> <div data-view-component="true" class="TimelineItem TimelineItem--condensed discussion-nested-comment-paging-form pt-0 ml-0"> <div style="background-color: transparent; left: 30px;" data-view-component="true" class="TimelineItem-badge discussion-nested-comment-paging-badge pb-3 mt-0 pt-4"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg></div> <div data-view-component="true" class="TimelineItem-body discussion-nested-comment-paging-form-body"> <!-- '"` --><!-- </textarea></xmp> --></option></form><form data-replace-remote-form-target="child-comments-discussioncomment-1303263" data-replace-remote-form="true" data-turbo="false" action="/golang/go/discussions/48287/comments/1303263/threads" accept-charset="UTF-8" method="get"> <input type="hidden" name="back_page" value="1"> <input type="hidden" name="forward_page" value="0"> <input type="hidden" name="anchor_id" value="1346030"> <button data-disable-with="Loading more replies..." type="submit" data-view-component="true" class="Button--link Button--medium Button mb-2 pl-2 pt-2"> <span class="Button-content"> <span class="Button-label">Show 12 previous replies</span> </span> </button> </form></div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1346030,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="94390fa9db772400401d7bdd20dfc1cb6aa8f0a716691a2ef1415f92afe3bdc9" data-hovercard-type="user" data-hovercard-url="/users/mvdan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/mvdan"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/3576549?s=60&amp;v=4" width="30" height="30" alt="@mvdan" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1346030" data-gid="DC_kwDOAWBuf84AFInu" data-url="/golang/go/discussions/48287/comments/1346030" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="4dddf9f7f56e6646efb9931ad1070838bcd784d4b5251d557c69f0f91c5ff4f7" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1346030-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1346030-list" aria-labelledby="tooltip-262a148c-a00d-4643-be00-5a17e8f72016" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-262a148c-a00d-4643-be00-5a17e8f72016" for="Comment-actions-1346030-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1346030-list" role="menu" aria-labelledby="Comment-actions-1346030-text"> <include-fragment src="/golang/go/discussions/48287/comments/1346030/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1346030" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1346030,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="94390fa9db772400401d7bdd20dfc1cb6aa8f0a716691a2ef1415f92afe3bdc9" data-hovercard-type="user" data-hovercard-url="/users/mvdan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/mvdan" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> mvdan </a> <a href="#discussioncomment-1346030" id="discussioncomment-1346030-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-17T07:04:29Z" class="no-wrap">Sep 17, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > <span title="This user is a collaborator on this repository." data-view-component="true" class="Label py-0 ml-1"> Collaborator </span> </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1346030/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1346030" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <blockquote> <p dir="auto">On the minus side, it's a bit odd to permit two different objects with the same name in a scope; in order to not break all kinds of invariants both in the implementation and in the <code class="notranslate">go/types</code> API, such a pair of type declarations would probably need to be considered a single object, but that is also strange: What is the object named "Pool"? Where is is declared?</p> </blockquote> <p dir="auto">Don't we have to worry about this problem anyway, due to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="907774373" data-permission-text="Title is private" data-url="https://github.com/golang/go/issues/46477" data-hovercard-type="issue" data-hovercard-url="/golang/go/issues/46477/hovercard" href="https://github.com/golang/go/issues/46477">#46477</a>?</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1350389,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="28b967bddd1ce3c2253eb453274ad06582ffcce02575471fde571fb8364f46d3" data-hovercard-type="user" data-hovercard-url="/users/gbarr/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/gbarr"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/32673?s=60&amp;v=4" width="30" height="30" alt="@gbarr" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1350389" data-gid="DC_kwDOAWBuf84AFJr1" data-url="/golang/go/discussions/48287/comments/1350389" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="66a336708dc9c263ac190302386b63740a170d9b47b87ee75b8587ca3040d09f" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1350389-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1350389-list" aria-labelledby="tooltip-3db1f7aa-c58d-4837-8ddb-519633f3da90" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-3db1f7aa-c58d-4837-8ddb-519633f3da90" for="Comment-actions-1350389-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1350389-list" role="menu" aria-labelledby="Comment-actions-1350389-text"> <include-fragment src="/golang/go/discussions/48287/comments/1350389/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1350389" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1350389,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="28b967bddd1ce3c2253eb453274ad06582ffcce02575471fde571fb8364f46d3" data-hovercard-type="user" data-hovercard-url="/users/gbarr/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/gbarr" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> gbarr </a> <a href="#discussioncomment-1350389" id="discussioncomment-1350389-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-18T07:30:55Z" class="no-wrap">Sep 18, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1350389/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1350389" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">An additional benefit for having 2 declarations as opposed to default types in the declaration is that they can have separate documentation. The new generic documentation can be kept clear without having to mention the compatibility defaults and the second declaration also allows the developer to mark it as deprecated in the documentation.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1352082,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="be5b3defa67085a8070fdd74048f71cce9d874416456307942016fb9251d0a14" data-hovercard-type="user" data-hovercard-url="/users/akavel/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/akavel"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/273837?s=60&amp;v=4" width="30" height="30" alt="@akavel" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1352082" data-gid="DC_kwDOAWBuf84AFKGS" data-url="/golang/go/discussions/48287/comments/1352082" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="392c94066cb79bb7e109bb34c2bd9e3d61a5eeb5620eaba402ab1433dd67962e" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1352082-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1352082-list" aria-labelledby="tooltip-e4102625-02d6-406e-832b-3b9f34469968" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-e4102625-02d6-406e-832b-3b9f34469968" for="Comment-actions-1352082-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1352082-list" role="menu" aria-labelledby="Comment-actions-1352082-text"> <include-fragment src="/golang/go/discussions/48287/comments/1352082/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1352082" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> <edit-history> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" aria-haspopup="true" aria-controls="discussion-edit-history-1352082-list" aria-expanded="false" id="discussion-edit-history-1352082-text" data-target="edit-history.menuTrigger" type="button" data-view-component="true" class="Button--invisible Button--small Button"> <span class="Button-content"> <span class="Button-label">edited</span> </span> <span class="Button-visual Button-trailingAction"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path> </svg> </span> </button> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="discussion-edit-history-1352082-list" role="menu" aria-labelledby="discussion-edit-history-1352082-text"> <include-fragment src="/golang/go/discussions/48287/comments/1352082/edits_log" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="edit-history.deletedDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> {{actor}} deleted this content <relative-time class="no-wrap" datetime="{{datetime}}"></relative-time>. </div> </scrollable-region> </dialog></dialog-helper> </template> <template data-target="edit-history.diffDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-large Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body p-0"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> </edit-history> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1352082,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="be5b3defa67085a8070fdd74048f71cce9d874416456307942016fb9251d0a14" data-hovercard-type="user" data-hovercard-url="/users/akavel/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/akavel" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> akavel </a> <a href="#discussioncomment-1352082" id="discussioncomment-1352082-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-18T21:27:44Z" class="no-wrap">Sep 18, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1352082/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1352082" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">Seeing that this proposal (as many others too) is adding a language feature, I'd like to ask a question: would this language feature be defensible alone if the need for the transition from non-generics to generics didn't occur? I.e., if generics were there from the start, would this feature be deemed valuable enough to warrant its inclusion in the language? (I don't know the answer, I'd just like to make sure the Core Team themselves are consciously aware of the answer and take it into account when making a decision.)</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1359819,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="f6d597ce6da7b045379a92de606cbdc2c2235781e24f1e82bec29218c45c24f1" data-hovercard-type="user" data-hovercard-url="/users/ianlancetaylor/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/ianlancetaylor"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/3194333?s=60&amp;v=4" width="30" height="30" alt="@ianlancetaylor" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1359819" data-gid="DC_kwDOAWBuf84AFL_L" data-url="/golang/go/discussions/48287/comments/1359819" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="41af0850463c7039de7e22764b83e4900e87be2842f52d578da41d52aa2f4b82" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1359819-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1359819-list" aria-labelledby="tooltip-03354229-6d27-483d-9691-f6175b7cdc63" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-03354229-6d27-483d-9691-f6175b7cdc63" for="Comment-actions-1359819-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1359819-list" role="menu" aria-labelledby="Comment-actions-1359819-text"> <include-fragment src="/golang/go/discussions/48287/comments/1359819/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1359819" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1359819,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="f6d597ce6da7b045379a92de606cbdc2c2235781e24f1e82bec29218c45c24f1" data-hovercard-type="user" data-hovercard-url="/users/ianlancetaylor/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/ianlancetaylor" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> ianlancetaylor </a> <a href="#discussioncomment-1359819" id="discussioncomment-1359819-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-20T23:34:21Z" class="no-wrap">Sep 20, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > <span title="This user is a maintainer on this repository." data-view-component="true" class="Label py-0 ml-1"> Maintainer </span> </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1359819/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1359819" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/akavel/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/akavel">@akavel</a> No, I don't think this language feature would be defensible if generics has been there from the start. It's a good question to ask. Still we have to do something (though we don't necessarily have to add a language feature, we can use different packages or different type/function names).</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:2491619,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="3457c361b556507b6a33154ebf43519bb61f5ffab4448b4d1336ce1cd2cfa278" data-hovercard-type="user" data-hovercard-url="/users/GGCristo/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/GGCristo"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/58046649?s=60&amp;v=4" width="30" height="30" alt="@GGCristo" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-2491619" data-gid="DC_kwDOAWBuf84AJgTj" data-url="/golang/go/discussions/48287/comments/2491619" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="2871c7bcd2fe056375842eb90cfb12bef64fc23f4771018db1f44a1b18cb35ad" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-2491619-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-2491619-list" aria-labelledby="tooltip-5aa23ae4-730d-4b19-9191-74e99e861bfa" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-5aa23ae4-730d-4b19-9191-74e99e861bfa" for="Comment-actions-2491619-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-2491619-list" role="menu" aria-labelledby="Comment-actions-2491619-text"> <include-fragment src="/golang/go/discussions/48287/comments/2491619/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F2491619" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:2491619,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="3457c361b556507b6a33154ebf43519bb61f5ffab4448b4d1336ce1cd2cfa278" data-hovercard-type="user" data-hovercard-url="/users/GGCristo/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/GGCristo" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> GGCristo </a> <a href="#discussioncomment-2491619" id="discussioncomment-2491619-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2022-04-02T15:43:51Z" class="no-wrap">Apr 2, 2022</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/2491619/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="2491619" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <blockquote> <p dir="auto">As an alternative to the "you can define a function more than once", i.e.</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="func Min[T constraints.Ordered](a, b T) T { ... } func Min(a, b float64) float64 { return Min[float64](a, b) }"><pre class="notranslate"><span class="pl-k">func</span> <span class="pl-en">Min</span>[<span class="pl-s1">T</span> constraints.<span class="pl-smi">Ordered</span>](<span class="pl-s1">a</span>, <span class="pl-s1">b</span> <span class="pl-smi">T</span>) <span class="pl-smi">T</span> { <span class="pl-c1">...</span> } <span class="pl-k">func</span> <span class="pl-en">Min</span>(<span class="pl-s1">a</span>, <span class="pl-s1">b</span> <span class="pl-smi">float64</span>) <span class="pl-smi">float64</span> { <span class="pl-k">return</span> <span class="pl-en">Min</span>[<span class="pl-smi">float64</span>](<span class="pl-s1">a</span>, <span class="pl-s1">b</span>) }</pre></div> <p dir="auto">We could potentially simplify slightly more and say that you can define exactly one function with the same name <em>without a body</em> and the types therein will be used as a fallback if type unification fails. So, the above would be</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="func Min[T constraints.Ordered](a, b T) T { ... } func Min(a, b float64) float64"><pre class="notranslate"><span class="pl-k">func</span> <span class="pl-en">Min</span>[<span class="pl-s1">T</span> constraints.<span class="pl-smi">Ordered</span>](<span class="pl-s1">a</span>, <span class="pl-s1">b</span> <span class="pl-smi">T</span>) <span class="pl-smi">T</span> { <span class="pl-c1">...</span> } <span class="pl-k">func</span> <span class="pl-en">Min</span>(<span class="pl-s1">a</span>, <span class="pl-s1">b</span> <span class="pl-smi">float64</span>) <span class="pl-smi">float64</span></pre></div> </blockquote> <p dir="auto">I would like to add to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/kylelemons/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/kylelemons">@kylelemons</a>'s idea that the default function should be close to the fallback function, so code is more readable.<br> Also, this could be an alternative way of doing this in case using the "func" keyword feels like a hack</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[T = float64] func Min[T constraints.Ordered](a, b T) T { ... }"><pre class="notranslate">[<span class="pl-s1">T</span> <span class="pl-c1">=</span> <span class="pl-s1">float64</span>] <span class="pl-k">func</span> <span class="pl-smi">Min</span>[<span class="pl-s1">T</span> constraints.<span class="pl-smi">Ordered</span>](<span class="pl-s1">a</span>, <span class="pl-s1">b</span> <span class="pl-s1">T</span>) <span class="pl-smi">T</span> { <span class="pl-c1">...</span> }</pre></div> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-1cb563" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>1</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>1</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AE-Lw" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-1303280" data-gid="DC_kwDOAWBuf84AE-Lw" data-url="/golang/go/discussions/48287/comments/1303280" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="e63204d1e4293db291662421e883481d025829092c202a5cbdb038275a66e138" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1303280-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1303280-list" aria-labelledby="tooltip-590ef759-e9c3-49d5-8a10-5edc95ad1fbd" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-590ef759-e9c3-49d5-8a10-5edc95ad1fbd" for="Comment-actions-1303280-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1303280-list" role="menu" aria-labelledby="Comment-actions-1303280-text"> <include-fragment src="/golang/go/discussions/48287/comments/1303280/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1303280" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1303280,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="4a0c15e62ba76b9099e62214f92b66915f54ae391116f67b813e0b929fd05a90" data-hovercard-type="user" data-hovercard-url="/users/ianlancetaylor/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/ianlancetaylor" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/3194333?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">ianlancetaylor</span> </div> </a> <a href="#discussioncomment-1303280" id="discussioncomment-1303280-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-09T18:50:15Z" class="no-wrap">Sep 9, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > <span title="This user is a maintainer on this repository." data-view-component="true" class="Label py-0 ml-1"> Maintainer </span> </div> </div> </h3> </div> </div> <div class="color-bg-default border-bottom position-relative"> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1303280/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1303280" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto">It's clearly essential to always have a crazy idea that everybody can reject, so here is one. <code class="notranslate">default</code> is already a keyword. So let's permit, only at package scope,</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="default Pool Pool[interface{}] default Min Min[float64]"><pre class="notranslate"><span class="pl-smi">default</span> <span class="pl-s1">Pool</span> <span class="pl-s1">Pool</span>[<span class="pl-k">interface</span>{}] <span class="pl-s1">default</span> <span class="pl-s1">Min</span> <span class="pl-s1">Min</span>[<span class="pl-s1">float64</span>]</pre></div> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 8" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-1303280" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>8</span> </button> <tool-tip id="tooltip-9cb6a945-24cb-47d5-82d1-3cbab801b582" for="discussion-upvote-button-DiscussionComment-1303280" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-25fb0a" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>1</span> </button> <button name="input[content]" id="reactions--reaction_button_component-743301" value="THUMBS_DOWN react" data-button-index-position="1" data-reaction-label="-1" data-reaction-content="-1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>12</span> </button> <button name="input[content]" id="reactions--reaction_button_component-b64cd2" value="LAUGH react" data-button-index-position="2" data-reaction-label="Laugh" data-reaction-content="smile" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="smile" fallback-src="https://github.githubassets.com/assets/1f604-7528822fb4c5.png" class="social-button-emoji">😄</g-emoji> <span>32</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>1</span> </li> <li class="dropdown-item" aria-label="-1"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>12</span> </li> <li class="dropdown-item" aria-label="smile"> <g-emoji alias="smile" fallback-src="https://github.githubassets.com/assets/1f604-7528822fb4c5.png" class="social-button-emoji">😄</g-emoji> <span>32</span> </li> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 3 replies </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker color-bg-inset border-top color-border-default mt-n1 rounded-bottom-2" data-child-comments id="child-comments-discussioncomment-1303280"> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1303470,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="5cc08afa4defc77773fd7741737a401edfc19e91d72c3f8bdeceec4b5f3cb24a" data-hovercard-type="user" data-hovercard-url="/users/griesemer/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/griesemer"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/8528975?s=60&amp;v=4" width="30" height="30" alt="@griesemer" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1303470" data-gid="DC_kwDOAWBuf84AE-Ou" data-url="/golang/go/discussions/48287/comments/1303470" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="1ba7ac66cbf78047d9cef3297b5029433cf7646116cce0c03687f36b90a4e68e" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1303470-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1303470-list" aria-labelledby="tooltip-3796e1f9-3aa3-4fc3-a844-37c302ceb06b" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-3796e1f9-3aa3-4fc3-a844-37c302ceb06b" for="Comment-actions-1303470-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1303470-list" role="menu" aria-labelledby="Comment-actions-1303470-text"> <include-fragment src="/golang/go/discussions/48287/comments/1303470/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1303470" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1303470,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="5cc08afa4defc77773fd7741737a401edfc19e91d72c3f8bdeceec4b5f3cb24a" data-hovercard-type="user" data-hovercard-url="/users/griesemer/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/griesemer" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> griesemer </a> <a href="#discussioncomment-1303470" id="discussioncomment-1303470-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-09T19:23:31Z" class="no-wrap">Sep 9, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > <span title="This user is a maintainer on this repository." data-view-component="true" class="Label py-0 ml-1"> Maintainer </span> </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1303470/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1303470" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">This is essentially the same as the <a href="https://github.com/golang/go/discussions/48287#discussioncomment-1303263" data-hovercard-type="discussion" data-hovercard-url="/golang/go/discussions/48287/hovercard?comment_id=1303263">alias idea above</a> (at least for types), except that a keyword is used.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-a4dc93" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>11</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>11</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1310161,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="937f5e4e543022e732f841db449a75d1294dca12839cb0a8648a8835c44e3e49" data-hovercard-type="user" data-hovercard-url="/users/changkun/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/changkun"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/5498964?s=60&amp;v=4" width="30" height="30" alt="@changkun" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1310161" data-gid="DC_kwDOAWBuf84AE_3R" data-url="/golang/go/discussions/48287/comments/1310161" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="c83fcf04c3cdb31b7eabffacbfd28a8cb6159d88e14b2e82e8678e06b84752e1" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1310161-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1310161-list" aria-labelledby="tooltip-55e43d02-27dd-4f75-ab96-1fedc0bedd18" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-55e43d02-27dd-4f75-ab96-1fedc0bedd18" for="Comment-actions-1310161-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1310161-list" role="menu" aria-labelledby="Comment-actions-1310161-text"> <include-fragment src="/golang/go/discussions/48287/comments/1310161/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1310161" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1310161,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="937f5e4e543022e732f841db449a75d1294dca12839cb0a8648a8835c44e3e49" data-hovercard-type="user" data-hovercard-url="/users/changkun/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/changkun" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> changkun </a> <a href="#discussioncomment-1310161" id="discussioncomment-1310161-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-11T12:35:54Z" class="no-wrap">Sep 11, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > <span title="This user is a collaborator on this repository." data-view-component="true" class="Label py-0 ml-1"> Collaborator </span> </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1310161/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1310161" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">Not necessarily need the default keyword, this might be more consistent with the subject:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="type Pool[T any] ... type Pool = Pool[interface{}] // type alias func Min[T constraints.Ordered](a, b T) T { ... } func Min = Min[float64] // func alias"><pre class="notranslate"><code class="notranslate">type Pool[T any] ... type Pool = Pool[interface{}] // type alias func Min[T constraints.Ordered](a, b T) T { ... } func Min = Min[float64] // func alias </code></pre></div> <p dir="auto">(° ο°)...</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-68f1f9" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>3</span> </button> <button name="input[content]" id="reactions--reaction_button_component-8babc7" value="THUMBS_DOWN react" data-button-index-position="1" data-reaction-label="-1" data-reaction-content="-1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>2</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>3</span> </li> <li class="dropdown-item" aria-label="-1"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>2</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1336836,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="885b188b3fe81c4a5d8680deb251aac12c93200c02fadf53fc3a77481d36f44a" data-hovercard-type="user" data-hovercard-url="/users/jpap/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/jpap"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/343842?s=60&amp;v=4" width="30" height="30" alt="@jpap" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1336836" data-gid="DC_kwDOAWBuf84AFGYE" data-url="/golang/go/discussions/48287/comments/1336836" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="391e13279fc8bc6cf00a8c19b82bd613733f40f1c0f108792f5ab9c927f2cac5" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1336836-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1336836-list" aria-labelledby="tooltip-fa3ea383-e48b-4fed-a97a-0cc0a798f515" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-fa3ea383-e48b-4fed-a97a-0cc0a798f515" for="Comment-actions-1336836-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1336836-list" role="menu" aria-labelledby="Comment-actions-1336836-text"> <include-fragment src="/golang/go/discussions/48287/comments/1336836/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1336836" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1336836,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="885b188b3fe81c4a5d8680deb251aac12c93200c02fadf53fc3a77481d36f44a" data-hovercard-type="user" data-hovercard-url="/users/jpap/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/jpap" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> jpap </a> <a href="#discussioncomment-1336836" id="discussioncomment-1336836-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-16T06:42:29Z" class="no-wrap">Sep 16, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1336836/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1336836" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">I like the idea of keeping the declaration as one: with a separate alias/default declaration, one of the two parts might end up far from the other, reducing source code readability.</p> <p dir="auto">What about using the <code class="notranslate">default</code> keyword with the original proposal:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="type List[E any default interface{}] struct { ... } func Min[T comparable default float64](x, y T) T { ... } func Print2[T1 any default string, T2 any default interface{}](s1 []T1, v2 []T2) { ... }"><pre class="notranslate"><code class="notranslate">type List[E any default interface{}] struct { ... } func Min[T comparable default float64](x, y T) T { ... } func Print2[T1 any default string, T2 any default interface{}](s1 []T1, v2 []T2) { ... } </code></pre></div> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-9a0ca3" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>5</span> </button> <button name="input[content]" id="reactions--reaction_button_component-c95b80" value="ROCKET react" data-button-index-position="6" data-reaction-label="Rocket" data-reaction-content="rocket" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="rocket" fallback-src="https://github.githubassets.com/assets/1f680-d0ef47fdb515.png" class="social-button-emoji">🚀</g-emoji> <span>2</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>5</span> </li> <li class="dropdown-item" aria-label="rocket"> <g-emoji alias="rocket" fallback-src="https://github.githubassets.com/assets/1f680-d0ef47fdb515.png" class="social-button-emoji">🚀</g-emoji> <span>2</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AE-Ua" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-1303834" data-gid="DC_kwDOAWBuf84AE-Ua" data-url="/golang/go/discussions/48287/comments/1303834" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="382cc471403f0bc05474d5cb54f553d246df79c12bf000f8e16acaef1ccd20d4" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1303834-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1303834-list" aria-labelledby="tooltip-7c1cbf1d-915a-4740-bbfa-4a86ae50e974" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-7c1cbf1d-915a-4740-bbfa-4a86ae50e974" for="Comment-actions-1303834-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1303834-list" role="menu" aria-labelledby="Comment-actions-1303834-text"> <include-fragment src="/golang/go/discussions/48287/comments/1303834/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1303834" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> <edit-history> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" aria-haspopup="true" aria-controls="discussion-edit-history-1303834-list" aria-expanded="false" id="discussion-edit-history-1303834-text" data-target="edit-history.menuTrigger" type="button" data-view-component="true" class="Button--invisible Button--small Button"> <span class="Button-content"> <span class="Button-label">edited</span> </span> <span class="Button-visual Button-trailingAction"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path> </svg> </span> </button> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="discussion-edit-history-1303834-list" role="menu" aria-labelledby="discussion-edit-history-1303834-text"> <include-fragment src="/golang/go/discussions/48287/comments/1303834/edits_log" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="edit-history.deletedDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> {{actor}} deleted this content <relative-time class="no-wrap" datetime="{{datetime}}"></relative-time>. </div> </scrollable-region> </dialog></dialog-helper> </template> <template data-target="edit-history.diffDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-large Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body p-0"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> </edit-history> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1303834,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="feb0fee9e7f7c139515ab527740dd5a6ad652ada16ef4f5b38a4920469351f7b" data-hovercard-type="user" data-hovercard-url="/users/bcmills/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/bcmills" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/5200974?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">bcmills</span> </div> </a> <a href="#discussioncomment-1303834" id="discussioncomment-1303834-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-09T21:01:55Z" class="no-wrap">Sep 9, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h3> </div> </div> <div class="color-bg-default border-bottom position-relative"> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1303834/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1303834" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <blockquote> <p dir="auto">One suggestion is to adopt an "Of" suffix, as in PoolOf[T], MinOf[T], and so on.<br> For types, which require the parameter list, that kind of works.<br> For functions, which will often infer it, the result is strange:<br> there is no obvious difference between math.MinOf(1, 2) and math.Min(1, 2).<br> Any new, from-scratch, post-generics API would presumably not include the Of - Tree[K,V], not TreeOf[K,V] -<br> so the "Of" in these names would be a persistent awkward reminder of our pre-generics past.</p> </blockquote> <p dir="auto">I'm going to go out on a limb and suggest that we use the <code class="notranslate">Of</code> suffix for generic container types, <em>regardless</em> of whether they are new. Then the <code class="notranslate">Of</code> in the names is no longer a persistent awkward reminder, but a consistent pattern.</p> <p dir="auto">Constructor functions for generic containers get the <code class="notranslate">Of</code> suffix because the type has it, and because they can't generally be inferred locally anyway: <code class="notranslate">list.NewListOf[T]()</code>.</p> <p dir="auto"><code class="notranslate">math</code> gets a mulligan for using the good names for the 64-bit-only variants: <code class="notranslate">v2</code> it. <code class="notranslate">import "math/v2"</code> and the only call sites that change are the ones that can't infer arguments (e.g. <code class="notranslate">Nan()</code>) or pass only untyped constants. Then maybe we can revisit the awkward inclusions for that package at the same time. (Do people really use <code class="notranslate">math.Yn</code> on a regular basis‽)</p> <p dir="auto">I think <code class="notranslate">atomic.Value</code> needs more thought anyway (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="967528474" data-permission-text="Title is private" data-url="https://github.com/golang/go/issues/47657" data-hovercard-type="issue" data-hovercard-url="/golang/go/issues/47657/hovercard?comment_id=916431992&amp;comment_type=issue_comment" href="https://github.com/golang/go/issues/47657#issuecomment-916431992">#47657 (comment)</a>). So maybe <code class="notranslate">v2</code> that package too, or use names that aren't just <code class="notranslate">ValueOf</code>..?</p> <p dir="auto">If we do the above, what are the remaining problematic names?</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 10" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-1303834" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>10</span> </button> <tool-tip id="tooltip-01b2da63-1208-4ff8-a81d-80236597d011" for="discussion-upvote-button-DiscussionComment-1303834" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-ffb7c3" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>9</span> </button> <button name="input[content]" id="reactions--reaction_button_component-c48441" value="THUMBS_DOWN react" data-button-index-position="1" data-reaction-label="-1" data-reaction-content="-1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>13</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>9</span> </li> <li class="dropdown-item" aria-label="-1"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>13</span> </li> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 2 replies </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker color-bg-inset border-top color-border-default mt-n1 rounded-bottom-2" data-child-comments id="child-comments-discussioncomment-1303834"> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1304139,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="fbad1aa44d6c03a04c4b4f3677735ae9dee3e74695da48ece9cf9c194377b30b" data-hovercard-type="user" data-hovercard-url="/users/rsc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/rsc"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/104030?s=60&amp;v=4" width="30" height="30" alt="@rsc" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1304139" data-gid="DC_kwDOAWBuf84AE-ZL" data-url="/golang/go/discussions/48287/comments/1304139" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="85c4b8103403e6f0b02fba6bf1968a545cc901483f0d5c11995e8d24d57001fd" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1304139-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1304139-list" aria-labelledby="tooltip-7e0c4905-44ec-4d7f-8016-7e5d1992b329" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-7e0c4905-44ec-4d7f-8016-7e5d1992b329" for="Comment-actions-1304139-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1304139-list" role="menu" aria-labelledby="Comment-actions-1304139-text"> <include-fragment src="/golang/go/discussions/48287/comments/1304139/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1304139" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1304139,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="fbad1aa44d6c03a04c4b4f3677735ae9dee3e74695da48ece9cf9c194377b30b" data-hovercard-type="user" data-hovercard-url="/users/rsc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/rsc" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> rsc </a> <a href="#discussioncomment-1304139" id="discussioncomment-1304139-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-09T23:20:41Z" class="no-wrap">Sep 9, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > <span title="This user is a maintainer on this repository." data-view-component="true" class="Label py-0 ml-1"> Maintainer </span> <span title="This user is the author of this discussion." data-view-component="true" class="Label py-0 ml-1"> Author </span> </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1304139/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1304139" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">Didn't that ship sail with <code class="notranslate">map</code>?</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1304650,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="37d8a697cd1afea52410896cee42f5790bca27f4a7c816f73b1247dd7dc63716" data-hovercard-type="user" data-hovercard-url="/users/bcmills/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/bcmills"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/5200974?s=60&amp;v=4" width="30" height="30" alt="@bcmills" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1304650" data-gid="DC_kwDOAWBuf84AE-hK" data-url="/golang/go/discussions/48287/comments/1304650" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="78497e6e70a2d0751cfc2f5337b856ee9365519df149cd33946dec67719e7a6c" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1304650-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1304650-list" aria-labelledby="tooltip-d5f1a1da-f88b-44ee-b373-bb73ae28f451" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-d5f1a1da-f88b-44ee-b373-bb73ae28f451" for="Comment-actions-1304650-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1304650-list" role="menu" aria-labelledby="Comment-actions-1304650-text"> <include-fragment src="/golang/go/discussions/48287/comments/1304650/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1304650" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> <edit-history> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" aria-haspopup="true" aria-controls="discussion-edit-history-1304650-list" aria-expanded="false" id="discussion-edit-history-1304650-text" data-target="edit-history.menuTrigger" type="button" data-view-component="true" class="Button--invisible Button--small Button"> <span class="Button-content"> <span class="Button-label">edited</span> </span> <span class="Button-visual Button-trailingAction"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path> </svg> </span> </button> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="discussion-edit-history-1304650-list" role="menu" aria-labelledby="discussion-edit-history-1304650-text"> <include-fragment src="/golang/go/discussions/48287/comments/1304650/edits_log" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="edit-history.deletedDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> {{actor}} deleted this content <relative-time class="no-wrap" datetime="{{datetime}}"></relative-time>. </div> </scrollable-region> </dialog></dialog-helper> </template> <template data-target="edit-history.diffDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-large Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body p-0"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> </edit-history> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1304650,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="37d8a697cd1afea52410896cee42f5790bca27f4a7c816f73b1247dd7dc63716" data-hovercard-type="user" data-hovercard-url="/users/bcmills/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/bcmills" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> bcmills </a> <a href="#discussioncomment-1304650" id="discussioncomment-1304650-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-10T02:54:52Z" class="no-wrap">Sep 10, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1304650/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1304650" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">Maybe, but as a built-in it's already funny-looking. (And its second type parameter spills outside the brackets! 😅)</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-f77df2" value="LAUGH react" data-button-index-position="2" data-reaction-label="Laugh" data-reaction-content="smile" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="smile" fallback-src="https://github.githubassets.com/assets/1f604-7528822fb4c5.png" class="social-button-emoji">😄</g-emoji> <span>2</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="smile"> <g-emoji alias="smile" fallback-src="https://github.githubassets.com/assets/1f604-7528822fb4c5.png" class="social-button-emoji">😄</g-emoji> <span>2</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AE-h-" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-1304702" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="4918c59190c3e18ed387ba413ec8c14a242ab3ee1c19f85c2fe224ff35381aa6" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1304702-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1304702-list" aria-labelledby="tooltip-a8785827-07e2-4971-aa7e-5cbb480baec2" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-a8785827-07e2-4971-aa7e-5cbb480baec2" for="Comment-actions-1304702-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1304702-list" role="menu" aria-labelledby="Comment-actions-1304702-text"> <include-fragment src="/golang/go/discussions/48287/comments/1304702/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1304702" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1304702,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="4ad1c4fb206e9bb26f6add0cbd92a24351a0c7aa2316cb1a7154bee5dfda27c7" data-hovercard-type="user" data-hovercard-url="/users/kylelemons/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/kylelemons" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/322213?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">kylelemons</span> </div> </a> <a href="#discussioncomment-1304702" id="discussioncomment-1304702-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-10T03:33:41Z" class="no-wrap">Sep 10, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h3> </div> </div> <div class="color-bg-default border-bottom position-relative"> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1304702/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1304702" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto">The idea clearly exists already, as it was mentioned in <a href="https://github.com/golang/go/discussions/48287#discussioncomment-1303834" data-hovercard-type="discussion" data-hovercard-url="/golang/go/discussions/48287/hovercard?comment_id=1303834">this thread</a> but I think it's worth its own suggestion as I think it aligns pretty nicely with what we're asking package maintainers to do in general:</p> <p dir="auto">Don't introduce generics in most of these libraries. /v2 them:</p> <ul dir="auto"> <li>"sync" -&gt; "sync/v2" gets generic Value, Pool, Map</li> <li>"math" -&gt; "math/v2" gets generic Abs, Min, etc</li> <li>"list", "heap", "ring", etc get "list/v2", etc for their generic versions.</li> </ul> <p dir="auto">The normal packages should be implementable in terms of the generic version, so if it doesn't compromise performance we could do the <code class="notranslate">go fix</code> trick to rewrite them all to /v2.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 57" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-1304702" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>57</span> </button> <tool-tip id="tooltip-1fef06f6-7fe3-4e67-b38f-e67527be99ca" for="discussion-upvote-button-DiscussionComment-1304702" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-059d6b" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>8</span> </button> <button name="input[content]" id="reactions--reaction_button_component-0b5410" value="THUMBS_DOWN react" data-button-index-position="1" data-reaction-label="-1" data-reaction-content="-1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>10</span> </button> <button name="input[content]" id="reactions--reaction_button_component-23d1c8" value="CONFUSED react" data-button-index-position="4" data-reaction-label="Confused" data-reaction-content="thinking_face" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="thinking_face" fallback-src="https://github.githubassets.com/assets/1f615-4bb1369c4251.png" class="social-button-emoji">😕</g-emoji> <span>1</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>8</span> </li> <li class="dropdown-item" aria-label="-1"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>10</span> </li> <li class="dropdown-item" aria-label="thinking_face"> <g-emoji alias="thinking_face" fallback-src="https://github.githubassets.com/assets/1f615-4bb1369c4251.png" class="social-button-emoji">😕</g-emoji> <span>1</span> </li> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 7 replies </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker color-bg-inset border-top color-border-default mt-n1 rounded-bottom-2" data-child-comments id="child-comments-discussioncomment-1304702"> <div data-view-component="true" class="TimelineItem TimelineItem--condensed discussion-nested-comment-paging-form pt-0 ml-0"> <div style="background-color: transparent; left: 30px;" data-view-component="true" class="TimelineItem-badge discussion-nested-comment-paging-badge pb-3 mt-0 pt-4"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg></div> <div data-view-component="true" class="TimelineItem-body discussion-nested-comment-paging-form-body"> <!-- '"` --><!-- </textarea></xmp> --></option></form><form data-replace-remote-form-target="child-comments-discussioncomment-1304702" data-replace-remote-form="true" data-turbo="false" action="/golang/go/discussions/48287/comments/1304702/threads" accept-charset="UTF-8" method="get"> <input type="hidden" name="back_page" value="1"> <input type="hidden" name="forward_page" value="0"> <input type="hidden" name="anchor_id" value="1336557"> <button data-disable-with="Loading more replies..." type="submit" data-view-component="true" class="Button--link Button--medium Button mb-2 pl-2 pt-2"> <span class="Button-content"> <span class="Button-label">Show 2 previous replies</span> </span> </button> </form></div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1336557,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="9d6f2fb72a55c95a19398ad3058a178cf3ee8757d67d3cd77f9be2cbcc090952" data-hovercard-type="user" data-hovercard-url="/users/twmb/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/twmb"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/1283109?s=60&amp;v=4" width="30" height="30" alt="@twmb" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1336557" data-gid="DC_kwDOAWBuf84AFGTt" data-url="/golang/go/discussions/48287/comments/1336557" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="8a9703029fe0e8a2c102347af47eea8d3a5db8c0dc0a8c2bad9b1e59bac757c8" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1336557-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1336557-list" aria-labelledby="tooltip-691692d5-94db-4d53-bdfb-46ee2190c420" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-691692d5-94db-4d53-bdfb-46ee2190c420" for="Comment-actions-1336557-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1336557-list" role="menu" aria-labelledby="Comment-actions-1336557-text"> <include-fragment src="/golang/go/discussions/48287/comments/1336557/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1336557" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> <edit-history> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" aria-haspopup="true" aria-controls="discussion-edit-history-1336557-list" aria-expanded="false" id="discussion-edit-history-1336557-text" data-target="edit-history.menuTrigger" type="button" data-view-component="true" class="Button--invisible Button--small Button"> <span class="Button-content"> <span class="Button-label">edited</span> </span> <span class="Button-visual Button-trailingAction"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path> </svg> </span> </button> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="discussion-edit-history-1336557-list" role="menu" aria-labelledby="discussion-edit-history-1336557-text"> <include-fragment src="/golang/go/discussions/48287/comments/1336557/edits_log" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="edit-history.deletedDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> {{actor}} deleted this content <relative-time class="no-wrap" datetime="{{datetime}}"></relative-time>. </div> </scrollable-region> </dialog></dialog-helper> </template> <template data-target="edit-history.diffDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-large Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body p-0"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> </edit-history> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1336557,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="9d6f2fb72a55c95a19398ad3058a178cf3ee8757d67d3cd77f9be2cbcc090952" data-hovercard-type="user" data-hovercard-url="/users/twmb/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/twmb" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> twmb </a> <a href="#discussioncomment-1336557" id="discussioncomment-1336557-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-16T04:25:12Z" class="no-wrap">Sep 16, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1336557/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1336557" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">If choosing a v2 approach, I think it'd be worth it for gopls / goimports / etc. to adopt a convention of importing v2 by default if <code class="notranslate">go.mod</code> uses go.1.18+ (which it should, if a library / binary is using generics).</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-e7f01e" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>13</span> </button> <button name="input[content]" id="reactions--reaction_button_component-da1485" value="THUMBS_DOWN react" data-button-index-position="1" data-reaction-label="-1" data-reaction-content="-1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>2</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>13</span> </li> <li class="dropdown-item" aria-label="-1"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>2</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1336568,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="2fd04cd1acbf4cc108ca343533a4d454f7c0743b630d9d7fba97fb517cebc9bc" data-hovercard-type="user" data-hovercard-url="/users/lu4p/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/lu4p"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/46541492?s=60&amp;v=4" width="30" height="30" alt="@lu4p" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1336568" data-gid="DC_kwDOAWBuf84AFGT4" data-url="/golang/go/discussions/48287/comments/1336568" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="d59cf1962f82072af26f00481b07e8ee657bc94718fedf5606c59b506cad3fea" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1336568-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1336568-list" aria-labelledby="tooltip-c3462548-f2a6-49e8-be0b-2b8b64029983" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-c3462548-f2a6-49e8-be0b-2b8b64029983" for="Comment-actions-1336568-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1336568-list" role="menu" aria-labelledby="Comment-actions-1336568-text"> <include-fragment src="/golang/go/discussions/48287/comments/1336568/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1336568" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1336568,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="2fd04cd1acbf4cc108ca343533a4d454f7c0743b630d9d7fba97fb517cebc9bc" data-hovercard-type="user" data-hovercard-url="/users/lu4p/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/lu4p" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> lu4p </a> <a href="#discussioncomment-1336568" id="discussioncomment-1336568-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-16T04:35:10Z" class="no-wrap">Sep 16, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1336568/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1336568" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <blockquote> <p dir="auto">Alternatively <code class="notranslate">/v2/math</code>, <code class="notranslate">/v2/sync</code>, etc, to fit the usual module-version style. That means we'd have a single <code class="notranslate">v2</code> directory with all the new API in. As you say, all the current packages should be implementable in terms of the new API.</p> </blockquote> <p dir="auto">I think this is not the right approach because stdlib packages might want to version independently from another in the future. (e.g. <code class="notranslate">math/v3</code> while sync is still at v2)</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-93413b" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>8</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>8</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1337162,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="e8ae7c9898f3e9abaddada9163d9765f74bfe596a7cee7b51465323d9c30dfe2" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Merovius"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/720787?s=60&amp;v=4" width="30" height="30" alt="@Merovius" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1337162" data-gid="DC_kwDOAWBuf84AFGdK" data-url="/golang/go/discussions/48287/comments/1337162" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="9490c58c6e9291674e19aa45484215592a01a3bfb8de0d0bdc41a0ddd0496546" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1337162-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1337162-list" aria-labelledby="tooltip-f6aee5ec-6815-4728-bc54-0a326fa2a17d" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-f6aee5ec-6815-4728-bc54-0a326fa2a17d" for="Comment-actions-1337162-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1337162-list" role="menu" aria-labelledby="Comment-actions-1337162-text"> <include-fragment src="/golang/go/discussions/48287/comments/1337162/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1337162" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1337162,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="e8ae7c9898f3e9abaddada9163d9765f74bfe596a7cee7b51465323d9c30dfe2" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Merovius" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> Merovius </a> <a href="#discussioncomment-1337162" id="discussioncomment-1337162-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-16T08:04:25Z" class="no-wrap">Sep 16, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1337162/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1337162" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/lu4p/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/lu4p">@lu4p</a> That's not something precluded by putting the version in front. Effectively, the <code class="notranslate">v3/math</code> might exists, while <code class="notranslate">v2/sync</code> doesn't, until we decide to revamp it again. The <code class="notranslate">std</code> as a module is already special (in that you don't need to put the module path into the import), there's no reason to force it to upgrade all packages at once.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-6a6b65" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>4</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>4</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1337401,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="ff1259d76eaa9d9a979fc4f1a13f3760f9ab744594a1d59a824b7abedaf169b4" data-hovercard-type="user" data-hovercard-url="/users/nickkeets/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/nickkeets"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/32566061?s=60&amp;v=4" width="30" height="30" alt="@nickkeets" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1337401" data-gid="DC_kwDOAWBuf84AFGg5" data-url="/golang/go/discussions/48287/comments/1337401" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="9572b95fe094de36d54345bd3261daead63e2fc11a3432195bf1fe15a221f4f9" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1337401-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1337401-list" aria-labelledby="tooltip-11f920cd-6abd-4aec-96b8-66b0b9707e12" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-11f920cd-6abd-4aec-96b8-66b0b9707e12" for="Comment-actions-1337401-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1337401-list" role="menu" aria-labelledby="Comment-actions-1337401-text"> <include-fragment src="/golang/go/discussions/48287/comments/1337401/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1337401" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1337401,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="ff1259d76eaa9d9a979fc4f1a13f3760f9ab744594a1d59a824b7abedaf169b4" data-hovercard-type="user" data-hovercard-url="/users/nickkeets/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/nickkeets" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> nickkeets </a> <a href="#discussioncomment-1337401" id="discussioncomment-1337401-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-16T08:40:32Z" class="no-wrap">Sep 16, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1337401/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1337401" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">What if we take this one step further? Go 1.18 becomes Go 2 and importing <code class="notranslate">v2/math</code> etc happens by default, with <code class="notranslate">import math</code>. But, we also keep the old versions too as <code class="notranslate">v1/math</code> etc. We do break compatibility this way, but in a way that can be ported automatically with go fix.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-538897" value="THUMBS_DOWN react" data-button-index-position="1" data-reaction-label="-1" data-reaction-content="-1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>7</span> </button> <button name="input[content]" id="reactions--reaction_button_component-ce8a42" value="ROCKET react" data-button-index-position="6" data-reaction-label="Rocket" data-reaction-content="rocket" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="rocket" fallback-src="https://github.githubassets.com/assets/1f680-d0ef47fdb515.png" class="social-button-emoji">🚀</g-emoji> <span>4</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="-1"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>7</span> </li> <li class="dropdown-item" aria-label="rocket"> <g-emoji alias="rocket" fallback-src="https://github.githubassets.com/assets/1f680-d0ef47fdb515.png" class="social-button-emoji">🚀</g-emoji> <span>4</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1341792,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="fc360a666e875734f737fa7c1601e4719a21a62082dfda891dbb88362a6ccb27" data-hovercard-type="user" data-hovercard-url="/users/ncruces/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/ncruces"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/5637550?s=60&amp;v=4" width="30" height="30" alt="@ncruces" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1341792" data-gid="DC_kwDOAWBuf84AFHlg" data-url="/golang/go/discussions/48287/comments/1341792" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="3098cab8861198191ed8b793fe0b233e9ffbb877637423edeb319d906d6307e6" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1341792-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1341792-list" aria-labelledby="tooltip-5a4513dd-6208-4787-b09d-3d6686228241" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-5a4513dd-6208-4787-b09d-3d6686228241" for="Comment-actions-1341792-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1341792-list" role="menu" aria-labelledby="Comment-actions-1341792-text"> <include-fragment src="/golang/go/discussions/48287/comments/1341792/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1341792" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1341792,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="fc360a666e875734f737fa7c1601e4719a21a62082dfda891dbb88362a6ccb27" data-hovercard-type="user" data-hovercard-url="/users/ncruces/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/ncruces" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> ncruces </a> <a href="#discussioncomment-1341792" id="discussioncomment-1341792-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-16T11:59:41Z" class="no-wrap">Sep 16, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1341792/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1341792" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/nickkeets/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/nickkeets">@nickkeets</a>, if the Go community really stands by SIV, there's no reason to exclude the standard library from the associated ugliness.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-35d485" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>5</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>5</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AE_Cz" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-1306803" data-gid="DC_kwDOAWBuf84AE_Cz" data-url="/golang/go/discussions/48287/comments/1306803" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="1e7acdb9b0296e072c3078a0696be9280a9d2810c6b458be0e89cdf1261ba790" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1306803-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1306803-list" aria-labelledby="tooltip-cbffce4c-8d8e-4d64-a4ec-e68696748ca3" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-cbffce4c-8d8e-4d64-a4ec-e68696748ca3" for="Comment-actions-1306803-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1306803-list" role="menu" aria-labelledby="Comment-actions-1306803-text"> <include-fragment src="/golang/go/discussions/48287/comments/1306803/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1306803" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1306803,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="4635460bc440dff3f16ab1748464e928bdf283471b435e08a61308c00d25b8c1" data-hovercard-type="user" data-hovercard-url="/users/rogpeppe/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/rogpeppe" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/66491?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">rogpeppe</span> </div> </a> <a href="#discussioncomment-1306803" id="discussioncomment-1306803-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-10T12:50:55Z" class="no-wrap">Sep 10, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > <span title="This user is a collaborator on this repository." data-view-component="true" class="Label py-0 ml-1"> Collaborator </span> </div> </div> </h3> </div> </div> <div class="color-bg-default border-bottom position-relative"> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1306803/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1306803" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto">I support this suggestion, particularly as I see it as having the potential to be generally useful into the future given a <a href="https://github.com/golang/go/discussions/48287#discussioncomment-1306718" data-hovercard-type="discussion" data-hovercard-url="/golang/go/discussions/48287/hovercard?comment_id=1306718">minor tweak to the rules</a>.</p> <p dir="auto">I'd question the need for the parentheses. I understand that they're there to suggest the "maybe" aspect of the default but I don't think they pull their weight, and there's considerable precedent from other languages (e.g. Rust's default type parameters, Python's default function parameters) that they could be omitted without much confusion.</p> <p dir="auto">That is, I think it would be fine if the examples were written thus:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="type List[E any = interface{}] struct { ... } func Min[T comparable = float64](x, y T) T { ... }"><pre class="notranslate"><code class="notranslate">type List[E any = interface{}] struct { ... } func Min[T comparable = float64](x, y T) T { ... } </code></pre></div> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 19" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-1306803" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>19</span> </button> <tool-tip id="tooltip-42da2949-4353-4008-bccc-b2b1872b9063" for="discussion-upvote-button-DiscussionComment-1306803" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-e54f05" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>8</span> </button> <button name="input[content]" id="reactions--reaction_button_component-737ecc" value="HOORAY react" data-button-index-position="3" data-reaction-label="Hooray" data-reaction-content="tada" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="tada" fallback-src="https://github.githubassets.com/assets/1f389-36899a2cb781.png" class="social-button-emoji">🎉</g-emoji> <span>1</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>8</span> </li> <li class="dropdown-item" aria-label="tada"> <g-emoji alias="tada" fallback-src="https://github.githubassets.com/assets/1f389-36899a2cb781.png" class="social-button-emoji">🎉</g-emoji> <span>1</span> </li> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 3 replies </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker color-bg-inset border-top color-border-default mt-n1 rounded-bottom-2" data-child-comments id="child-comments-discussioncomment-1306803"> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1350322,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="50a0fad5608a8bee4115ba07a7259a28b1d64c8e8e6bfc9bdbad2387625f5b55" data-hovercard-type="user" data-hovercard-url="/users/AlaxLee/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/AlaxLee"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/5745452?s=60&amp;v=4" width="30" height="30" alt="@AlaxLee" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1350322" data-gid="DC_kwDOAWBuf84AFJqy" data-url="/golang/go/discussions/48287/comments/1350322" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="74114715092573f9e756251dadf3cc0ff4938c6fda806831510fa9fc8f016495" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1350322-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1350322-list" aria-labelledby="tooltip-d1efc655-c11c-430a-bc45-b7d3c08bda46" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-d1efc655-c11c-430a-bc45-b7d3c08bda46" for="Comment-actions-1350322-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1350322-list" role="menu" aria-labelledby="Comment-actions-1350322-text"> <include-fragment src="/golang/go/discussions/48287/comments/1350322/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1350322" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1350322,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="50a0fad5608a8bee4115ba07a7259a28b1d64c8e8e6bfc9bdbad2387625f5b55" data-hovercard-type="user" data-hovercard-url="/users/AlaxLee/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/AlaxLee" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> AlaxLee </a> <a href="#discussioncomment-1350322" id="discussioncomment-1350322-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-18T06:54:17Z" class="no-wrap">Sep 18, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1350322/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1350322" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">Drop the parentheses is good idea. "=" usually used for "equal" or "assignment", if we can use another word instead of "="?<br> For example:<br> <code class="notranslate">type List[E any default interface{}] struct { ... }</code></p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-51e6fc" value="THUMBS_DOWN react" data-button-index-position="1" data-reaction-label="-1" data-reaction-content="-1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>2</span> </button> <button name="input[content]" id="reactions--reaction_button_component-cde2ef" value="EYES react" data-button-index-position="7" data-reaction-label="Eyes" data-reaction-content="eyes" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="eyes" fallback-src="https://github.githubassets.com/assets/1f440-ee44e91e92a7.png" class="social-button-emoji">👀</g-emoji> <span>1</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="-1"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>2</span> </li> <li class="dropdown-item" aria-label="eyes"> <g-emoji alias="eyes" fallback-src="https://github.githubassets.com/assets/1f440-ee44e91e92a7.png" class="social-button-emoji">👀</g-emoji> <span>1</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1350455,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="897057d87bf3cbd6aff7e415d1d4746cb350079eb3b4546057b1bbc0c6fd012a" data-hovercard-type="user" data-hovercard-url="/users/AndrewHarrisSPU/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/AndrewHarrisSPU"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/44661351?s=60&amp;v=4" width="30" height="30" alt="@AndrewHarrisSPU" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1350455" data-gid="DC_kwDOAWBuf84AFJs3" data-url="/golang/go/discussions/48287/comments/1350455" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="b7a9d4625f6a79ceb8b02249a940e6acef0065e8417be8df54b0b37c8a73c367" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1350455-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1350455-list" aria-labelledby="tooltip-f872c0d1-8087-4601-94ab-07d7465393ac" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-f872c0d1-8087-4601-94ab-07d7465393ac" for="Comment-actions-1350455-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1350455-list" role="menu" aria-labelledby="Comment-actions-1350455-text"> <include-fragment src="/golang/go/discussions/48287/comments/1350455/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1350455" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> <edit-history> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" aria-haspopup="true" aria-controls="discussion-edit-history-1350455-list" aria-expanded="false" id="discussion-edit-history-1350455-text" data-target="edit-history.menuTrigger" type="button" data-view-component="true" class="Button--invisible Button--small Button"> <span class="Button-content"> <span class="Button-label">edited</span> </span> <span class="Button-visual Button-trailingAction"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path> </svg> </span> </button> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="discussion-edit-history-1350455-list" role="menu" aria-labelledby="discussion-edit-history-1350455-text"> <include-fragment src="/golang/go/discussions/48287/comments/1350455/edits_log" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="edit-history.deletedDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> {{actor}} deleted this content <relative-time class="no-wrap" datetime="{{datetime}}"></relative-time>. </div> </scrollable-region> </dialog></dialog-helper> </template> <template data-target="edit-history.diffDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-large Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body p-0"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> </edit-history> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1350455,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="897057d87bf3cbd6aff7e415d1d4746cb350079eb3b4546057b1bbc0c6fd012a" data-hovercard-type="user" data-hovercard-url="/users/AndrewHarrisSPU/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/AndrewHarrisSPU" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> AndrewHarrisSPU </a> <a href="#discussioncomment-1350455" id="discussioncomment-1350455-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-18T08:07:13Z" class="no-wrap">Sep 18, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1350455/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1350455" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">I agree the sense in which <code class="notranslate">E</code> would be assigned <code class="notranslate">interface{}</code> as a default value by <code class="notranslate">=</code> feels a bit out of place here. <code class="notranslate">default</code> seems a little more obvious. Really, I think the type assertion syntax is the strongest analogy: <code class="notranslate">E.(interface{})</code> in the production of <code class="notranslate">type List[E.(interface{}) any] struct { ... }</code>. (Maybe it's clearer to say it's a type judgement, as 'assertion' can imply something that can fail?)</p> <p dir="auto"><a href="https://golang.org/ref/spec#Type_assertions" rel="nofollow">The spec</a> states the following for the type assertion from an interface <code class="notranslate">x.(T)</code>:</p> <blockquote> <p dir="auto">... even though the dynamic type of <code class="notranslate">x</code> is known only at run time, the type of <code class="notranslate">x.(T)</code> is known to be <code class="notranslate">T</code> in a correct program.</p> </blockquote> <p dir="auto">Here we would be analogously stating for a type judgement <code class="notranslate">E.(interface{})</code>:</p> <blockquote> <p dir="auto">... even though the <em>concrete</em> type of <code class="notranslate">E</code> is only known at <em>instantiation</em> time, the type of <code class="notranslate">E.(interface{})</code> is known to be <code class="notranslate">interface{}</code> in a correct program.</p> </blockquote> <p dir="auto">This judgement holds even if no other instantiation of <code class="notranslate">E</code> can be reached ... so, there is a subtle difference between <code class="notranslate">E any</code> and <code class="notranslate">E.(any) any</code>.</p> <p dir="auto">For <code class="notranslate">Min[T.(float64) comparable](x, y T) T { ... }</code>, when something like <code class="notranslate">Min(1, 2)</code> returns <code class="notranslate">float64</code>, maybe it's sensible to say it's a <em>judgement</em>?</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1367838,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="132a014a596d21ce8ca1b7606143a20816b1b8321d8bee437e426208f9b486e0" data-hovercard-type="user" data-hovercard-url="/users/AlaxLee/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/AlaxLee"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/5745452?s=60&amp;v=4" width="30" height="30" alt="@AlaxLee" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1367838" data-gid="DC_kwDOAWBuf84AFN8e" data-url="/golang/go/discussions/48287/comments/1367838" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="155697113b83b7c5fa41e68cdfc20109403971afbb2d349d7c34118f23dce91d" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1367838-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1367838-list" aria-labelledby="tooltip-49e3f3e5-b496-4bab-ae3d-61139ec3c001" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-49e3f3e5-b496-4bab-ae3d-61139ec3c001" for="Comment-actions-1367838-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1367838-list" role="menu" aria-labelledby="Comment-actions-1367838-text"> <include-fragment src="/golang/go/discussions/48287/comments/1367838/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1367838" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1367838,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="132a014a596d21ce8ca1b7606143a20816b1b8321d8bee437e426208f9b486e0" data-hovercard-type="user" data-hovercard-url="/users/AlaxLee/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/AlaxLee" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> AlaxLee </a> <a href="#discussioncomment-1367838" id="discussioncomment-1367838-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-22T08:22:25Z" class="no-wrap">Sep 22, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1367838/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1367838" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">IMHO, There may be a confusing place here.<br> When using <code class="notranslate">x.(T)</code>, it often means:</p> <blockquote> <p dir="auto">if x's type is T, right; if not T, wrong.</p> </blockquote> <p dir="auto">When using <code class="notranslate">E.(interface{})</code> in <code class="notranslate">type List[E.(interface{}) any] struct { ... }</code>, it means:</p> <blockquote> <p dir="auto">if E's type is interface{}, right; if not interface{}, right too.</p> </blockquote> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AFBq7" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-1317563" data-gid="DC_kwDOAWBuf84AFBq7" data-url="/golang/go/discussions/48287/comments/1317563" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="e463e88b0370813b17b1f925e9aa8edd49c59ac6edb573d08b49cde76b952a5b" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1317563-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1317563-list" aria-labelledby="tooltip-e04abed0-0157-4ce4-bfcc-1805248614de" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-e04abed0-0157-4ce4-bfcc-1805248614de" for="Comment-actions-1317563-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1317563-list" role="menu" aria-labelledby="Comment-actions-1317563-text"> <include-fragment src="/golang/go/discussions/48287/comments/1317563/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1317563" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1317563,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="f4a888810a96ffbc2c16241ed8cd01f3900047c567a64a24597362d37eab85ae" data-hovercard-type="user" data-hovercard-url="/users/DeedleFake/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/DeedleFake" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/326750?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">DeedleFake</span> </div> </a> <a href="#discussioncomment-1317563" id="discussioncomment-1317563-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-13T17:35:31Z" class="no-wrap">Sep 13, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h3> </div> </div> <div class="color-bg-default border-bottom position-relative"> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1317563/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1317563" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto">Is this something that could be handled by the <code class="notranslate">go</code> directive in <code class="notranslate">go.mod</code>? Something like <code class="notranslate">go 1.18</code> and up changes them to generic versions, with a <code class="notranslate">go fix</code> directive to add an explicit <code class="notranslate">sync.Map[interface{}, interface{}]</code> and the like? This would obviously only work for the standard library, but external modules can use a major version update to introduce generics instead.</p> <p dir="auto">It seems like overkill for something like this, and if a clean alternative can be found than that's probably better, but I hadn't seen it discussed anywhere and introducing incompatibilities <em>was</em> one of the primary motivations for adding the directive, if I remember correctly.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 8" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-1317563" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>8</span> </button> <tool-tip id="tooltip-fe615f7e-aa66-4778-9e54-b151a1041b9c" for="discussion-upvote-button-DiscussionComment-1317563" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-e140b3" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>24</span> </button> <button name="input[content]" id="reactions--reaction_button_component-dc32cf" value="THUMBS_DOWN react" data-button-index-position="1" data-reaction-label="-1" data-reaction-content="-1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>1</span> </button> <button name="input[content]" id="reactions--reaction_button_component-3ddcae" value="LAUGH react" data-button-index-position="2" data-reaction-label="Laugh" data-reaction-content="smile" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="smile" fallback-src="https://github.githubassets.com/assets/1f604-7528822fb4c5.png" class="social-button-emoji">😄</g-emoji> <span>1</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>24</span> </li> <li class="dropdown-item" aria-label="-1"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>1</span> </li> <li class="dropdown-item" aria-label="smile"> <g-emoji alias="smile" fallback-src="https://github.githubassets.com/assets/1f604-7528822fb4c5.png" class="social-button-emoji">😄</g-emoji> <span>1</span> </li> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 2 replies </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker color-bg-inset border-top color-border-default mt-n1 rounded-bottom-2" data-child-comments id="child-comments-discussioncomment-1317563"> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1320753,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="e77e1f3a7be75b326fb902284bb0031f926ef13faa44e68097316ddf2a4252c5" data-hovercard-type="user" data-hovercard-url="/users/bcmills/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/bcmills"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/5200974?s=60&amp;v=4" width="30" height="30" alt="@bcmills" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1320753" data-gid="DC_kwDOAWBuf84AFCcx" data-url="/golang/go/discussions/48287/comments/1320753" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="01603b56c76e1c6bd4f3817afa4adc7336fe18fc095bd3eec5e4dc92606b8415" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1320753-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1320753-list" aria-labelledby="tooltip-9603790a-f680-4dbb-b775-6caea8f82bf8" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-9603790a-f680-4dbb-b775-6caea8f82bf8" for="Comment-actions-1320753-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1320753-list" role="menu" aria-labelledby="Comment-actions-1320753-text"> <include-fragment src="/golang/go/discussions/48287/comments/1320753/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1320753" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1320753,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="e77e1f3a7be75b326fb902284bb0031f926ef13faa44e68097316ddf2a4252c5" data-hovercard-type="user" data-hovercard-url="/users/bcmills/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/bcmills" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> bcmills </a> <a href="#discussioncomment-1320753" id="discussioncomment-1320753-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-13T21:19:47Z" class="no-wrap">Sep 13, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1320753/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1320753" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">That option came up a bit in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3563602" data-permission-text="Title is private" data-url="https://github.com/golang/go/discussions/48287" data-hovercard-type="discussion" data-hovercard-url="/golang/go/discussions/48287/hovercard?comment_id=1302301" href="https://github.com/golang/go/discussions/48287#discussioncomment-1302301">#48287 (comment)</a>. (I think the tricky part is in defining the syntax for the declaration site.)</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-814bc4" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>1</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>1</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1366096,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="78f4640347aea18dae1cf3b59ef4fd14d0e29cb6a29c26773b450d1957e8d60d" data-hovercard-type="user" data-hovercard-url="/users/suared/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/suared"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/8690791?s=60&amp;v=4" width="30" height="30" alt="@suared" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1366096" data-gid="DC_kwDOAWBuf84AFNhQ" data-url="/golang/go/discussions/48287/comments/1366096" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="49718d1ecf13075c476ccc5bd86512746a44004fb5b942d7b09c29fbef499e83" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1366096-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1366096-list" aria-labelledby="tooltip-d9bbd9da-bf99-4695-80f1-d85090d87393" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-d9bbd9da-bf99-4695-80f1-d85090d87393" for="Comment-actions-1366096-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1366096-list" role="menu" aria-labelledby="Comment-actions-1366096-text"> <include-fragment src="/golang/go/discussions/48287/comments/1366096/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1366096" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1366096,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="78f4640347aea18dae1cf3b59ef4fd14d0e29cb6a29c26773b450d1957e8d60d" data-hovercard-type="user" data-hovercard-url="/users/suared/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/suared" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> suared </a> <a href="#discussioncomment-1366096" id="discussioncomment-1366096-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-22T00:49:31Z" class="no-wrap">Sep 22, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1366096/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1366096" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">Why would that be required? Wouldnt it be a 1 time fix?</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AFGaz" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-1337011" data-gid="DC_kwDOAWBuf84AFGaz" data-url="/golang/go/discussions/48287/comments/1337011" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="296dce06a7f4b6ab9a97e79b38c379e794f4038cd95d47da1f11c00eefd883f8" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1337011-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1337011-list" aria-labelledby="tooltip-d6f00ebc-52fd-4919-8a29-6b96dc126612" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-d6f00ebc-52fd-4919-8a29-6b96dc126612" for="Comment-actions-1337011-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1337011-list" role="menu" aria-labelledby="Comment-actions-1337011-text"> <include-fragment src="/golang/go/discussions/48287/comments/1337011/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1337011" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> <edit-history> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" aria-haspopup="true" aria-controls="discussion-edit-history-1337011-list" aria-expanded="false" id="discussion-edit-history-1337011-text" data-target="edit-history.menuTrigger" type="button" data-view-component="true" class="Button--invisible Button--small Button"> <span class="Button-content"> <span class="Button-label">edited</span> </span> <span class="Button-visual Button-trailingAction"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path> </svg> </span> </button> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="discussion-edit-history-1337011-list" role="menu" aria-labelledby="discussion-edit-history-1337011-text"> <include-fragment src="/golang/go/discussions/48287/comments/1337011/edits_log" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="edit-history.deletedDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> {{actor}} deleted this content <relative-time class="no-wrap" datetime="{{datetime}}"></relative-time>. </div> </scrollable-region> </dialog></dialog-helper> </template> <template data-target="edit-history.diffDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-large Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body p-0"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> </edit-history> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1337011,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="184efee53ae531a67c32c3c8ecb0133ac8565f66e74de2eef1740116f8b964f7" data-hovercard-type="user" data-hovercard-url="/users/akavel/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/akavel" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/273837?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">akavel</span> </div> </a> <a href="#discussioncomment-1337011" id="discussioncomment-1337011-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-16T07:33:35Z" class="no-wrap">Sep 16, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h3> </div> </div> <div class="color-bg-default border-bottom position-relative"> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1337011/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1337011" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto">A proposal/idea related to various more or less vague "go fix" approaches <a href="https://github.com/golang/go/discussions/48287#discussioncomment-1317563" data-hovercard-type="discussion" data-hovercard-url="/golang/go/discussions/48287/hovercard?comment_id=1317563">already</a> mentioned <a href="https://github.com/golang/go/discussions/48287#discussioncomment-1302301" data-hovercard-type="discussion" data-hovercard-url="/golang/go/discussions/48287/hovercard?comment_id=1302301">around</a> here <a href="https://github.com/golang/go/issues/25572#issuecomment-393344281" data-hovercard-type="issue" data-hovercard-url="/golang/go/issues/25572/hovercard">and there</a>, but specific enough and subtly different enough to warrant separate mention, given this is clearly a brainstorming discussion:</p> <ul dir="auto"> <li>Treat go version directive in go.mod as transition point, such that: <ul dir="auto"> <li>for code having version &lt; go1.18, new packages are available via <code class="notranslate">import "go2/math"</code> etc., old packages via regular <code class="notranslate">import "math"</code></li> <li>for code having version &gt;= go1.18, new packages are now available via <code class="notranslate">import "math"</code> etc., old packages via <code class="notranslate">import "go1compat/math"</code></li> <li>a <code class="notranslate">go fix upgrade</code> (or similar) rewrites the imports &amp; bumps the go version directive in go.mod</li> </ul> </li> </ul> <p dir="auto">(obviously, the "go2/" and "go1compat/" prefixes being subject to bikeshedding, and go1.18 subject to change to newer)</p> <p dir="auto"><em>edit:</em> Notably, AFAIU this is also basically how <a href="https://doc.rust-lang.org/edition-guide/editions/index.html" rel="nofollow">Rust editions</a> are working, so Rust community leaders could be consulted about any nonobvious pros or cons of this approach. FWIW, from a distance it seems to be working for them well enough that they repeated this "phase transition" a few times already. Also, if adopted, this could possibly also help with other bigger "Go2" changes if needed at some point.</p> <p dir="auto"><em>edit 2:</em> This also seems to me fairly similar to the <code class="notranslate">/v2</code>, <code class="notranslate">/v3</code>, etc. versioning in 3rd-party packages, as introduced with the modules system. The difference being, Go stdlib under this proposal would come with a "<a href="https://en.wikipedia.org/wiki/Deflation" rel="nofollow">deflation</a>" mechanism via <code class="notranslate">go fix</code>, basically purely for ergonomy/ease-of-writing's sake. Though the disadvantage of this "deflation system" would be that when <em>reading</em> Go code, one could then not be immediately sure which version of the stdlib the code is using - only being able to discern this after looking into <code class="notranslate">go.mod</code>.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 7" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-1337011" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>7</span> </button> <tool-tip id="tooltip-676548df-293d-4760-9eec-4fdd62dfcdcf" for="discussion-upvote-button-DiscussionComment-1337011" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-54244c" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>7</span> </button> <button name="input[content]" id="reactions--reaction_button_component-14dc0d" value="THUMBS_DOWN react" data-button-index-position="1" data-reaction-label="-1" data-reaction-content="-1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>9</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>7</span> </li> <li class="dropdown-item" aria-label="-1"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>9</span> </li> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 1 reply </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker color-bg-inset border-top color-border-default mt-n1 rounded-bottom-2" data-child-comments id="child-comments-discussioncomment-1337011"> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1359831,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="b933543e3ef9b975e50e13710359438b654db46ae9d97f6a25ad717bd3b8b0ec" data-hovercard-type="user" data-hovercard-url="/users/ianlancetaylor/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/ianlancetaylor"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/3194333?s=60&amp;v=4" width="30" height="30" alt="@ianlancetaylor" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1359831" data-gid="DC_kwDOAWBuf84AFL_X" data-url="/golang/go/discussions/48287/comments/1359831" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="00a462e93ba23b9614d0f8d616a25172f2bcd5d952a74ae1365846e8042a0402" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1359831-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1359831-list" aria-labelledby="tooltip-30e5945f-abb0-4e3f-ba47-0ee33cc6ce2f" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-30e5945f-abb0-4e3f-ba47-0ee33cc6ce2f" for="Comment-actions-1359831-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1359831-list" role="menu" aria-labelledby="Comment-actions-1359831-text"> <include-fragment src="/golang/go/discussions/48287/comments/1359831/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1359831" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1359831,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="b933543e3ef9b975e50e13710359438b654db46ae9d97f6a25ad717bd3b8b0ec" data-hovercard-type="user" data-hovercard-url="/users/ianlancetaylor/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/ianlancetaylor" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> ianlancetaylor </a> <a href="#discussioncomment-1359831" id="discussioncomment-1359831-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-20T23:38:01Z" class="no-wrap">Sep 20, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > <span title="This user is a maintainer on this repository." data-view-component="true" class="Label py-0 ml-1"> Maintainer </span> </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1359831/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1359831" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">I think this could work but I think it would be difficult for people to understand. It's always problematic when the exact same code means different things based on some other file. It makes it much harder to understand the code when reading it. In this case the problem is somewhat mitigated because it is a one time transition cost. But still.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AFGcZ" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-1337113" data-gid="DC_kwDOAWBuf84AFGcZ" data-url="/golang/go/discussions/48287/comments/1337113" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="a8b01ac8beeeedd702f8fc547e1fbef20c174a96c9be02ed3607d1759433e7cc" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1337113-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1337113-list" aria-labelledby="tooltip-e024ae0a-e8f0-49b9-b15c-f6c88871a6f9" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-e024ae0a-e8f0-49b9-b15c-f6c88871a6f9" for="Comment-actions-1337113-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1337113-list" role="menu" aria-labelledby="Comment-actions-1337113-text"> <include-fragment src="/golang/go/discussions/48287/comments/1337113/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1337113" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1337113,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="ee50d44b43a08e69808b9b161ec2abbb66b33a1c9d5f891a5eab3101166c7c8a" data-hovercard-type="user" data-hovercard-url="/users/oxplot/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/oxplot" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/483682?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">oxplot</span> </div> </a> <a href="#discussioncomment-1337113" id="discussioncomment-1337113-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-16T07:54:53Z" class="no-wrap">Sep 16, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h3> </div> </div> <div class="color-bg-default border-bottom position-relative"> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1337113/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1337113" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto">We could teach <code class="notranslate">go.mod</code> replace to work with stdlib packages.</p> <p dir="auto">As an example:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="module xyz go 1.18 replace sort =&gt; typed/sort require ( ... )"><pre class="notranslate"><code class="notranslate">module xyz go 1.18 replace sort =&gt; typed/sort require ( ... ) </code></pre></div> <p dir="auto">Benefits:</p> <ul dir="auto"> <li>Backward compatibility: all parameterized types are under <code class="notranslate">typed/</code> (or something similar)</li> <li>Explicit: no magical compiler behavior choosing one version over another based on some heuristic.</li> <li>New code can trivially use the go.mod <code class="notranslate">replace</code> (and <code class="notranslate">go mod init</code> can add the replace directive automatically for Go versions that support generics).</li> <li>Existing code can be migrated by explicitly naming the import path <code class="notranslate">import sort "typed/sort"</code>.</li> <li>Go 2 will rename all <code class="notranslate">typed/*</code> to <code class="notranslate">*</code> and provide code upgrade tool.</li> </ul> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 1" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-1337113" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>1</span> </button> <tool-tip id="tooltip-3a7641e8-829d-40ad-8f5a-4ff0201df066" for="discussion-upvote-button-DiscussionComment-1337113" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-275be8" value="THUMBS_DOWN react" data-button-index-position="1" data-reaction-label="-1" data-reaction-content="-1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>21</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="-1"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>21</span> </li> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 1 reply </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker color-bg-inset border-top color-border-default mt-n1 rounded-bottom-2" data-child-comments id="child-comments-discussioncomment-1337113"> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1337293,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="97b3c6a9721c9bea5582208469fad01c6a9a2f76261863708126053d1ffe67c9" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Merovius"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/720787?s=60&amp;v=4" width="30" height="30" alt="@Merovius" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1337293" data-gid="DC_kwDOAWBuf84AFGfN" data-url="/golang/go/discussions/48287/comments/1337293" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="6279a8160248707378f07c1140a79fbd4029192e3fbb16d78c4b000e2bab82fa" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1337293-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1337293-list" aria-labelledby="tooltip-9e9c4f34-e6d1-44f2-847f-30eea5ded062" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-9e9c4f34-e6d1-44f2-847f-30eea5ded062" for="Comment-actions-1337293-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1337293-list" role="menu" aria-labelledby="Comment-actions-1337293-text"> <include-fragment src="/golang/go/discussions/48287/comments/1337293/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1337293" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1337293,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="97b3c6a9721c9bea5582208469fad01c6a9a2f76261863708126053d1ffe67c9" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Merovius" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> Merovius </a> <a href="#discussioncomment-1337293" id="discussioncomment-1337293-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-16T08:32:33Z" class="no-wrap">Sep 16, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1337293/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1337293" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">This seems unhelpful to me. Library code is going to want to use the new versions of packages and can't rely on <code class="notranslate">replace</code>. So they will have to type out the entire path. At that point, it seems simpler and less confusing to just have everybody type out the full import path.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-ce231c" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>7</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>7</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AFHqE" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-1342084" data-gid="DC_kwDOAWBuf84AFHqE" data-url="/golang/go/discussions/48287/comments/1342084" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="38167fc7e1d5860348d487dfa85af87193eacaad284ad555ccc3d0983bada2b4" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1342084-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1342084-list" aria-labelledby="tooltip-54393db1-5bb5-4f2a-97ca-257acac3b2d5" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-54393db1-5bb5-4f2a-97ca-257acac3b2d5" for="Comment-actions-1342084-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1342084-list" role="menu" aria-labelledby="Comment-actions-1342084-text"> <include-fragment src="/golang/go/discussions/48287/comments/1342084/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1342084" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> <edit-history> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" aria-haspopup="true" aria-controls="discussion-edit-history-1342084-list" aria-expanded="false" id="discussion-edit-history-1342084-text" data-target="edit-history.menuTrigger" type="button" data-view-component="true" class="Button--invisible Button--small Button"> <span class="Button-content"> <span class="Button-label">edited</span> </span> <span class="Button-visual Button-trailingAction"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path> </svg> </span> </button> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="discussion-edit-history-1342084-list" role="menu" aria-labelledby="discussion-edit-history-1342084-text"> <include-fragment src="/golang/go/discussions/48287/comments/1342084/edits_log" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="edit-history.deletedDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> {{actor}} deleted this content <relative-time class="no-wrap" datetime="{{datetime}}"></relative-time>. </div> </scrollable-region> </dialog></dialog-helper> </template> <template data-target="edit-history.diffDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-large Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body p-0"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> </edit-history> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1342084,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="7a0655a5fff7280d6df3b5beba574ef8f1052b9ca9909b4a929f3d9c817e1cf5" data-hovercard-type="user" data-hovercard-url="/users/renthraysk/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/renthraysk" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/30576707?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">renthraysk</span> </div> </a> <a href="#discussioncomment-1342084" id="discussioncomment-1342084-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-16T12:52:11Z" class="no-wrap">Sep 16, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h3> </div> </div> <div class="color-bg-default border-bottom position-relative"> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1342084/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1342084" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto">Is the plan to keep the generics behaving the same as the original?</p> <p dir="auto">As implemented as a generic <code class="notranslate">bits.RotateLeft()</code> the inliner is assigning a much higher cost (almost x2) to the function. Whilst doesn't prevent it from inlining, it prevents the caller, <code class="notranslate">QVarint()</code>, from inlining (non-generic cost is &lt; 50, generic cost is &gt; 120), even though the assembly generated from the generic code is practically identical to the assembly generated from the non-generic code.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="type Unsigned interface { ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uint } func BitWidth[T Unsigned]() uint { return uint(8 + (T(8&lt;&lt;8) &gt;&gt; 8) + (T(16&lt;&lt;16) &gt;&gt; 16) + (T(32&lt;&lt;32) &gt;&gt; 32)) } func RotateLeft[T Unsigned](x T, k int) T { n := BitWidth[T]() s := uint(k) &amp; (n - 1) return x&lt;&lt;s | x&gt;&gt;(n-s) } func QVarint[T Unsigned](x T) (uint64, int) { y := uint64(RotateLeft(x, 2)) n := uint(8) &lt;&lt; (y &amp; 0b11) if w := BitWidth[T](); w == 64 || n &lt;= w { s := w + 2 - n return y &gt;&gt; (s % 64), int(n / 8) } // truncated return 0, -1 } func main() { x := uint64(1 &lt;&lt; 56) y, n := QVarint(x) _, _ = y, n } "><pre class="notranslate"><code class="notranslate">type Unsigned interface { ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uint } func BitWidth[T Unsigned]() uint { return uint(8 + (T(8&lt;&lt;8) &gt;&gt; 8) + (T(16&lt;&lt;16) &gt;&gt; 16) + (T(32&lt;&lt;32) &gt;&gt; 32)) } func RotateLeft[T Unsigned](x T, k int) T { n := BitWidth[T]() s := uint(k) &amp; (n - 1) return x&lt;&lt;s | x&gt;&gt;(n-s) } func QVarint[T Unsigned](x T) (uint64, int) { y := uint64(RotateLeft(x, 2)) n := uint(8) &lt;&lt; (y &amp; 0b11) if w := BitWidth[T](); w == 64 || n &lt;= w { s := w + 2 - n return y &gt;&gt; (s % 64), int(n / 8) } // truncated return 0, -1 } func main() { x := uint64(1 &lt;&lt; 56) y, n := QVarint(x) _, _ = y, n } </code></pre></div> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 7" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-1342084" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>7</span> </button> <tool-tip id="tooltip-421ba62f-e932-4c83-88df-02ce9146acbc" for="discussion-upvote-button-DiscussionComment-1342084" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-393754" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>10</span> </button> <button name="input[content]" id="reactions--reaction_button_component-ef48d0" value="EYES react" data-button-index-position="7" data-reaction-label="Eyes" data-reaction-content="eyes" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="eyes" fallback-src="https://github.githubassets.com/assets/1f440-ee44e91e92a7.png" class="social-button-emoji">👀</g-emoji> <span>6</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>10</span> </li> <li class="dropdown-item" aria-label="eyes"> <g-emoji alias="eyes" fallback-src="https://github.githubassets.com/assets/1f440-ee44e91e92a7.png" class="social-button-emoji">👀</g-emoji> <span>6</span> </li> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 1 reply </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker color-bg-inset border-top color-border-default mt-n1 rounded-bottom-2" data-child-comments id="child-comments-discussioncomment-1342084"> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1342191,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="3d86b6cde30e4fdbf6851168c55c40c9555efafdcd85ca01a72ad777f77a0261" data-hovercard-type="user" data-hovercard-url="/users/rsc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/rsc"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/104030?s=60&amp;v=4" width="30" height="30" alt="@rsc" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1342191" data-gid="DC_kwDOAWBuf84AFHrv" data-url="/golang/go/discussions/48287/comments/1342191" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="ce2033691f5f3c949fb98eef08d4c11dd4a6a20d7d309690760a77f5c74450e3" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1342191-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1342191-list" aria-labelledby="tooltip-f562c44a-f89e-4167-8d57-ef01f4d05de5" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-f562c44a-f89e-4167-8d57-ef01f4d05de5" for="Comment-actions-1342191-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1342191-list" role="menu" aria-labelledby="Comment-actions-1342191-text"> <include-fragment src="/golang/go/discussions/48287/comments/1342191/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1342191" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1342191,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="3d86b6cde30e4fdbf6851168c55c40c9555efafdcd85ca01a72ad777f77a0261" data-hovercard-type="user" data-hovercard-url="/users/rsc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/rsc" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> rsc </a> <a href="#discussioncomment-1342191" id="discussioncomment-1342191-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-16T13:08:58Z" class="no-wrap">Sep 16, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > <span title="This user is a maintainer on this repository." data-view-component="true" class="Label py-0 ml-1"> Maintainer </span> <span title="This user is the author of this discussion." data-view-component="true" class="Label py-0 ml-1"> Author </span> </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1342191/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1342191" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">It is definitely the case that if we write generic APIs that we expect to be inlined, we will need to pay attention to the cost assumed by the inliner in higher-level frames. Thanks for raising this issue.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-70997d" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>26</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>26</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AFHqM" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-1342092" data-gid="DC_kwDOAWBuf84AFHqM" data-url="/golang/go/discussions/48287/comments/1342092" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="3b500ccfd82186cc4312490ed10fb0edd6a52e7a7ae4004ca3d6bd565290e89a" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1342092-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1342092-list" aria-labelledby="tooltip-6fe5cb30-8df7-42b0-a462-28cd66cd86d5" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-6fe5cb30-8df7-42b0-a462-28cd66cd86d5" for="Comment-actions-1342092-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1342092-list" role="menu" aria-labelledby="Comment-actions-1342092-text"> <include-fragment src="/golang/go/discussions/48287/comments/1342092/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1342092" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1342092,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="232adf24b329e430fe875aa27a403cd01e8a426b38ed6c3123550f7ead2f7d70" data-hovercard-type="user" data-hovercard-url="/users/bmhatfield/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/bmhatfield" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/1119967?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">bmhatfield</span> </div> </a> <a href="#discussioncomment-1342092" id="discussioncomment-1342092-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-16T12:53:26Z" class="no-wrap">Sep 16, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h3> </div> </div> <div class="color-bg-default border-bottom position-relative"> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1342092/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1342092" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto">A possible awful idea for rejection: implementation-specific suffixes akin to <code class="notranslate">_unix</code>, <code class="notranslate">_windows</code>, etc, but for generics/not: <code class="notranslate">_generic</code>, <code class="notranslate">_typed</code>. This would allow us to compile a typed version in contexts where generics are not available, and a generic version where they are. Also possible/less collide-y would be version build suffixes instead (<code class="notranslate">_1.17</code>, <code class="notranslate">_</code>1.18`).</p> <p dir="auto">This builds on the observation:</p> <blockquote> <p dir="auto">For functions, which will often infer [the type], the result is strange:<br> there is no obvious difference between math.MinOf(1, 2) and math.Min(1, 2).</p> </blockquote> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 1" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-1342092" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>1</span> </button> <tool-tip id="tooltip-1ce1912c-41c2-40ab-935f-6c48f847fa5f" for="discussion-upvote-button-DiscussionComment-1342092" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-22bd60" value="THUMBS_DOWN react" data-button-index-position="1" data-reaction-label="-1" data-reaction-content="-1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>12</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="-1"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>12</span> </li> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 1 reply </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker color-bg-inset border-top color-border-default mt-n1 rounded-bottom-2" data-child-comments id="child-comments-discussioncomment-1342092"> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1342170,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="2b00705f6da8de4c955ee156e1154b138ef64cdc490ffb78c187afece5b2f5ee" data-hovercard-type="user" data-hovercard-url="/users/clarkmcc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/clarkmcc"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/6639685?s=60&amp;v=4" width="30" height="30" alt="@clarkmcc" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1342170" data-gid="DC_kwDOAWBuf84AFHra" data-url="/golang/go/discussions/48287/comments/1342170" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="17cc1f236b4b2a0ac7c5273b39a24e62d6bba1284f3210625595b824aefcab30" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1342170-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1342170-list" aria-labelledby="tooltip-a176b2df-45a6-47b1-81a2-8252a86ba262" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-a176b2df-45a6-47b1-81a2-8252a86ba262" for="Comment-actions-1342170-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1342170-list" role="menu" aria-labelledby="Comment-actions-1342170-text"> <include-fragment src="/golang/go/discussions/48287/comments/1342170/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1342170" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1342170,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="2b00705f6da8de4c955ee156e1154b138ef64cdc490ffb78c187afece5b2f5ee" data-hovercard-type="user" data-hovercard-url="/users/clarkmcc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/clarkmcc" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> clarkmcc </a> <a href="#discussioncomment-1342170" id="discussioncomment-1342170-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-16T13:06:23Z" class="no-wrap">Sep 16, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1342170/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1342170" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">If these suffixes behave anything like existing suffixes, then you could only flip generics on or off for the entire project at compile time. In my opinion, a solution that allows incremental migration of existing projects rather than an all or nothing approach is pretty valuable.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-58bf57" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>11</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>11</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AFHsG" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-1342214" data-gid="DC_kwDOAWBuf84AFHsG" data-url="/golang/go/discussions/48287/comments/1342214" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="7b07643944e9ce6246f3c4e0780a0951a83a437d4b2b7d7d7bec24ce1b19d9e7" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1342214-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1342214-list" aria-labelledby="tooltip-b35fd3a9-93a1-42da-bbbe-7aa6194905b1" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-b35fd3a9-93a1-42da-bbbe-7aa6194905b1" for="Comment-actions-1342214-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1342214-list" role="menu" aria-labelledby="Comment-actions-1342214-text"> <include-fragment src="/golang/go/discussions/48287/comments/1342214/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1342214" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1342214,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="6252aca53775077b95c04c91561d1533d1b6b3f1cda0704924a84997db6b21c1" data-hovercard-type="user" data-hovercard-url="/users/jxsl13/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/jxsl13" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/371944?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">jxsl13</span> </div> </a> <a href="#discussioncomment-1342214" id="discussioncomment-1342214-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-16T13:11:33Z" class="no-wrap">Sep 16, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h3> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1342214/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1342214" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto">I wonder how much compilation time it would take if the function signatures would also be distinguished by their parameter lists. Preferring a generic implementation over the interface one.<br> Just a thought..</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 3" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-1342214" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>3</span> </button> <tool-tip id="tooltip-4249826b-91b1-4477-99ce-acb6ea02b210" for="discussion-upvote-button-DiscussionComment-1342214" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 0 replies </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker" data-child-comments id="child-comments-discussioncomment-1342214"> </div> </div> </div></div> </div> </div> </div> </div> <div id="js-progressive-timeline-item-container"> <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="ajax-pagination-form js-ajax-pagination pagination-loader-container mt-4 mb-4 ml-0 text-center" data-turbo="false" action="/golang/go/discussions/48287/pages?after=DC_kwDOAWBuf84AFHsG&amp;before=DC_kwDOAWBuf84AFKf6" accept-charset="UTF-8" method="get"> <div class="discussion-item-header pt-0"> <div class="Box d-inline-flex flex-column"> <button type="submit" class="color-fg-muted pt-2 pb-0 px-4 color-bg-default border-0"> 15 hidden items </button> <button type="submit" class="ajax-pagination-btn no-underline pb-1 pt-0 px-4 mt-0 mb-1 color-bg-default border-0" data-disable-with="Loading…"> Load more… </button> </div> </div> </form></div> <div id="js-timeline-progressive-loader" data-timeline-item-src="/golang/go/discussions/48287/timeline_anchor?after=DC_kwDOAWBuf84AFHsG&amp;before=DC_kwDOAWBuf84AFKf6" > </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AFKf6" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-1353722" data-gid="DC_kwDOAWBuf84AFKf6" data-url="/golang/go/discussions/48287/comments/1353722" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="b59831d20b1c631c55a3749b9bd68800e69b372b907b5dbaa1f79c354e21b4a6" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1353722-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1353722-list" aria-labelledby="tooltip-f0447f8f-cb60-4ac6-a510-291e71afb3c0" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-f0447f8f-cb60-4ac6-a510-291e71afb3c0" for="Comment-actions-1353722-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1353722-list" role="menu" aria-labelledby="Comment-actions-1353722-text"> <include-fragment src="/golang/go/discussions/48287/comments/1353722/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1353722" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1353722,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="b6c98461d909e152a20f379fdc9a16b4c66a87cafd3210bd74505af19649a8b8" data-hovercard-type="user" data-hovercard-url="/users/nirui/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/nirui" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/30656734?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">nirui</span> </div> </a> <a href="#discussioncomment-1353722" id="discussioncomment-1353722-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-19T13:42:03Z" class="no-wrap">Sep 19, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h3> </div> </div> <div class="color-bg-default border-bottom position-relative"> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1353722/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1353722" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto">I personally like the default type parameters approach because:</p> <ul dir="auto"> <li>For user, it can be introduced largely hassle-free. The old code will enjoy new features without too many modification</li> <li>In the future, some clever mind might find a way to capitalize the feature and turn it into something far more general and useful</li> <li>Not important point, but while some might see it as a "awkward reminder of our pre-generics past", I call it "the heritage of our glory legend"</li> </ul> <p dir="auto">However, there are down sides (I can think of):</p> <ul dir="auto"> <li>It's a "Magical Default", not zero</li> <li>It makes type infer confusing (like in the <code class="notranslate">math.Min</code> case)</li> </ul> <hr> <p dir="auto">The second favor solution of mine is the <code class="notranslate">v2</code> package one, the pros:</p> <ul dir="auto"> <li>It utilizes the version convention that the Go team promotes</li> <li>The old std is unchanged so compatibility is not an issue, while user can still use generics to implement their own struct/functions (should they dislike the one in the std)</li> <li>Let's face it, many packages in the std will face versioning eventually. Might as well just let it happen sooner</li> <li>It's pollution-free, no need to introduce new syntax for the default type parameter</li> </ul> <p dir="auto">And the cons:</p> <ul dir="auto"> <li>It's basically a "Let user upgrade themselves" approach, user must change their code in order to use generics</li> <li>Third-party package maintainers now might has to target two std dependencies rather than just one earlier</li> </ul> <p dir="auto">My opinion is, Go should have a clear "Sink and Lift" strategy that "sinks" packages into a "Compatibility group" if the package cannot fully utilize the new language features (similar to the <code class="notranslate">v1compat</code> idea), and then replace them with packages that can (the "lift" part).</p> <p dir="auto">The Sink and Lift operation should be performed alongside a language upgrade. For example, during Go1 -&gt; Go2 upgrade, <code class="notranslate">math</code> from Go1 should be moved to <code class="notranslate">v1compat/math</code>, and then <code class="notranslate">math/v2</code> becomes the new <code class="notranslate">math</code>.</p> <p dir="auto">When user decides to upgrade their code to Go2, they can use <code class="notranslate">go fix</code> to help them to redirect/replace their dependencies to either the new <code class="notranslate">math</code> or the old <code class="notranslate">v1compat/math</code> one.</p> <hr> <p dir="auto">Here is the idea I don't like: Prefix/Suffix idea ("Of",<code class="notranslate">typed/*</code> and <code class="notranslate">generics/*</code>), because:</p> <ul dir="auto"> <li>It could introduce new elements to std, and they will always be there at least until the next major version (which is true for everything in the std, of course)</li> <li>The next major version will probably undo it (all "Of",<code class="notranslate">typed/*</code> will eventually be removed or replaced with a more general one)</li> <li>User still needs to change their code to utilize generics, same as the <code class="notranslate">v2</code> idea, but without versioning and other benefits</li> <li>The new element is feature-specific. <code class="notranslate">net.DialContext</code> might be good during the time when <code class="notranslate">Context</code> was introduced, but that does not prove that <code class="notranslate">net.DialOf</code> is also good. Think of it: what if you want to use <code class="notranslate">Context</code> and generics at the same time? <code class="notranslate">net.DialContextOf</code>? What if in the future Sumtype become real? <code class="notranslate">net.DialContextOfSum</code>? .... Yeah... I don't think this is really sustainable</li> </ul> <hr> <p dir="auto">So, to sum up again: my small little brain says it loves the default type parameters idea (maybe just not in that exact syntax). And if we can't have that, then the <code class="notranslate">v2</code> idea is the way to go.</p> <p dir="auto">Just my two brain cells.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 4" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-1353722" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>4</span> </button> <tool-tip id="tooltip-2741a726-11fb-4250-af34-90614bfc7769" for="discussion-upvote-button-DiscussionComment-1353722" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-b98065" value="THUMBS_DOWN react" data-button-index-position="1" data-reaction-label="-1" data-reaction-content="-1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>1</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="-1"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>1</span> </li> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 2 replies </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker color-bg-inset border-top color-border-default mt-n1 rounded-bottom-2" data-child-comments id="child-comments-discussioncomment-1353722"> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1354018,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="0c44b7a848dc29e49e453c1cdc0b08e7c7754bac5927616855a1fd3f88f4d118" data-hovercard-type="user" data-hovercard-url="/users/bbrodriges/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/bbrodriges"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/871322?s=60&amp;v=4" width="30" height="30" alt="@bbrodriges" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1354018" data-gid="DC_kwDOAWBuf84AFKki" data-url="/golang/go/discussions/48287/comments/1354018" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="4501e16fad808b14607e0fab42fd16ec2d12faae762aeef8022d602284bf4bcd" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1354018-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1354018-list" aria-labelledby="tooltip-7bec3f4a-f4d9-440b-a794-e172047c5315" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-7bec3f4a-f4d9-440b-a794-e172047c5315" for="Comment-actions-1354018-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1354018-list" role="menu" aria-labelledby="Comment-actions-1354018-text"> <include-fragment src="/golang/go/discussions/48287/comments/1354018/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1354018" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> <edit-history> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" aria-haspopup="true" aria-controls="discussion-edit-history-1354018-list" aria-expanded="false" id="discussion-edit-history-1354018-text" data-target="edit-history.menuTrigger" type="button" data-view-component="true" class="Button--invisible Button--small Button"> <span class="Button-content"> <span class="Button-label">edited</span> </span> <span class="Button-visual Button-trailingAction"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path> </svg> </span> </button> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="discussion-edit-history-1354018-list" role="menu" aria-labelledby="discussion-edit-history-1354018-text"> <include-fragment src="/golang/go/discussions/48287/comments/1354018/edits_log" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="edit-history.deletedDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> {{actor}} deleted this content <relative-time class="no-wrap" datetime="{{datetime}}"></relative-time>. </div> </scrollable-region> </dialog></dialog-helper> </template> <template data-target="edit-history.diffDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-large Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body p-0"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> </edit-history> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1354018,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="0c44b7a848dc29e49e453c1cdc0b08e7c7754bac5927616855a1fd3f88f4d118" data-hovercard-type="user" data-hovercard-url="/users/bbrodriges/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/bbrodriges" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> bbrodriges </a> <a href="#discussioncomment-1354018" id="discussioncomment-1354018-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-19T15:58:10Z" class="no-wrap">Sep 19, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1354018/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1354018" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <blockquote> <p dir="auto">In the future, some clever mind might find<br> This is not a Go approach. Generics is a good example of that. Current proposal describes bare minimum features with intention to extend it in the future based on usage by community.</p> </blockquote> <p dir="auto">Making language change (without new keyword introduction but nonetheless) just for the sake of single problem solution and hoping that some day someone will find another useful application for this feature is bad, imo.</p> <blockquote> <p dir="auto">net.DialContextOf</p> </blockquote> <p dir="auto">This must not happen because all functions after context.Context introduction are not contain Context suffix. Same must go with generics and *Of suffix. <code class="notranslate">net.DialOf</code> must be implemented with context as first argument by default, as well as all new suitable for generics functions must be implemented without *Of suffix by default.</p> <blockquote> <p dir="auto">math/v2</p> </blockquote> <p dir="auto">As much as I like Go approach with package versioning it seems to me that moving just a part of stdlib under versioned directory will introduce more confusion than solve the problem.</p> <p dir="auto">I can imagine user code with imports like <code class="notranslate">math/v2</code>, <code class="notranslate">image/v3</code> in a single file. This approach may fraction stdlib to many (probably incompatible) parts.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-5020be" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>4</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>4</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1355184,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="d2ec689edcf39f78cd1a5d386ca4fac513830c52a57b7619ff261496110abdfd" data-hovercard-type="user" data-hovercard-url="/users/nirui/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/nirui"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/30656734?s=60&amp;v=4" width="30" height="30" alt="@nirui" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1355184" data-gid="DC_kwDOAWBuf84AFK2w" data-url="/golang/go/discussions/48287/comments/1355184" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="7ab2ab61d79392d83d3259ed0537a0d74ad5eb2dd2e6167cfcb1b53401a0a00d" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1355184-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1355184-list" aria-labelledby="tooltip-df2bd40f-9398-4c75-9d52-8aa24736de97" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-df2bd40f-9398-4c75-9d52-8aa24736de97" for="Comment-actions-1355184-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1355184-list" role="menu" aria-labelledby="Comment-actions-1355184-text"> <include-fragment src="/golang/go/discussions/48287/comments/1355184/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1355184" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1355184,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="d2ec689edcf39f78cd1a5d386ca4fac513830c52a57b7619ff261496110abdfd" data-hovercard-type="user" data-hovercard-url="/users/nirui/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/nirui" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> nirui </a> <a href="#discussioncomment-1355184" id="discussioncomment-1355184-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-20T02:33:45Z" class="no-wrap">Sep 20, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1355184/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1355184" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <blockquote> <p dir="auto">This must not happen because all functions after context.Context introduction are not contain Context suffix. Same must go with generics and *Of suffix.</p> </blockquote> <p dir="auto">Is this an artificially enforced rule? If so, then why</p> <blockquote> <p dir="auto">imports like math/v2, image/v3 in a single file.</p> </blockquote> <p dir="auto">can not be artificially avoided by for example a properly designed versioning strategy?</p> <blockquote> <p dir="auto">This approach may fraction stdlib to many (probably incompatible) parts.</p> </blockquote> <p dir="auto">"May" is a strange word. This approach may indeed fraction std to many incompatible parts, the world may also be gone tomorrow in a flash of bang, and I may become the sol dominator of Mars one day.</p> <p dir="auto">The truth is, only some "may"s are really statistical may, others are decided by somebody. The std in Go1.16 is compatible with the one in Go1.17 because somebody decided to guarantee that.</p> <p dir="auto">That been said, down to the core it's really depends on the strategy employed. If Go team wants to protect compatibility, they will design their strategy accordingly. std versioning does not creates fraction naturally.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AFKrR" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-1354449" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="97cdefbdcf086ec518f9a13dfa224cb857738f67d1f9ebdee9957e1fa4479d2e" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1354449-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1354449-list" aria-labelledby="tooltip-d09fbf46-a86b-4ed1-9eed-46af4ad18b3e" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-d09fbf46-a86b-4ed1-9eed-46af4ad18b3e" for="Comment-actions-1354449-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1354449-list" role="menu" aria-labelledby="Comment-actions-1354449-text"> <include-fragment src="/golang/go/discussions/48287/comments/1354449/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1354449" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1354449,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="96069e8fdc73befa442f1b79a5b49af327020de7b6cb2d1a4c5509fc2632f30d" data-hovercard-type="user" data-hovercard-url="/users/Robert-M-Muench/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Robert-M-Muench" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/1826391?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">Robert-M-Muench</span> </div> </a> <a href="#discussioncomment-1354449" id="discussioncomment-1354449-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-19T19:43:51Z" class="no-wrap">Sep 19, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h3> </div> </div> <div class="color-bg-default border-bottom position-relative"> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1354449/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1354449" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto">There are many good ideas. However, all are workarounds in some or the other way.</p> <p dir="auto">Hence, why not be super clear about the switch to a generics based standard library, but in a transparent way. Here is just a rough sketch of the idea:</p> <ol dir="auto"> <li>If I specify 1.18 in my go.mod file or maybe on a per-file basis, the compiler uses the generics' version of the standard lib.</li> <li>If I specify &lt; 1.18 or nothing, the compiler still uses the non-generics version.</li> <li>This applies for all dependencies too.</li> </ol> <p dir="auto">As long as the API semantics don't change, this should work. Maybe some name mangling is needed to separate both code bases on the binary level.</p> <p dir="auto">Instead of doing anything for backward compatibility, we are doing something for forward migration.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 9" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-1354449" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>9</span> </button> <tool-tip id="tooltip-c2d428fe-3a16-4dc6-9457-2467905696fe" for="discussion-upvote-button-DiscussionComment-1354449" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 10 replies </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker color-bg-inset border-top color-border-default mt-n1 rounded-bottom-2" data-child-comments id="child-comments-discussioncomment-1354449"> <div data-view-component="true" class="TimelineItem TimelineItem--condensed discussion-nested-comment-paging-form pt-0 ml-0"> <div style="background-color: transparent; left: 30px;" data-view-component="true" class="TimelineItem-badge discussion-nested-comment-paging-badge pb-3 mt-0 pt-4"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg></div> <div data-view-component="true" class="TimelineItem-body discussion-nested-comment-paging-form-body"> <!-- '"` --><!-- </textarea></xmp> --></option></form><form data-replace-remote-form-target="child-comments-discussioncomment-1354449" data-replace-remote-form="true" data-turbo="false" action="/golang/go/discussions/48287/comments/1354449/threads" accept-charset="UTF-8" method="get"> <input type="hidden" name="back_page" value="1"> <input type="hidden" name="forward_page" value="0"> <input type="hidden" name="anchor_id" value="1364713"> <button data-disable-with="Loading more replies..." type="submit" data-view-component="true" class="Button--link Button--medium Button mb-2 pl-2 pt-2"> <span class="Button-content"> <span class="Button-label">Show 5 previous replies</span> </span> </button> </form></div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1364713,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="fddf30b8bfea7fad3089c3bc525b813da893a945d7e42c7aca6b8e28fe4f19ff" data-hovercard-type="user" data-hovercard-url="/users/matt0xFF/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/matt0xFF"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/5789155?s=60&amp;v=4" width="30" height="30" alt="@matt0xFF" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1364713" data-gid="DC_kwDOAWBuf84AFNLp" data-url="/golang/go/discussions/48287/comments/1364713" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="4a84f94f6ee93a75f8fb2d396ba825250aa135514ca91a4cdf4be8aa0e9e90f1" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1364713-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1364713-list" aria-labelledby="tooltip-568387cf-689d-4775-861a-4c4bc1e475d2" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-568387cf-689d-4775-861a-4c4bc1e475d2" for="Comment-actions-1364713-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1364713-list" role="menu" aria-labelledby="Comment-actions-1364713-text"> <include-fragment src="/golang/go/discussions/48287/comments/1364713/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1364713" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1364713,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="fddf30b8bfea7fad3089c3bc525b813da893a945d7e42c7aca6b8e28fe4f19ff" data-hovercard-type="user" data-hovercard-url="/users/matt0xFF/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/matt0xFF" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> matt0xFF </a> <a href="#discussioncomment-1364713" id="discussioncomment-1364713-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-21T22:39:12Z" class="no-wrap">Sep 21, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1364713/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1364713" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/carlmjohnson/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/carlmjohnson">@carlmjohnson</a>:</p> <blockquote> <p dir="auto">The thing about v2+ [...] you don't have to wonder, "Should I use CancelRequest or cancel the context.Context?" it's very clear v1 is old; v2 is newer; use v2 for new stuff. It's a simple story to be told and understand</p> </blockquote> <p dir="auto">It looks like as of last week <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="680560276" data-permission-text="Title is private" data-url="https://github.com/golang/go/issues/40850" data-hovercard-type="issue" data-hovercard-url="/golang/go/issues/40850/hovercard" href="https://github.com/golang/go/issues/40850">#40850</a> is enabled at <a href="https://pkg.go.dev" rel="nofollow">https://pkg.go.dev</a>, it lets you mark things as deprecated and have them automatically hidden in the documentation. If it's just about keeping the (user-visible) API clear these sort of tooling changes might go a long way without requiring a separate v2 version.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1366908,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="2288aca1f240596ce535edbaac9fcbcd2d5f002fc1a724d69e6f9d14de8b9053" data-hovercard-type="user" data-hovercard-url="/users/jhenstridge/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/jhenstridge"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/12724165?s=60&amp;v=4" width="30" height="30" alt="@jhenstridge" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1366908" data-gid="DC_kwDOAWBuf84AFNt8" data-url="/golang/go/discussions/48287/comments/1366908" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="150b6ca2ebef48238e3936de78898f25c400c1467c3a580604fe622d91e2ea27" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1366908-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1366908-list" aria-labelledby="tooltip-b49e78b2-eafc-47a2-a649-34481b034969" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-b49e78b2-eafc-47a2-a649-34481b034969" for="Comment-actions-1366908-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1366908-list" role="menu" aria-labelledby="Comment-actions-1366908-text"> <include-fragment src="/golang/go/discussions/48287/comments/1366908/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1366908" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1366908,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="2288aca1f240596ce535edbaac9fcbcd2d5f002fc1a724d69e6f9d14de8b9053" data-hovercard-type="user" data-hovercard-url="/users/jhenstridge/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/jhenstridge" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> jhenstridge </a> <a href="#discussioncomment-1366908" id="discussioncomment-1366908-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-22T02:42:46Z" class="no-wrap">Sep 22, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1366908/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1366908" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">Sure, but if you want code that uses the new stdlib to communicate with code using the old stdlib (i.e. calling functions or using types defined by a dependent module), then it's quite possible you'll have situations where Go 1.18 code needs to import packages from the old stdlib.</p> <p dir="auto">So even if there is some automatic import path remapping that is dependent on declared Go version of a module, the real package paths would likely need to be public and usable without remapping. And if they are public, is it really worth bothering with the remapping?</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1368033,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="884dc785dae01ef50e9482e9779024573503193bdf514be2a8187d9fcb93ddc1" data-hovercard-type="user" data-hovercard-url="/users/Robert-M-Muench/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Robert-M-Muench"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/1826391?s=60&amp;v=4" width="30" height="30" alt="@Robert-M-Muench" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1368033" data-gid="DC_kwDOAWBuf84AFN_h" data-url="/golang/go/discussions/48287/comments/1368033" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="316a1de82ed1450286fb8416a5332cd95056822ba5ad0f3913eec405d60c75fd" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1368033-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1368033-list" aria-labelledby="tooltip-8012031b-a006-432d-a2ee-0a666455a22e" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-8012031b-a006-432d-a2ee-0a666455a22e" for="Comment-actions-1368033-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1368033-list" role="menu" aria-labelledby="Comment-actions-1368033-text"> <include-fragment src="/golang/go/discussions/48287/comments/1368033/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1368033" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1368033,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="884dc785dae01ef50e9482e9779024573503193bdf514be2a8187d9fcb93ddc1" data-hovercard-type="user" data-hovercard-url="/users/Robert-M-Muench/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Robert-M-Muench" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> Robert-M-Muench </a> <a href="#discussioncomment-1368033" id="discussioncomment-1368033-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-22T09:02:56Z" class="no-wrap">Sep 22, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1368033/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1368033" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">I am not certain if I understand your point.</p> <p dir="auto">When you have an import path <em>std-lib/xzy</em> which gets remapped to <em>std-lib/without-generics/xzy</em> or <em>std-lib/with-generics/xzy</em> depending on the go version expected, there is only one public path, that works for all.</p> <p dir="auto">If my module requires generics, the go.mod has a go version 1.18+ and can't be used by people that want to use an earlier go compiler.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1369939,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="9cfb4aa117f22acbd22af555b47cc62ccb5c42699630f26071d3941fae4b68e4" data-hovercard-type="user" data-hovercard-url="/users/jhenstridge/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/jhenstridge"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/12724165?s=60&amp;v=4" width="30" height="30" alt="@jhenstridge" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1369939" data-gid="DC_kwDOAWBuf84AFOdT" data-url="/golang/go/discussions/48287/comments/1369939" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="335f0e7c5bdf0a73fa0cc5ae456fbd526afcbd699533d89c40038f070a54c522" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1369939-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1369939-list" aria-labelledby="tooltip-2b1b4487-67f7-47df-bfb5-1bae426970f2" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-2b1b4487-67f7-47df-bfb5-1bae426970f2" for="Comment-actions-1369939-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1369939-list" role="menu" aria-labelledby="Comment-actions-1369939-text"> <include-fragment src="/golang/go/discussions/48287/comments/1369939/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1369939" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1369939,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="9cfb4aa117f22acbd22af555b47cc62ccb5c42699630f26071d3941fae4b68e4" data-hovercard-type="user" data-hovercard-url="/users/jhenstridge/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/jhenstridge" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> jhenstridge </a> <a href="#discussioncomment-1369939" id="discussioncomment-1369939-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-22T15:05:46Z" class="no-wrap">Sep 22, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1369939/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1369939" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">Let's say I've got a module written with Go &lt; 1.18, which includes code like:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import &quot;list&quot; func Foo() *list.List"><pre class="notranslate"><code class="notranslate">import "list" func Foo() *list.List </code></pre></div> <p dir="auto">Now imagine that I am writing a program using Go 1.18+, where <code class="notranslate">list.List</code> has been replaced with a generic type. If my program wants to call the <code class="notranslate">Foo</code> function from the above module, how would I refer to the function's return type? If there is any possibility for the two worlds of Go code to interoperate, at least one side will need to be import both versions of the standard library.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1503558,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="406f2606dcdbccb5884efdccc18472acff1917425f3bba621e5e817cf55637b7" data-hovercard-type="user" data-hovercard-url="/users/HALtheWise/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/HALtheWise"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/1697528?s=60&amp;v=4" width="30" height="30" alt="@HALtheWise" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1503558" data-gid="DC_kwDOAWBuf84AFvFG" data-url="/golang/go/discussions/48287/comments/1503558" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="0b9b5b37ee0dd0526eecbe8bbd51ecf573fc96d3a514c154887b499ea4373283" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1503558-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1503558-list" aria-labelledby="tooltip-e3efec4c-3115-4229-a760-ee901cce0262" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-e3efec4c-3115-4229-a760-ee901cce0262" for="Comment-actions-1503558-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1503558-list" role="menu" aria-labelledby="Comment-actions-1503558-text"> <include-fragment src="/golang/go/discussions/48287/comments/1503558/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1503558" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> <edit-history> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" aria-haspopup="true" aria-controls="discussion-edit-history-1503558-list" aria-expanded="false" id="discussion-edit-history-1503558-text" data-target="edit-history.menuTrigger" type="button" data-view-component="true" class="Button--invisible Button--small Button"> <span class="Button-content"> <span class="Button-label">edited</span> </span> <span class="Button-visual Button-trailingAction"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path> </svg> </span> </button> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="discussion-edit-history-1503558-list" role="menu" aria-labelledby="discussion-edit-history-1503558-text"> <include-fragment src="/golang/go/discussions/48287/comments/1503558/edits_log" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="edit-history.deletedDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> {{actor}} deleted this content <relative-time class="no-wrap" datetime="{{datetime}}"></relative-time>. </div> </scrollable-region> </dialog></dialog-helper> </template> <template data-target="edit-history.diffDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-large Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body p-0"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> </edit-history> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1503558,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="406f2606dcdbccb5884efdccc18472acff1917425f3bba621e5e817cf55637b7" data-hovercard-type="user" data-hovercard-url="/users/HALtheWise/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/HALtheWise" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> HALtheWise </a> <a href="#discussioncomment-1503558" id="discussioncomment-1503558-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-10-19T16:19:49Z" class="no-wrap">Oct 19, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1503558/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1503558" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <blockquote> <p dir="auto">If my program wants to call the Foo function from the above module, how would I refer to the function's return type?</p> </blockquote> <p dir="auto">I see basically two options here (and you are correct that we would want to implement one of them):</p> <ol dir="auto"> <li>The "old" and "new" list packages are explicitly importable with some path, either <code class="notranslate">"list/v1"</code> or <code class="notranslate">"pregeneric/list"</code> or something, and the go version just controls which of those <code class="notranslate">"list"</code> is an alias for. That way, just like with third-party packages, you can simply import both on one side of the boundary.</li> <li>We require that <em>every</em> symbol in the old package has an alias or identical symbol in the new package. In many cases (like <code class="notranslate">list.List</code>) that new symbol can simply be a specialization of a now-generic type or function (<code class="notranslate">list.List</code> -&gt; <code class="notranslate">list.List[interface{}]</code>), but it doesn't <em>need</em> to be if the new API doesn't map trivially to the old one. New code would see old functions return the equivalent new symbol. This has the added benefit that <em>all</em> users of the old library can be safely upgraded to the new one automatically with <em>go fix</em> or similar. This would probably be implemented by making an alias-only version of the old lists package API implemented in terms of the new lists package, just like if an open source package were trying to do the same thing. Unlike third-party code, we can hold the standard library to a higher standard of forward-compatability that the new symbols are <em>actually</em> indistinguishable from the old ones.</li> </ol> <p dir="auto">I personally prefer 2 because of the tooling advantages and because it makes it way easier for the go ecosystem to migrate quickly to the new APIs.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AFK11" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-1355125" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="6960af4f8729dd2f2f138cc504a9a4c0af54ebd2f9af31ba51d018494c224104" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1355125-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1355125-list" aria-labelledby="tooltip-25cb0ea4-55c5-42df-ba4f-ebc0077a0b83" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-25cb0ea4-55c5-42df-ba4f-ebc0077a0b83" for="Comment-actions-1355125-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1355125-list" role="menu" aria-labelledby="Comment-actions-1355125-text"> <include-fragment src="/golang/go/discussions/48287/comments/1355125/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1355125" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> <edit-history> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" aria-haspopup="true" aria-controls="discussion-edit-history-1355125-list" aria-expanded="false" id="discussion-edit-history-1355125-text" data-target="edit-history.menuTrigger" type="button" data-view-component="true" class="Button--invisible Button--small Button"> <span class="Button-content"> <span class="Button-label">edited</span> </span> <span class="Button-visual Button-trailingAction"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path> </svg> </span> </button> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="discussion-edit-history-1355125-list" role="menu" aria-labelledby="discussion-edit-history-1355125-text"> <include-fragment src="/golang/go/discussions/48287/comments/1355125/edits_log" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="edit-history.deletedDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> {{actor}} deleted this content <relative-time class="no-wrap" datetime="{{datetime}}"></relative-time>. </div> </scrollable-region> </dialog></dialog-helper> </template> <template data-target="edit-history.diffDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-large Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body p-0"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> </edit-history> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1355125,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="96a44e00667bc501c0476f7869325c3e8b94ef144f4e08c9100a5308ab5e7310" data-hovercard-type="user" data-hovercard-url="/users/matt0xFF/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/matt0xFF" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/5789155?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">matt0xFF</span> </div> </a> <a href="#discussioncomment-1355125" id="discussioncomment-1355125-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-20T01:41:13Z" class="no-wrap">Sep 20, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h3> </div> </div> <div class="color-bg-default border-bottom position-relative"> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1355125/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1355125" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto"><del>For generic math, type/function aliases would be better than default parameters.</del></p> <p dir="auto"><strong>Edit:</strong> As long as you can add parameters in an alias to a different name (<code class="notranslate">type mgl32.Vector3 = mgl.Vector3[float32]</code>), I think all of these cases would work with a combination that and default parameters - if default parameters are included, they don't require aliases to the same name.</p> <p dir="auto">For example the <a href="https://github.com/go-gl/mathgl">mathgl</a> packages include 3D math types used by OpenGL bindings / games etc. There are 32 and 64 bit versions of each type, <code class="notranslate">mgl32.Vec3</code>/<code class="notranslate">mgl64.Vec3</code>, <code class="notranslate">mgl32.Mat2x3</code>/<code class="notranslate">mgl64.Mat2x3</code>, etc. Type aliases would allow each package to point to (and be compatible with) common generic versions of each type, but a default parameter wouldn't work since each package needs a different one (same thing for the functions, although wrapper functions would also be fine if they can be optimized away).</p> <p dir="auto">If Go ever permits array size type parameters (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="807815974" data-permission-text="Title is private" data-url="https://github.com/golang/go/issues/44253" data-hovercard-type="issue" data-hovercard-url="/golang/go/issues/44253/hovercard" href="https://github.com/golang/go/issues/44253">#44253</a>), the type alias mechanism could also be used to aid migration in the same way (Vector3 could become an alias for Vector[3]).</p> <p dir="auto">Another example of math code (<a href="https://github.com/xlab/linmath/blob/master/mathf.go">mathf.go</a>) in the wild uses the f suffix (sinf, cosf) for 32 bit versions of math functions - type aliases would work there while default parameters wouldn't.</p> <p dir="auto">For those suggesting library authors break API compatibility, then all packages using those libraries re-writing to use the new API - I think we need to be realistic that this will not rapidly or completely happen. Many tasks currently work fine without generics (for example, 64-bit math code), so many applications and libraries would need to change a large number of files for zero or marginal benefits (changes that may include forking dependencies that are no longer actively maintained).</p> <p dir="auto">Even new code might continue to use "math" instead of "math/v2", if you are using 64-bit math, the former is shorter, and what's the difference?</p> <p dir="auto">I think the likely outcome is that users would need to be familiar with multiple ways to do the same thing (across many libraries) for the foreseeable future. Creating such a situation in the name of simplicity seems like a false economy.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 3" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-1355125" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>3</span> </button> <tool-tip id="tooltip-4fa68d7a-10ee-41c1-9b7a-13abe4f9e0f7" for="discussion-upvote-button-DiscussionComment-1355125" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-43296d" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>2</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>2</span> </li> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 12 replies </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker color-bg-inset border-top color-border-default mt-n1 rounded-bottom-2" data-child-comments id="child-comments-discussioncomment-1355125"> <div data-view-component="true" class="TimelineItem TimelineItem--condensed discussion-nested-comment-paging-form pt-0 ml-0"> <div style="background-color: transparent; left: 30px;" data-view-component="true" class="TimelineItem-badge discussion-nested-comment-paging-badge pb-3 mt-0 pt-4"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg></div> <div data-view-component="true" class="TimelineItem-body discussion-nested-comment-paging-form-body"> <!-- '"` --><!-- </textarea></xmp> --></option></form><form data-replace-remote-form-target="child-comments-discussioncomment-1355125" data-replace-remote-form="true" data-turbo="false" action="/golang/go/discussions/48287/comments/1355125/threads" accept-charset="UTF-8" method="get"> <input type="hidden" name="back_page" value="1"> <input type="hidden" name="forward_page" value="0"> <input type="hidden" name="anchor_id" value="1369614"> <button data-disable-with="Loading more replies..." type="submit" data-view-component="true" class="Button--link Button--medium Button mb-2 pl-2 pt-2"> <span class="Button-content"> <span class="Button-label">Show 7 previous replies</span> </span> </button> </form></div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1369614,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="0c38ebbdac609d9aba9152ddcec113ae3e5302e9a5f82c26cb5af41cb4424170" data-hovercard-type="user" data-hovercard-url="/users/wolverian/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/wolverian"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/42124?s=60&amp;v=4" width="30" height="30" alt="@wolverian" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1369614" data-gid="DC_kwDOAWBuf84AFOYO" data-url="/golang/go/discussions/48287/comments/1369614" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="4d3c12b8537f32411cd33b208ba2ba18b73a478f5bde3823296245116bbcf439" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1369614-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1369614-list" aria-labelledby="tooltip-198c2031-8fc2-4217-a773-601c1ae83ffb" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-198c2031-8fc2-4217-a773-601c1ae83ffb" for="Comment-actions-1369614-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1369614-list" role="menu" aria-labelledby="Comment-actions-1369614-text"> <include-fragment src="/golang/go/discussions/48287/comments/1369614/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1369614" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1369614,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="0c38ebbdac609d9aba9152ddcec113ae3e5302e9a5f82c26cb5af41cb4424170" data-hovercard-type="user" data-hovercard-url="/users/wolverian/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/wolverian" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> wolverian </a> <a href="#discussioncomment-1369614" id="discussioncomment-1369614-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-22T14:17:32Z" class="no-wrap">Sep 22, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1369614/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1369614" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">(Off-topic)</p> <blockquote> <p dir="auto">Because v1 would be implemented in terms of v2, so anything not reflected as an API change (like performance improvements and the like) you'd benefit from indefinitely, even if you use v1.</p> </blockquote> <p dir="auto">You're probably talking about the standard library here specifically, but I'm wondering how many projects in the Go ecosystem generally do this. Definitely my own vague understanding has been that people usually abandon old versions when they make breaking changes instead of re-implementing them in terms of the newer version. Some statistics about this would be super interesting!</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-51eb3b" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>1</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>1</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1369761,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="87ce0d21b3eca8d8141c5c00a8ed0ad8384a1ca0089b9f6a65ec410aff0d9ffa" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Merovius"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/720787?s=60&amp;v=4" width="30" height="30" alt="@Merovius" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1369761" data-gid="DC_kwDOAWBuf84AFOah" data-url="/golang/go/discussions/48287/comments/1369761" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="c6fbeab62983969f0916f9263d0f8096c30090eec391aeaf2a1d9fbf01037139" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1369761-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1369761-list" aria-labelledby="tooltip-8bcfcff1-ad1c-4243-832a-21272afdc4b7" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-8bcfcff1-ad1c-4243-832a-21272afdc4b7" for="Comment-actions-1369761-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1369761-list" role="menu" aria-labelledby="Comment-actions-1369761-text"> <include-fragment src="/golang/go/discussions/48287/comments/1369761/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1369761" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1369761,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="87ce0d21b3eca8d8141c5c00a8ed0ad8384a1ca0089b9f6a65ec410aff0d9ffa" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Merovius" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> Merovius </a> <a href="#discussioncomment-1369761" id="discussioncomment-1369761-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-22T14:39:16Z" class="no-wrap">Sep 22, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1369761/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1369761" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <blockquote> <p dir="auto">You're probably talking about the standard library here specifically</p> </blockquote> <p dir="auto">FWIW, I'm not. The explicit intention of this discussion is to create general guidance for how to do this. And the mechanisms we've developed over the last years are generally applicable. And I believe they are what should be our general guidance.</p> <p dir="auto">Whether that's actually followed is a fair question. But as far as I'm concerned, that's a question for the maintainers of the relevant modules. As so often in open source, it's up to them to what degree they want to support their users and it's up to you to decide if you want to trust a particular maintainer.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-6c1c8b" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>2</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>2</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1371953,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="54180b2b03f5295233365c15b6f6fe60baa723baa9273b406d210ab1468fda01" data-hovercard-type="user" data-hovercard-url="/users/matt0xFF/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/matt0xFF"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/5789155?s=60&amp;v=4" width="30" height="30" alt="@matt0xFF" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1371953" data-gid="DC_kwDOAWBuf84AFO8x" data-url="/golang/go/discussions/48287/comments/1371953" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="ccbff06f0ee46f83ac82c83f468fc11a49dfaa88142db3e67edfd47ef7486983" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1371953-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1371953-list" aria-labelledby="tooltip-3c4aea44-9296-4112-834d-7124e718711d" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-3c4aea44-9296-4112-834d-7124e718711d" for="Comment-actions-1371953-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1371953-list" role="menu" aria-labelledby="Comment-actions-1371953-text"> <include-fragment src="/golang/go/discussions/48287/comments/1371953/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1371953" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1371953,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="54180b2b03f5295233365c15b6f6fe60baa723baa9273b406d210ab1468fda01" data-hovercard-type="user" data-hovercard-url="/users/matt0xFF/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/matt0xFF" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> matt0xFF </a> <a href="#discussioncomment-1371953" id="discussioncomment-1371953-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-22T21:45:17Z" class="no-wrap">Sep 22, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1371953/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1371953" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Merovius">@Merovius</a></p> <blockquote> <p dir="auto">But if it's worth introducing a new language feature, it <em>definitely</em> is worth releasing a new package. Language features are <em>far</em> more costly than releasing new packages.</p> </blockquote> <p dir="auto">In order to understand your position better, can you elaborate on this (with respect to this particular feature)? I have some idea of the costs of breaking compatibility, and in addition, I think users having to remember to add <code class="notranslate">v2</code> to certain commonly-used packages like <code class="notranslate">math</code>, but not others, will forever add a (small) amount of cognitive overhead to learning and using Go.</p> <p dir="auto">However, I don't have as clear an idea of the costs of adding this particular language feature. For example, if there is some particular way users are likely to abuse it, or if there is reason to believe it will be an ongoing source of compiler bugs.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1372044,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="b01aa27f76fa1a1a385c80a1d87b328b56d775bb96d585bfc48b83e4d4c4648e" data-hovercard-type="user" data-hovercard-url="/users/lu4p/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/lu4p"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/46541492?s=60&amp;v=4" width="30" height="30" alt="@lu4p" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1372044" data-gid="DC_kwDOAWBuf84AFO-M" data-url="/golang/go/discussions/48287/comments/1372044" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="bfd91a5cc7696cef7d5d14ced6747c64543d020c0d108bd5cc1a8ea7ec2000ad" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1372044-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1372044-list" aria-labelledby="tooltip-97d91e7d-ea2a-46ac-8cbd-187fb7eaa081" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-97d91e7d-ea2a-46ac-8cbd-187fb7eaa081" for="Comment-actions-1372044-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1372044-list" role="menu" aria-labelledby="Comment-actions-1372044-text"> <include-fragment src="/golang/go/discussions/48287/comments/1372044/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1372044" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1372044,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="b01aa27f76fa1a1a385c80a1d87b328b56d775bb96d585bfc48b83e4d4c4648e" data-hovercard-type="user" data-hovercard-url="/users/lu4p/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/lu4p" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> lu4p </a> <a href="#discussioncomment-1372044" id="discussioncomment-1372044-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-22T22:21:23Z" class="no-wrap">Sep 22, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1372044/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1372044" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <blockquote> <p dir="auto">I have some idea of the costs of breaking compatibility, and in addition, I think users having to remember to add v2 to certain commonly-used packages like math, but not others, will forever add a (small) amount of cognitive overhead to learning and using Go.</p> </blockquote> <p dir="auto">It's perfectly valid to use the old version of the package, because v1 will be implemented using the v2 package. I expect most users to use gopls (via their editor), which should automatically add imports with the latest version.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1373305,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="4fd19bfd1d6043d448f1d77dd7e9212d4f2e83b0fea180cf5925897e711b6d35" data-hovercard-type="user" data-hovercard-url="/users/wolverian/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/wolverian"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/42124?s=60&amp;v=4" width="30" height="30" alt="@wolverian" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1373305" data-gid="DC_kwDOAWBuf84AFPR5" data-url="/golang/go/discussions/48287/comments/1373305" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="684d6c0f721a99a95437a1301411cdd98bc787718ee39186327361f086057092" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1373305-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1373305-list" aria-labelledby="tooltip-28e4a643-29b4-451c-a4dd-ab13e68f5f71" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-28e4a643-29b4-451c-a4dd-ab13e68f5f71" for="Comment-actions-1373305-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1373305-list" role="menu" aria-labelledby="Comment-actions-1373305-text"> <include-fragment src="/golang/go/discussions/48287/comments/1373305/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1373305" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1373305,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="4fd19bfd1d6043d448f1d77dd7e9212d4f2e83b0fea180cf5925897e711b6d35" data-hovercard-type="user" data-hovercard-url="/users/wolverian/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/wolverian" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> wolverian </a> <a href="#discussioncomment-1373305" id="discussioncomment-1373305-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-23T07:37:44Z" class="no-wrap">Sep 23, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1373305/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1373305" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <blockquote> <p dir="auto">The explicit intention of this discussion is to create general guidance for how to do this. And the mechanisms we've developed over the last years are generally applicable. And I believe they are what should be our general guidance.</p> </blockquote> <p dir="auto">Thank you, guidance on this topic is a good idea.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AFLXi" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-1357282" data-gid="DC_kwDOAWBuf84AFLXi" data-url="/golang/go/discussions/48287/comments/1357282" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="04b55a93f1a31f67a4c02e8e8e1ff5a210d013683e4273945c34cd4e4db27fc0" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1357282-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1357282-list" aria-labelledby="tooltip-29548850-3862-4598-bf41-8ffb5bf052e4" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-29548850-3862-4598-bf41-8ffb5bf052e4" for="Comment-actions-1357282-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1357282-list" role="menu" aria-labelledby="Comment-actions-1357282-text"> <include-fragment src="/golang/go/discussions/48287/comments/1357282/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1357282" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1357282,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="d1dbfbefcacc9e9de916dd132bc502ac7aa78042f6347c31f18a7c3a003b5f7c" data-hovercard-type="user" data-hovercard-url="/users/uluyol/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/uluyol" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/4128872?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">uluyol</span> </div> </a> <a href="#discussioncomment-1357282" id="discussioncomment-1357282-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-20T13:36:13Z" class="no-wrap">Sep 20, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h3> </div> </div> <div class="color-bg-default border-bottom position-relative"> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1357282/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1357282" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto">How about the following rule (inspired by Java) for types: if a type instantiation doesn't contain type parameters, then the type parameters default to the constraint types. For example:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="type [T interface{}] List struct {...} var p List[bytes.Buffer] // type-safe usage var p List // == List[interface{}], same as today"><pre class="notranslate"><code class="notranslate">type [T interface{}] List struct {...} var p List[bytes.Buffer] // type-safe usage var p List // == List[interface{}], same as today </code></pre></div> <p dir="auto">Pros:</p> <ul dir="auto"> <li>Works well for container types</li> <li>Most generic things in Go today seem to be containers, since writing generic functions is tricky</li> <li>No additional syntax</li> <li>Default rule is simple</li> </ul> <p dir="auto">Cons:</p> <ul dir="auto"> <li>Doesn't work for interfaces that can be used as constraints but not regular values (e.g. comparable)</li> <li>Doesn't work for making concrete functions generic</li> <li>Prevents future type inference on generic type literals (if we have <code class="notranslate">S[T]</code>, <code class="notranslate">S{...}</code> is defined to mean something with this rule)</li> </ul> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 4" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-1357282" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>4</span> </button> <tool-tip id="tooltip-0b5e150e-e5a8-45b2-ba53-b160cc123af7" for="discussion-upvote-button-DiscussionComment-1357282" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-43c243" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>6</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>6</span> </li> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 2 replies </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker color-bg-inset border-top color-border-default mt-n1 rounded-bottom-2" data-child-comments id="child-comments-discussioncomment-1357282"> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1357307,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="c04a87ca213dea0b60a7e8b598e58692c3120489659799fb3ceb904bc7296f2e" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Merovius"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/720787?s=60&amp;v=4" width="30" height="30" alt="@Merovius" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1357307" data-gid="DC_kwDOAWBuf84AFLX7" data-url="/golang/go/discussions/48287/comments/1357307" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="034b0e09019f07b7de5dafb603e7aab37486cc886c817d5365498ec5b00a1cc0" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1357307-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1357307-list" aria-labelledby="tooltip-5472dbac-b921-48ab-93d6-883afad47542" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-5472dbac-b921-48ab-93d6-883afad47542" for="Comment-actions-1357307-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1357307-list" role="menu" aria-labelledby="Comment-actions-1357307-text"> <include-fragment src="/golang/go/discussions/48287/comments/1357307/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1357307" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1357307,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="c04a87ca213dea0b60a7e8b598e58692c3120489659799fb3ceb904bc7296f2e" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Merovius" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> Merovius </a> <a href="#discussioncomment-1357307" id="discussioncomment-1357307-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-20T13:39:46Z" class="no-wrap">Sep 20, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1357307/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1357307" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <blockquote> <p dir="auto">Doesn't work for interfaces that can be used as constraints but not regular values (e.g. comparable)</p> </blockquote> <p dir="auto">That excludes 4 of the 7 examples in the top-post.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-769b01" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>3</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>3</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1359117,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="19acb565d83dbd1d92a86aced7f3655f085c944a63a9d55b1c8bf4d8b2714ebd" data-hovercard-type="user" data-hovercard-url="/users/AndrewHarrisSPU/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/AndrewHarrisSPU"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/44661351?s=60&amp;v=4" width="30" height="30" alt="@AndrewHarrisSPU" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1359117" data-gid="DC_kwDOAWBuf84AFL0N" data-url="/golang/go/discussions/48287/comments/1359117" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="544189e36743d7cadc655c36481e83883a85a404c1783a15687b9f1d53a8f617" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1359117-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1359117-list" aria-labelledby="tooltip-d876a831-4beb-4182-ae0b-d65b1ced2fea" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-d876a831-4beb-4182-ae0b-d65b1ced2fea" for="Comment-actions-1359117-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1359117-list" role="menu" aria-labelledby="Comment-actions-1359117-text"> <include-fragment src="/golang/go/discussions/48287/comments/1359117/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1359117" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> <edit-history> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" aria-haspopup="true" aria-controls="discussion-edit-history-1359117-list" aria-expanded="false" id="discussion-edit-history-1359117-text" data-target="edit-history.menuTrigger" type="button" data-view-component="true" class="Button--invisible Button--small Button"> <span class="Button-content"> <span class="Button-label">edited</span> </span> <span class="Button-visual Button-trailingAction"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path> </svg> </span> </button> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="discussion-edit-history-1359117-list" role="menu" aria-labelledby="discussion-edit-history-1359117-text"> <include-fragment src="/golang/go/discussions/48287/comments/1359117/edits_log" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="edit-history.deletedDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> {{actor}} deleted this content <relative-time class="no-wrap" datetime="{{datetime}}"></relative-time>. </div> </scrollable-region> </dialog></dialog-helper> </template> <template data-target="edit-history.diffDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-large Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body p-0"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> </edit-history> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1359117,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="19acb565d83dbd1d92a86aced7f3655f085c944a63a9d55b1c8bf4d8b2714ebd" data-hovercard-type="user" data-hovercard-url="/users/AndrewHarrisSPU/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/AndrewHarrisSPU" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> AndrewHarrisSPU </a> <a href="#discussioncomment-1359117" id="discussioncomment-1359117-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-20T19:37:10Z" class="no-wrap">Sep 20, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1359117/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1359117" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">Your cons list, and a good amount of discussion here and elsewhere, highlight that a constraint does not express everything a programmer might wish about the shape of the eventually unified type. They are sufficient for a lot of useful, common cases but I think it'd be worth examining the kinds of affordances that may be possible for less common cases.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AFM9N" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-1363789" data-gid="DC_kwDOAWBuf84AFM9N" data-url="/golang/go/discussions/48287/comments/1363789" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="7747164f58cbe70c19731f85162749c1de32c2ea323f56f982dedc4cdb1db9e5" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1363789-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1363789-list" aria-labelledby="tooltip-2f97feee-802e-4d07-bfed-883297dc2814" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-2f97feee-802e-4d07-bfed-883297dc2814" for="Comment-actions-1363789-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1363789-list" role="menu" aria-labelledby="Comment-actions-1363789-text"> <include-fragment src="/golang/go/discussions/48287/comments/1363789/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1363789" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1363789,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="d1a05bab649fab739a81e94dba603ef80998ec922b60eecc801edb7b724eb275" data-hovercard-type="user" data-hovercard-url="/users/earthboundkid/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/earthboundkid" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/222245?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">earthboundkid</span> </div> </a> <a href="#discussioncomment-1363789" id="discussioncomment-1363789-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-21T18:35:26Z" class="no-wrap">Sep 21, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h3> </div> </div> <div class="color-bg-default border-bottom position-relative"> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1363789/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1363789" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto">Metapoint: I don't think this issue worked very well with the GitHub discussions format. Discussions seem to work better when there is one big proposal with many small details to work out (e.g. there is going to be a slices package, what should go in it?), and then the discussions each burrow in on a detail (e.g., let's figure out a name for slices.Compact). At this point, this issue is still too up in the air (change generic type aliases? add v2 packages? something else?) to drill down on specifics, so each subdiscussion tends to repeat one or two of the main themes with minor variations in the specifics, which makes it very hard to follow.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 6" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-1363789" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>6</span> </button> <tool-tip id="tooltip-af16f63a-cfbe-4768-a018-071507531d4a" for="discussion-upvote-button-DiscussionComment-1363789" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-0a16d5" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>4</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>4</span> </li> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 1 reply </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker color-bg-inset border-top color-border-default mt-n1 rounded-bottom-2" data-child-comments id="child-comments-discussioncomment-1363789"> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1363808,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="e6935201644dc7f3146cb6c7f417c3a1bfa5aae7441c614b10400eded4db0672" data-hovercard-type="user" data-hovercard-url="/users/deanveloper/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/deanveloper"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/3196327?s=60&amp;v=4" width="30" height="30" alt="@deanveloper" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1363808" data-gid="DC_kwDOAWBuf84AFM9g" data-url="/golang/go/discussions/48287/comments/1363808" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="2005da9adb4e6e6f4286695692079b38108116511c61894781dc6cffab1b470e" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1363808-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1363808-list" aria-labelledby="tooltip-eac64413-ccdf-47d5-81ea-d6f2e017143f" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-eac64413-ccdf-47d5-81ea-d6f2e017143f" for="Comment-actions-1363808-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1363808-list" role="menu" aria-labelledby="Comment-actions-1363808-text"> <include-fragment src="/golang/go/discussions/48287/comments/1363808/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1363808" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1363808,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="e6935201644dc7f3146cb6c7f417c3a1bfa5aae7441c614b10400eded4db0672" data-hovercard-type="user" data-hovercard-url="/users/deanveloper/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/deanveloper" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> deanveloper </a> <a href="#discussioncomment-1363808" id="discussioncomment-1363808-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-21T18:40:59Z" class="no-wrap">Sep 21, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1363808/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1363808" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">This kind of discussion also doesn’t really fit Github issues either, that’d also be extremely messy.</p> <p dir="auto">I think threaded discussion with recursing sub-threads (a la Reddit) would be best for this kind of discussion.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-fb6fe3" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>3</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>3</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AFNqn" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-1366695" data-gid="DC_kwDOAWBuf84AFNqn" data-url="/golang/go/discussions/48287/comments/1366695" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="63ec3dc26da3a88af51c214ea98cc3f2495c69fc745d6195801cb754898adbfe" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1366695-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1366695-list" aria-labelledby="tooltip-b9a82826-57d3-45fa-920a-8406dc17c3bd" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-b9a82826-57d3-45fa-920a-8406dc17c3bd" for="Comment-actions-1366695-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1366695-list" role="menu" aria-labelledby="Comment-actions-1366695-text"> <include-fragment src="/golang/go/discussions/48287/comments/1366695/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1366695" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1366695,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="99594bf07bd4556363993fe7ed8ffee7068e6e07a909b3e078be1303d6a176c2" data-hovercard-type="user" data-hovercard-url="/users/suared/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/suared" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/8690791?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">suared</span> </div> </a> <a href="#discussioncomment-1366695" id="discussioncomment-1366695-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-22T01:02:52Z" class="no-wrap">Sep 22, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h3> </div> </div> <div class="color-bg-default border-bottom position-relative"> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1366695/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1366695" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto">I may be “under-thinking” the problem, it feels like too much work on the language to come up with what feels like a workaround. The use cases I can think of feel like they are handled with existing constructs. This is my use case summary, what am I missing?:<br> • User code upgrade to 1.18 from previous – their code is updated using go fix so that it is seamless (in the example of a current different return type the source code would be re-written at that point to cast to the pre 1.18 type so the rest of the program would function as originally intended).<br> • User wants to import a new package that has a go.mod of =&gt; 1.18 – the existing modules approach would error and tell them they need to upgrade to 1.18 to use the library. When they do, bullet 1 would take effect<br> What am I missing?</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 1" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-1366695" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>1</span> </button> <tool-tip id="tooltip-6961816f-b5b0-4cfd-926b-71e7a116aab7" for="discussion-upvote-button-DiscussionComment-1366695" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-0a6e32" value="THUMBS_DOWN react" data-button-index-position="1" data-reaction-label="-1" data-reaction-content="-1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>1</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="-1"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>1</span> </li> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 2 replies </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker color-bg-inset border-top color-border-default mt-n1 rounded-bottom-2" data-child-comments id="child-comments-discussioncomment-1366695"> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1366769,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="a22f14884d6557e5721cc8f9833b2425de9ee5df6403e4e1159bed2e3c3fb6b0" data-hovercard-type="user" data-hovercard-url="/users/earthboundkid/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/earthboundkid"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/222245?s=60&amp;v=4" width="30" height="30" alt="@earthboundkid" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1366769" data-gid="DC_kwDOAWBuf84AFNrx" data-url="/golang/go/discussions/48287/comments/1366769" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="5455f974b2efe66fc989c75ce652853d41b5a8fb701056a7d29470a529be66f8" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1366769-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1366769-list" aria-labelledby="tooltip-7a175a32-c383-4ea6-8a42-cb6663a9c13d" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-7a175a32-c383-4ea6-8a42-cb6663a9c13d" for="Comment-actions-1366769-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1366769-list" role="menu" aria-labelledby="Comment-actions-1366769-text"> <include-fragment src="/golang/go/discussions/48287/comments/1366769/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1366769" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1366769,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="a22f14884d6557e5721cc8f9833b2425de9ee5df6403e4e1159bed2e3c3fb6b0" data-hovercard-type="user" data-hovercard-url="/users/earthboundkid/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/earthboundkid" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> earthboundkid </a> <a href="#discussioncomment-1366769" id="discussioncomment-1366769-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-22T01:34:42Z" class="no-wrap">Sep 22, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1366769/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1366769" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">A lot of people need to support multiple versions of Go simultaneously. See <a href="https://github.com/golang/proposal/blob/master/design/28221-go2-transitions.md">the Go2 transition doc</a> for specific criticisms of "the Python 3 problem" we want to avoid,</p> <blockquote> <p dir="auto">because there is no backward compatibility, it is impossible to mix Python 2 and Python 3 code in the same program. This means that for a typical program that uses a range of libraries, each of those libraries must be converted to Python 3 before the program can be converted. Since programs are in various states of conversion, libraries must support Python 2 and 3 simultaneously.</p> </blockquote> <p dir="auto">Because simultaneous support for 2 &amp; 3 wasn't possible at the start, the Python 3 transition dragged on for a decade…</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-0bb8e6" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>3</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>3</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1369657,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="abd23078941f9b4d1f7b4d7a7a2714491791fd3d28fb6bc1fabf77ed84f4eedc" data-hovercard-type="user" data-hovercard-url="/users/suared/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/suared"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/8690791?s=60&amp;v=4" width="30" height="30" alt="@suared" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1369657" data-gid="DC_kwDOAWBuf84AFOY5" data-url="/golang/go/discussions/48287/comments/1369657" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="18f165fa0ee89c09e7762b9f0d31c99fc916cfb58edab657fd0a59fd5bb6514b" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1369657-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1369657-list" aria-labelledby="tooltip-463961f7-9a03-4e1f-9e1b-5783585c3e68" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-463961f7-9a03-4e1f-9e1b-5783585c3e68" for="Comment-actions-1369657-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1369657-list" role="menu" aria-labelledby="Comment-actions-1369657-text"> <include-fragment src="/golang/go/discussions/48287/comments/1369657/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1369657" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1369657,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="abd23078941f9b4d1f7b4d7a7a2714491791fd3d28fb6bc1fabf77ed84f4eedc" data-hovercard-type="user" data-hovercard-url="/users/suared/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/suared" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> suared </a> <a href="#discussioncomment-1369657" id="discussioncomment-1369657-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-22T14:22:28Z" class="no-wrap">Sep 22, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1369657/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1369657" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">Thanks for the reference, it was a great read! re: Python 3 issue and potential solution to this thread seems to be already in the article referenced. It may just be a matter of agreeing how to characterize some of the changes to follow the articles advice. In my mind, the 3rd use case that I now see is:</p> <ul dir="auto"> <li>User chooses to update their own code but relies on packages with earlier version dependencies - In the article the suggestion is to use the version to enable the compiler to compile it correctly. This is possible because of modules if it can be assumed to be reasonable to expect all "legacy" packages to now minimally support modules. The &lt;1.18 in go.mod of pulled in packages would enable the compiler to use the "old" behavior.</li> </ul> <p dir="auto">Are there any other missing use cases? As a language user, my bias would be to keep things simple so the language has clear expectations. Having that hidden or forced into action by requiring something like a go fix to be run potentially even on pulled in packages would be preferable in my view. What I think makes Go unique vs a java or other in its ability to do this is that other than plugin there is no real "binary" interface that I am aware as in java's jar, etc. The source is available to be recompiled and must be even for plugin so I would favor whatever is simplest as a user so the don't need to navigate multiple versions of core library seemingly equivalent documentation. Just my .02. Very interesting problem, thanks for the insights!</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AFNwC" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-1367042" data-gid="DC_kwDOAWBuf84AFNwC" data-url="/golang/go/discussions/48287/comments/1367042" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="5a44038154012f880f108e365f35f63f00d8792476d8970fa25d0e2f6b284af4" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1367042-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1367042-list" aria-labelledby="tooltip-ed0dc360-8ddb-4b33-a72f-7616011e7018" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-ed0dc360-8ddb-4b33-a72f-7616011e7018" for="Comment-actions-1367042-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1367042-list" role="menu" aria-labelledby="Comment-actions-1367042-text"> <include-fragment src="/golang/go/discussions/48287/comments/1367042/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1367042" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1367042,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="5cc409ff6983809d008806b7295b2d6bb19e778f21d7f371ea72412a2a30afc4" data-hovercard-type="user" data-hovercard-url="/users/Tang-RoseChild/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Tang-RoseChild" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/5513188?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">Tang-RoseChild</span> </div> </a> <a href="#discussioncomment-1367042" id="discussioncomment-1367042-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-22T03:49:59Z" class="no-wrap">Sep 22, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h3> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1367042/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1367042" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto">how about suffix 'X'?</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 1" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-1367042" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>1</span> </button> <tool-tip id="tooltip-3e1a4cb5-1a24-4d20-9894-f05bc1e3cef3" for="discussion-upvote-button-DiscussionComment-1367042" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-940966" value="THUMBS_DOWN react" data-button-index-position="1" data-reaction-label="-1" data-reaction-content="-1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>2</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="-1"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>2</span> </li> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 0 replies </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker" data-child-comments id="child-comments-discussioncomment-1367042"> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AFSpa" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-1387098" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="b66b3a2873bf761da926bebe3ce9f57eb932514cad04a293c88f487ae00af7d0" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1387098-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1387098-list" aria-labelledby="tooltip-bd63a526-2cef-496d-afad-aab33508f365" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-bd63a526-2cef-496d-afad-aab33508f365" for="Comment-actions-1387098-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1387098-list" role="menu" aria-labelledby="Comment-actions-1387098-text"> <include-fragment src="/golang/go/discussions/48287/comments/1387098/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1387098" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1387098,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="f0a88171b5cf348dfdc0f3bf54b7f3c946ec31f5e9107ac3ab3eba823cc25911" data-hovercard-type="user" data-hovercard-url="/users/HALtheWise/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/HALtheWise" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/1697528?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">HALtheWise</span> </div> </a> <a href="#discussioncomment-1387098" id="discussioncomment-1387098-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-26T18:57:46Z" class="no-wrap">Sep 26, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h3> </div> </div> <div class="color-bg-default border-bottom position-relative"> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1387098/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1387098" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto">At the risk of adding one more proposal to this already lengthy discussion:</p> <ol dir="auto"> <li>Create <code class="notranslate">"math/v2"</code> with the new APIs under obvious names (<code class="notranslate">func Min[T numeric](...)</code>) and (where necessary) the old APIs under ungainly names but marked as deprecated.</li> <li>Create <code class="notranslate">"math/v1"</code> that consists of aliases and thin wrappers around <code class="notranslate">"math/v2"</code> types and functions, and exposes a consistent API with the current <code class="notranslate">"math"</code> package.</li> <li>In Go tooling, resolve <code class="notranslate">import "math"</code> to <em>either</em> <code class="notranslate">"math/v1"</code> or <code class="notranslate">"math/v2"</code> depending on the go language version in <code class="notranslate">go.mod</code>. Explicitly specifying is always allowed.</li> <li><code class="notranslate">go fix</code> (or a similar command) should bump the go version in your <code class="notranslate">go.mod</code> <em>and</em> modify the import paths and/or usages in your source code so there is no behavior change. At it's simplest, that means replacing all <code class="notranslate">"math"</code> imports with <code class="notranslate">"math/v1"</code>, but a smarter migration tool could instead replace references with their new names <code class="notranslate">Min -&gt; MinFloat64</code>, with generics-aware specializations <code class="notranslate">Min -&gt; Min[float64]</code>, or even use type information to notice when inference rules would do the right thing anyway <code class="notranslate">Min -&gt; Min</code></li> </ol> <p dir="auto">This approach is intended to keep the standard library as similar as possible to what public packages need to do, and step 3 is the only new piece <em>required</em> for this to work.</p> <p dir="auto">The warts of this approach are <em>also</em> warts any open-source library author will face, and the (optional) additional changes below will help with community migrations as well. Each of these would need to go through its own proposal process.</p> <ul dir="auto"> <li>Language change: Allow function aliases similar to type aliases. Let <code class="notranslate">"math/v1"</code> declare <code class="notranslate">func Min = math.Min[float64]</code> instead of needing to make a wrapper function. This also avoids performance concerns with the wrapper, and improves consistency between <code class="notranslate">func</code>, <code class="notranslate">type</code>, and <code class="notranslate">const</code>, simplifying the language.</li> <li>Make godoc propagate documentation from aliased-to types and funcs, either automatically or with a special directive in the comment. This prevents needing to maintain both the old and the new doc comments in many cases.</li> <li>Make <code class="notranslate">go fix</code> automatically upgrade <em>any</em> dependency to a higher version whenever all referenced symbols in the old version are simply aliases to symbols in a higher version.</li> <li>Release a script that helps package authors make v1 "alias packages"</li> </ul> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 1" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-1387098" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>1</span> </button> <tool-tip id="tooltip-bf7bfeb8-f95e-4f9c-9793-80d29e4b797e" for="discussion-upvote-button-DiscussionComment-1387098" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-52b575" value="THUMBS_DOWN react" data-button-index-position="1" data-reaction-label="-1" data-reaction-content="-1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>1</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="-1"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>1</span> </li> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 8 replies </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker color-bg-inset border-top color-border-default mt-n1 rounded-bottom-2" data-child-comments id="child-comments-discussioncomment-1387098"> <div data-view-component="true" class="TimelineItem TimelineItem--condensed discussion-nested-comment-paging-form pt-0 ml-0"> <div style="background-color: transparent; left: 30px;" data-view-component="true" class="TimelineItem-badge discussion-nested-comment-paging-badge pb-3 mt-0 pt-4"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg></div> <div data-view-component="true" class="TimelineItem-body discussion-nested-comment-paging-form-body"> <!-- '"` --><!-- </textarea></xmp> --></option></form><form data-replace-remote-form-target="child-comments-discussioncomment-1387098" data-replace-remote-form="true" data-turbo="false" action="/golang/go/discussions/48287/comments/1387098/threads" accept-charset="UTF-8" method="get"> <input type="hidden" name="back_page" value="1"> <input type="hidden" name="forward_page" value="0"> <input type="hidden" name="anchor_id" value="1387500"> <button data-disable-with="Loading more replies..." type="submit" data-view-component="true" class="Button--link Button--medium Button mb-2 pl-2 pt-2"> <span class="Button-content"> <span class="Button-label">Show 3 previous replies</span> </span> </button> </form></div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1387500,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="82161968ec8ec0cb897bbec4ef8bc484fe7d5c512a97e908ef1d27c833a89d22" data-hovercard-type="user" data-hovercard-url="/users/hherman1/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/hherman1"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/611822?s=60&amp;v=4" width="30" height="30" alt="@hherman1" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1387500" data-gid="DC_kwDOAWBuf84AFSvs" data-url="/golang/go/discussions/48287/comments/1387500" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="181445bc4cf7c552a37df031bef8af7c6e8043f1bb9eff87b53c59d11d3eb48a" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1387500-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1387500-list" aria-labelledby="tooltip-6d4db389-5e5d-49fd-83ee-7158a8cf41d4" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-6d4db389-5e5d-49fd-83ee-7158a8cf41d4" for="Comment-actions-1387500-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1387500-list" role="menu" aria-labelledby="Comment-actions-1387500-text"> <include-fragment src="/golang/go/discussions/48287/comments/1387500/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1387500" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1387500,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="82161968ec8ec0cb897bbec4ef8bc484fe7d5c512a97e908ef1d27c833a89d22" data-hovercard-type="user" data-hovercard-url="/users/hherman1/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/hherman1" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> hherman1 </a> <a href="#discussioncomment-1387500" id="discussioncomment-1387500-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-26T22:59:09Z" class="no-wrap">Sep 26, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1387500/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1387500" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">Feels a bit magical for “math” to be special. Do we really want devs to have to learn this or think about it?</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-f57758" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>1</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>1</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1387679,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="bae75815275758bbe91823e2611e059c500b8431a67776e098bab9d770df2ca4" data-hovercard-type="user" data-hovercard-url="/users/ncruces/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/ncruces"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/5637550?s=60&amp;v=4" width="30" height="30" alt="@ncruces" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1387679" data-gid="DC_kwDOAWBuf84AFSyf" data-url="/golang/go/discussions/48287/comments/1387679" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="261ab64829d7a373ef7ea8c6c8e5c87fc73117d41a754cd67bf7611854f2c680" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1387679-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1387679-list" aria-labelledby="tooltip-8dcbdf59-c1c9-4336-9c8b-03a7857f7751" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-8dcbdf59-c1c9-4336-9c8b-03a7857f7751" for="Comment-actions-1387679-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1387679-list" role="menu" aria-labelledby="Comment-actions-1387679-text"> <include-fragment src="/golang/go/discussions/48287/comments/1387679/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1387679" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1387679,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="bae75815275758bbe91823e2611e059c500b8431a67776e098bab9d770df2ca4" data-hovercard-type="user" data-hovercard-url="/users/ncruces/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/ncruces" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> ncruces </a> <a href="#discussioncomment-1387679" id="discussioncomment-1387679-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-27T00:26:55Z" class="no-wrap">Sep 27, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1387679/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1387679" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">While I agree that functions aliases have been unnecessary so far (function identity is not particularly relevant, one line wrappers work), <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ianlancetaylor/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ianlancetaylor">@ianlancetaylor</a>'s proposal is different.</p> <p dir="auto">This proposal is not about redirecting users to new packages. For this, the current type aliases plus function wrappers would be sufficient.</p> <p dir="auto">This proposal, AFAICS is about overloading names within the same package, which has as been noted, is novel in Go. And if we are to overload names, I think aliasing is definitely clearer than wrapping.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1387711,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="f30b44d45acbb54ef1931018665336f9d2760769396aaf3df518045de21b3197" data-hovercard-type="user" data-hovercard-url="/users/HALtheWise/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/HALtheWise"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/1697528?s=60&amp;v=4" width="30" height="30" alt="@HALtheWise" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1387711" data-gid="DC_kwDOAWBuf84AFSy_" data-url="/golang/go/discussions/48287/comments/1387711" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="72382eb928527ce7a56752d4a7172a9776e9010d6d99f42030b6c7d018653d3f" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1387711-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1387711-list" aria-labelledby="tooltip-658ef1de-d405-49f9-b084-1554271805e4" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-658ef1de-d405-49f9-b084-1554271805e4" for="Comment-actions-1387711-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1387711-list" role="menu" aria-labelledby="Comment-actions-1387711-text"> <include-fragment src="/golang/go/discussions/48287/comments/1387711/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1387711" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1387711,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="f30b44d45acbb54ef1931018665336f9d2760769396aaf3df518045de21b3197" data-hovercard-type="user" data-hovercard-url="/users/HALtheWise/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/HALtheWise" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> HALtheWise </a> <a href="#discussioncomment-1387711" id="discussioncomment-1387711-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-27T00:58:36Z" class="no-wrap">Sep 27, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1387711/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1387711" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">I was using math as an example, the intent would be that all standard library packages would use this process, where new major versions can become the default in a new go release.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1387723,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="66bd4c9fe73060398e8d097e30f83aaa1f38997470bfeeecf80a8060f8fc8734" data-hovercard-type="user" data-hovercard-url="/users/ChrisHines/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/ChrisHines"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/1060711?s=60&amp;v=4" width="30" height="30" alt="@ChrisHines" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1387723" data-gid="DC_kwDOAWBuf84AFSzL" data-url="/golang/go/discussions/48287/comments/1387723" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="f1e3da615a93f00988cb4774b55b16cbbbf9bd46ad1311c04d140183d6def427" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1387723-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1387723-list" aria-labelledby="tooltip-7613973c-3e5d-4f19-8119-f56310b4d2e1" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-7613973c-3e5d-4f19-8119-f56310b4d2e1" for="Comment-actions-1387723-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1387723-list" role="menu" aria-labelledby="Comment-actions-1387723-text"> <include-fragment src="/golang/go/discussions/48287/comments/1387723/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1387723" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1387723,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="66bd4c9fe73060398e8d097e30f83aaa1f38997470bfeeecf80a8060f8fc8734" data-hovercard-type="user" data-hovercard-url="/users/ChrisHines/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/ChrisHines" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> ChrisHines </a> <a href="#discussioncomment-1387723" id="discussioncomment-1387723-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-27T01:07:22Z" class="no-wrap">Sep 27, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1387723/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1387723" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">As far as I know, forwarding functions shouldn't create a performance penalty. Since <a href="https://golang.org/doc/go1.12#compiler" rel="nofollow">Go 1.12 functions that do nothing but call another function are inlined</a>.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-958336" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>4</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>4</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1388941,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="c4893fed6f30e3b5ec9fea73e88512aa1975d845c88ba96c251c2d3be75c97c7" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Merovius"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/720787?s=60&amp;v=4" width="30" height="30" alt="@Merovius" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1388941" data-gid="DC_kwDOAWBuf84AFTGN" data-url="/golang/go/discussions/48287/comments/1388941" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="fe106f720be2c81b2e3dc0da3d65df5c8cc1d72f1bf4022cca0b4d85433eb86a" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1388941-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1388941-list" aria-labelledby="tooltip-c68bbac4-3545-42d9-80a8-ce49a5b6ec26" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-c68bbac4-3545-42d9-80a8-ce49a5b6ec26" for="Comment-actions-1388941-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1388941-list" role="menu" aria-labelledby="Comment-actions-1388941-text"> <include-fragment src="/golang/go/discussions/48287/comments/1388941/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1388941" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1388941,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="c4893fed6f30e3b5ec9fea73e88512aa1975d845c88ba96c251c2d3be75c97c7" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Merovius" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> Merovius </a> <a href="#discussioncomment-1388941" id="discussioncomment-1388941-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-09-27T08:10:37Z" class="no-wrap">Sep 27, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1388941/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1388941" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ncruces/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ncruces">@ncruces</a> This thread is not about <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ianlancetaylor/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ianlancetaylor">@ianlancetaylor</a>'s suggestion. It's about <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/HALtheWise/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/HALtheWise">@HALtheWise</a>'s suggestion. Which <em>would</em> be a case of redirecting to new packages.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-2a8b03" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>1</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>1</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AGhq6" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-1710778" data-gid="DC_kwDOAWBuf84AGhq6" data-url="/golang/go/discussions/48287/comments/1710778" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="88c112b2fcdefac39b0562b7d802e9f8d5c73bd6581ce3c10c6d9b7ae6d19c60" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1710778-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1710778-list" aria-labelledby="tooltip-08e47e23-fd9e-480f-8173-6bb33cb54481" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-08e47e23-fd9e-480f-8173-6bb33cb54481" for="Comment-actions-1710778-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1710778-list" role="menu" aria-labelledby="Comment-actions-1710778-text"> <include-fragment src="/golang/go/discussions/48287/comments/1710778/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1710778" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1710778,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="070c71f42a5bee46235d9529121b7d09b26c35afd644c8d37c8a2b210653333a" data-hovercard-type="user" data-hovercard-url="/users/jsshapiro/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/jsshapiro" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/18054538?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">jsshapiro</span> </div> </a> <a href="#discussioncomment-1710778" id="discussioncomment-1710778-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-11-28T05:12:11Z" class="no-wrap">Nov 28, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h3> </div> </div> <div class="color-bg-default border-bottom position-relative"> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1710778/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1710778" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto">I suspect it is far too late to introduce this comment, but it may be useful to record it for later when we look back at this.</p> <p dir="auto">Long and short: the reason we are talking about default types here is that we aren't doing type inference. In languages where type inference is adopted, none of the issues being raised here exist because the type parameters are auto-populated by inference.</p> <p dir="auto">This can definitely be done in a go-like language, as we showed in BitC. I definitely wouldn't adopt everything we tried - if only because the result wouldn't be go. But the heart of the problem here is that type variables are getting instantiated explicitly.</p> <p dir="auto">Circling back to an early example in this thread:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var f float64 Min(f, 5) // is Min[float64] Min(3, 5) // is Min[int]"><pre class="notranslate"><code class="notranslate">var f float64 Min(f, 5) // is Min[float64] Min(3, 5) // is Min[int] </code></pre></div> <p dir="auto">It appears to me that this is a type error, because the first invocation of <code class="notranslate">Min</code> has incompatible argument types. I'm new to go, so I may not be understanding the arithmetic promotions correctly, but I <em>think</em> there is no implicit promotion in this case, so the example would need to be written as:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var f float64 Min(f, float64(5))"><pre class="notranslate"><code class="notranslate">var f float64 Min(f, float64(5)) </code></pre></div> <p dir="auto">If the promotion is required to be explicit, there is neither ambiguity (to the compiler) nor surprise (to the user).</p> <p dir="auto">We went to significant lengths in BitC to use type classes to arrange for this type of implicit promotion on binary operators. At the time, I was pushing the type classes idea to see what kinds of things could be expressed with them. We ended up with something similar to go's untyped constants, but we got there using type classes. The problem, ultimately, is that type class constraints accumulate in much the way that explicitly declared exception types accumulate: incomprehensibly.</p> <p dir="auto">Jonathan Shapiro (the BitC architect).</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 2" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-1710778" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>2</span> </button> <tool-tip id="tooltip-2a4314e1-e6e0-4ff3-aae1-13c256b65f24" for="discussion-upvote-button-DiscussionComment-1710778" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 4 replies </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker color-bg-inset border-top color-border-default mt-n1 rounded-bottom-2" data-child-comments id="child-comments-discussioncomment-1710778"> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1710798,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="da983e5d5109c276838876cf1f0e75a730b23ba4fdeb30b2e234f8f40da01fbe" data-hovercard-type="user" data-hovercard-url="/users/zephyrtronium/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/zephyrtronium"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/1428115?s=60&amp;v=4" width="30" height="30" alt="@zephyrtronium" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1710798" data-gid="DC_kwDOAWBuf84AGhrO" data-url="/golang/go/discussions/48287/comments/1710798" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="e13947bffd6c769b994b50c89c5576ca0481320f8326f393b7a30bfa093bf03a" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1710798-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1710798-list" aria-labelledby="tooltip-0257beb5-180c-4c79-9860-c3eebd0e98ad" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-0257beb5-180c-4c79-9860-c3eebd0e98ad" for="Comment-actions-1710798-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1710798-list" role="menu" aria-labelledby="Comment-actions-1710798-text"> <include-fragment src="/golang/go/discussions/48287/comments/1710798/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1710798" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1710798,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="da983e5d5109c276838876cf1f0e75a730b23ba4fdeb30b2e234f8f40da01fbe" data-hovercard-type="user" data-hovercard-url="/users/zephyrtronium/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/zephyrtronium" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> zephyrtronium </a> <a href="#discussioncomment-1710798" id="discussioncomment-1710798-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-11-28T05:41:21Z" class="no-wrap">Nov 28, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1710798/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1710798" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <blockquote> <p dir="auto">Long and short: the reason we are talking about default types here is that we aren't doing type inference. In languages where type inference is adopted, none of the issues being raised here exist because the type parameters are auto-populated by inference.</p> </blockquote> <p dir="auto">I think we are talking about default types because <a href="https://go.googlesource.com/proposal/+/refs/heads/master/design/43651-type-parameters.md#type-inference" rel="nofollow">we <em>are</em> doing type inference</a> and the result of that inference isn't always what we need for backward compatibility.</p> <blockquote> <p dir="auto">Circling back to an early example in this thread:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var f float64 Min(f, 5) // is Min[float64] Min(3, 5) // is Min[int]"><pre class="notranslate"><code class="notranslate">var f float64 Min(f, 5) // is Min[float64] Min(3, 5) // is Min[int] </code></pre></div> <p dir="auto">It appears to me that this is a type error, because the first invocation of <code class="notranslate">Min</code> has incompatible argument types. I'm new to go, so I may not be understanding the arithmetic promotions correctly, but I <em>think</em> there is no implicit promotion in this case,</p> </blockquote> <p dir="auto">There is. (Although I don't think "promotion" is really the correct term.) <code class="notranslate">5</code> is a float64 with <code class="notranslate">Min(f, 5)</code> because the constant is representable as float64 and that is the only type that can be assigned to the second parameter given unification with the type of the first, but it is an int with <code class="notranslate">Min(3, 5)</code> because the context doesn't require it to be any particular type and int is its default as an integer constant.</p> <blockquote> <p dir="auto">so the example would need to be written as:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var f float64 Min(f, float64(5))"><pre class="notranslate"><code class="notranslate">var f float64 Min(f, float64(5)) </code></pre></div> <p dir="auto">If the promotion is required to be explicit, there is neither ambiguity (to the compiler) nor surprise (to the user).</p> </blockquote> <p dir="auto">If the promotion is required to be explicit, then we need a different definition, because that would be a breaking change.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-e65729" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>4</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>4</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1713288,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="5ac3f3a18f6c713e6e04e4695c9bf657ff791b238e860d0120540df8720e719a" data-hovercard-type="user" data-hovercard-url="/users/jsshapiro/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/jsshapiro"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/18054538?s=60&amp;v=4" width="30" height="30" alt="@jsshapiro" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1713288" data-gid="DC_kwDOAWBuf84AGiSI" data-url="/golang/go/discussions/48287/comments/1713288" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="0c1f25fd45eccd550178b6738c148f8b8d34f1bd907b35976c64c4420cb0869b" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1713288-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1713288-list" aria-labelledby="tooltip-bc2fa8f3-badc-47b1-952c-ec912ff01a23" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-bc2fa8f3-badc-47b1-952c-ec912ff01a23" for="Comment-actions-1713288-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1713288-list" role="menu" aria-labelledby="Comment-actions-1713288-text"> <include-fragment src="/golang/go/discussions/48287/comments/1713288/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1713288" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1713288,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="5ac3f3a18f6c713e6e04e4695c9bf657ff791b238e860d0120540df8720e719a" data-hovercard-type="user" data-hovercard-url="/users/jsshapiro/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/jsshapiro" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> jsshapiro </a> <a href="#discussioncomment-1713288" id="discussioncomment-1713288-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-11-29T01:46:54Z" class="no-wrap">Nov 29, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1713288/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1713288" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/zephyrtronium/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zephyrtronium">@zephyrtronium</a></p> <p dir="auto">I'm cautious about driving this discussion off topic, but...</p> <p dir="auto">I mis-read the language specification about untyped constants in Go. As a result, I misunderstood the contexts in which they can appear. So my statement about explicit promotion is wrong.</p> <p dir="auto">At the risk of being pedantic, in both BitC and Go, "5" is a constant having a type <em>'T</em> that can be looked at in one of two ways:</p> <ul dir="auto"> <li><em>'T</em> inhabits a <em>kind</em> <code class="notranslate">UntypedInt</code> that might be described as "one of the types in the set of things that can represent 5" (this appears to me to be the Go view), <em>or</em></li> <li><em>'T</em> satisfies the type class <code class="notranslate">UntypedInt 'T</code></li> </ul> <p dir="auto">The difference between the two isn't so obvious for single variable type classes, except to note that <em>instances</em> of type classes can be explicitly defined (I'll come back to this). In either framing, ambiguity arises if nothing forces <em>'T</em> to specialize to a concrete type. Some form of resolution rule is then required, at which point you no longer have complete inference. Having said that, "sound" is mandatory while "complete" is merely very nice to have, and in this instance it's probably fine to have a tie breaker. Both BitC and Go have such a resolution rule.</p> <p dir="auto">Regarding backwards compatibility, I'm surprised that inference isn't generating backwards compatible outcomes. In particular, the Min(3,5) example resolving to float64 strikes me as resulting from a flaw in Go's original definition of the UntypedInt kind: it shouldn't have included floating point types. BitC's version of UntypedInt does <em>not</em> include any float types, so we didn't run into the corresponding incompatibilities.</p> <p dir="auto">A cautionary note for the future:</p> <p dir="auto">In later evolutions of BitC, we introduced literal kinds. One of the things we explored was using them for fixed precision integer width promotion. At that point we would have typed the constant 3 as:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="3: SignedInt 'T 3 =&gt; 'T"><pre class="notranslate"><code class="notranslate">3: SignedInt 'T 3 =&gt; 'T </code></pre></div> <p dir="auto">meaning "A signed fixed precision integer type having at least three bits." Because that's the least size required to represent "3".</p> <p dir="auto">So If we saw Min(3, 7), we would end up with an initial (partial) specialization:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Min: Orderable 'T, SignedInt 'T 3, SignedInt 'T 4 =&gt; 'T -&gt; 'T -&gt; 'T"><pre class="notranslate"><code class="notranslate">Min: Orderable 'T, SignedInt 'T 3, SignedInt 'T 4 =&gt; 'T -&gt; 'T -&gt; 'T </code></pre></div> <p dir="auto">which simplifies to:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Min: SignedInt 'T 4 =&gt; 'T -&gt; 'T -&gt; 'T"><pre class="notranslate"><code class="notranslate">Min: SignedInt 'T 4 =&gt; 'T -&gt; 'T -&gt; 'T </code></pre></div> <p dir="auto">But the concrete type of <em>'T</em> would remain ambiguous pending further resolution by unification or constraint. If <em>'T</em> remained ambiguous at the end of type resolution, it was resolved using the <em>ad hoc</em> resolution rule, which (in BitC) can informally be stated as "the smallest natural signed int type that satisfies the surviving constraints." Type classes allowed BitC to support implicit integer and floating point <em>size</em> promotion. It also gave us a way to deal with binary operators that promote mixed arguments implicitly:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Add: Promotable 'T1 'T2 'TResult =&gt; 'T1 -&gt; 'T2 -&gt; 'TResult"><pre class="notranslate"><code class="notranslate">Add: Promotable 'T1 'T2 'TResult =&gt; 'T1 -&gt; 'T2 -&gt; 'TResult </code></pre></div> <p dir="auto">and we defined <code class="notranslate">Promotable</code> at all of the usual combinations of types that are familiar from C.</p> <p dir="auto">In retrospect, [ab]using type classes for integer bit size was not a good idea, because you end up with things like:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="SignedInt 'T1 's1, SignedInt 'T2 's2, SignedInt 'TResult 'sResult, 's1 &lt;= 'sResult, 's2 &lt;= 'sResult instance Promotable 'T1 'T2 'TResult "><pre class="notranslate"><code class="notranslate">SignedInt 'T1 's1, SignedInt 'T2 's2, SignedInt 'TResult 'sResult, 's1 &lt;= 'sResult, 's2 &lt;= 'sResult instance Promotable 'T1 'T2 'TResult </code></pre></div> <p dir="auto">which is an enormous number of instances! This exponentially increased the time required for type class resolution in binary operators while adding <em>zero</em> actual value for real programmers. We had introduced "literal kind" for array length typing (where it <em>did</em> provide value) and got carried away seeing what it could do in other places. Literal kind has some value in typed assembly language and in typing certain kinds of safe pointer arithmetic, but it's a blade with some exponentially sharp edges. Actually, that could probably be said for multivariable type classes in general. I suppose the lesson is "not everything should be automated by magic."</p> <p dir="auto">The "last gasp" resolution strategy in BitC can be viewed as a "weak" type class constraint - one that is applied only if it is required for disambiguation. The contemplated "specified default" idea for Go can similarly be viewed as a weak constraint. I think you will discover that it is problematic, because the defaults end up becoming part of the type so that they can be satisfied at the value's point of origin. What's going to happen is that two type variables T1 and T2 with <em>different</em> defaults, specified in packages separated by twenty cross-package calls will get unified, whereupon you will have contradicting default resolutions. Merely reporting the error in an actionable way isn't an easy thing to do (we put a <em>lot</em> of effort into reporting unification-driven errors actionably). Looking back, my feeling now is that it is cleaner (and easier to explain) to adopt a single "fallback int" and a single "fallback float" type and <em>avoid</em> explicit default resolutions. If that means renaming the functions, then so be it.</p> <p dir="auto">As <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/rsc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/rsc">@rsc</a> and <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/robpike/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/robpike">@robpike</a> note, there is limited experience with generics in Go so far. Apologies for wandering a bit here; perhaps it will be a useful cautionary note at some point in the future.</p> <p dir="auto">The Go community hates to break existing code, which is a very good thing. Would it be possible to modify the compiler temporarily under the "doesn't include floats" interpretation of <code class="notranslate">UntypedInt</code> and learn how many GitHub projects would actually be broken? It strikes me that a completely automated source rewriter could be built...</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1714147,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="8bf59f9bdeb678a6d1f14c672ef6c2af773b37d24b5683bd51912a4717ca46f5" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Merovius"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/720787?s=60&amp;v=4" width="30" height="30" alt="@Merovius" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1714147" data-gid="DC_kwDOAWBuf84AGifj" data-url="/golang/go/discussions/48287/comments/1714147" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="5ff0a2dc7e478b6e4df7c0fd882fcd9cc64b203f94e1b8e45516038564924f07" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1714147-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1714147-list" aria-labelledby="tooltip-268936f9-2411-4516-b4a9-7e42b392d9b1" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-268936f9-2411-4516-b4a9-7e42b392d9b1" for="Comment-actions-1714147-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1714147-list" role="menu" aria-labelledby="Comment-actions-1714147-text"> <include-fragment src="/golang/go/discussions/48287/comments/1714147/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1714147" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1714147,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="8bf59f9bdeb678a6d1f14c672ef6c2af773b37d24b5683bd51912a4717ca46f5" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Merovius" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> Merovius </a> <a href="#discussioncomment-1714147" id="discussioncomment-1714147-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-11-29T07:32:44Z" class="no-wrap">Nov 29, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1714147/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1714147" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <blockquote> <p dir="auto">In particular, the Min(3,5) example resolving to float64 strikes me as resulting from a flaw in Go's original definition of the UntypedInt kind: it shouldn't have included floating point types.</p> </blockquote> <p dir="auto">Perhaps (personally, I disagree). But that's neither here nor there for this discussion, as it's a choice that has been made and we can't break it now.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-d63015" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>1</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>1</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1714266,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="1eb46ede2236fb85dcbfe7340ac1832e6c26448155f606184e03022e61234bd5" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Merovius"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/720787?s=60&amp;v=4" width="30" height="30" alt="@Merovius" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1714266" data-gid="DC_kwDOAWBuf84AGiha" data-url="/golang/go/discussions/48287/comments/1714266" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="d861e0142156ae9814f3063793ba67ac03b0064da2accd7b1d9fb6bdc4110c5f" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1714266-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1714266-list" aria-labelledby="tooltip-5dd66b08-0ca5-4ad5-aba3-8b90f3356548" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-5dd66b08-0ca5-4ad5-aba3-8b90f3356548" for="Comment-actions-1714266-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1714266-list" role="menu" aria-labelledby="Comment-actions-1714266-text"> <include-fragment src="/golang/go/discussions/48287/comments/1714266/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1714266" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1714266,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="1eb46ede2236fb85dcbfe7340ac1832e6c26448155f606184e03022e61234bd5" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Merovius" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> Merovius </a> <a href="#discussioncomment-1714266" id="discussioncomment-1714266-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-11-29T08:07:33Z" class="no-wrap">Nov 29, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1714266/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1714266" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">FWIW:</p> <blockquote> <p dir="auto">Would it be possible to modify the compiler temporarily under the "doesn't include floats" interpretation of UntypedInt and learn how many GitHub projects would actually be broken?</p> </blockquote> <p dir="auto">That's likely possible, yes. <a href="https://github.com/rsc/corpus">The Go corpus</a> is intended for these kinds of analysis. It hasn't been updated in years, but the rules for constants have always been in the language and I can't imagine why anything about their usage rates would have changed.</p> <blockquote> <p dir="auto">It strikes me that a completely automated source rewriter could be built...</p> </blockquote> <p dir="auto">It definitely can. But we can't rely on people using it. Especially as you are suggesting to break the <em>language</em>, not just the tooling. It also seems very hard to me to decide (after the change) if a broken build is due to a) a programming error, or b) the automatic source rewriter not having been applied.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AGhq-" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-1710782" data-gid="DC_kwDOAWBuf84AGhq-" data-url="/golang/go/discussions/48287/comments/1710782" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="ff8835959eed89a03970ad44ac72c4a2d840337fcd2044c0a7124c445b49dc1a" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1710782-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1710782-list" aria-labelledby="tooltip-9dc3d0e4-9023-450e-9906-7e52dd50e9ef" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-9dc3d0e4-9023-450e-9906-7e52dd50e9ef" for="Comment-actions-1710782-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1710782-list" role="menu" aria-labelledby="Comment-actions-1710782-text"> <include-fragment src="/golang/go/discussions/48287/comments/1710782/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1710782" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1710782,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="4237a838b45e3898bc7b3bff11e9138f577bce6336891de3ede7e43ac91c6370" data-hovercard-type="user" data-hovercard-url="/users/jsshapiro/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/jsshapiro" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/18054538?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">jsshapiro</span> </div> </a> <a href="#discussioncomment-1710782" id="discussioncomment-1710782-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-11-28T05:17:54Z" class="no-wrap">Nov 28, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h3> </div> </div> <div class="color-bg-default border-bottom position-relative"> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1710782/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1710782" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto">Thinking further about constraint accumulation, it will be interesting to see how type constraints evolve in Go. At some point I suspect the language will need to consider intersection and union types to deal with them comprehensively.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 1" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-1710782" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>1</span> </button> <tool-tip id="tooltip-445b830b-e204-4554-b038-435fc440987b" for="discussion-upvote-button-DiscussionComment-1710782" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 1 reply </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker color-bg-inset border-top color-border-default mt-n1 rounded-bottom-2" data-child-comments id="child-comments-discussioncomment-1710782"> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1711799,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="7fbbc3cd51d347a32972abf28429589a1c008e6ec783cbaffb5147a1fb666741" data-hovercard-type="user" data-hovercard-url="/users/fzipp/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/fzipp"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/598327?s=60&amp;v=4" width="30" height="30" alt="@fzipp" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-1711799" data-gid="DC_kwDOAWBuf84AGh63" data-url="/golang/go/discussions/48287/comments/1711799" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="0e1e6d1991670c0f3d64b0fd9b7a9a1df923c7855ff1ba23fe9d5878df078142" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-1711799-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-1711799-list" aria-labelledby="tooltip-4223cf35-819c-4677-9a8c-7e56f6f23c25" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-4223cf35-819c-4677-9a8c-7e56f6f23c25" for="Comment-actions-1711799-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-1711799-list" role="menu" aria-labelledby="Comment-actions-1711799-text"> <include-fragment src="/golang/go/discussions/48287/comments/1711799/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F1711799" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:1711799,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="7fbbc3cd51d347a32972abf28429589a1c008e6ec783cbaffb5147a1fb666741" data-hovercard-type="user" data-hovercard-url="/users/fzipp/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/fzipp" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> fzipp </a> <a href="#discussioncomment-1711799" id="discussioncomment-1711799-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2021-11-28T15:02:27Z" class="no-wrap">Nov 28, 2021</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/1711799/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="1711799" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">The type set concept for constraint interfaces models both intersection and union:</p> <p dir="auto"><a href="https://tip.golang.org/ref/spec#Structure_of_interfaces" rel="nofollow">https://tip.golang.org/ref/spec#Structure_of_interfaces</a></p> <blockquote> <ul dir="auto"> <li> <p dir="auto">The set of specific types of a non-empty interface is the intersection of the specific types of its interface elements.</p> </li> <li> <p dir="auto">The type set of a union of terms t1|t2|…|tn is the union of the type sets of the terms.</p> </li> </ul> </blockquote> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-8fd9da" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>3</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>3</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AJOTe" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-2417886" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="1fbab813f66fbb7c81880230c38ab49d022c7a1157203f66ee4824447f93b2d0" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-2417886-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-2417886-list" aria-labelledby="tooltip-662b947a-8f2a-4233-8568-ba4ed745a606" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-662b947a-8f2a-4233-8568-ba4ed745a606" for="Comment-actions-2417886-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-2417886-list" role="menu" aria-labelledby="Comment-actions-2417886-text"> <include-fragment src="/golang/go/discussions/48287/comments/2417886/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F2417886" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:2417886,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="c1bd6bcf91af28df7ea1f6f2d066d953c092058ca84fb0079eb3b8aab60a24bb" data-hovercard-type="user" data-hovercard-url="/users/jabolopes/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/jabolopes" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/1850720?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">jabolopes</span> </div> </a> <a href="#discussioncomment-2417886" id="discussioncomment-2417886-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2022-03-22T20:58:00Z" class="no-wrap">Mar 22, 2022</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h3> </div> </div> <div class="color-bg-default border-bottom position-relative"> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/2417886/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="2417886" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto">If we had a Go equivalent of the <a href="https://abseil.io/docs/cpp/guides/status" rel="nofollow">absl::StatusOr</a>, let's call it <code class="notranslate">ErrorOr</code> (other names are possible), we could write <code class="notranslate">ParseNumber</code> like the following instead:</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="func ParseNumber[T constraints.Number](s string, base int) ErrorOr[T]"><pre class="notranslate"><span class="pl-k">func</span> <span class="pl-en">ParseNumber</span>[<span class="pl-s1">T</span> constraints.<span class="pl-smi">Number</span>](<span class="pl-s1">s</span> <span class="pl-smi">string</span>, <span class="pl-s1">base</span> <span class="pl-smi">int</span>) <span class="pl-smi">ErrorOr</span>[<span class="pl-smi">T</span>]</pre></div> <p dir="auto">The typical <code class="notranslate">(value, error)</code> approach has 4 possible states:</p> <ol dir="auto"> <li>(an actual value, nil)</li> <li>(not an actual value, error)</li> <li>(an actual value, error)</li> <li>(not an actual value, nil)</li> </ol> <p dir="auto">But only states 1 and 2 are sensible in most cases. The <code class="notranslate">ErrorOr</code> can only have these sensible states.</p> <p dir="auto">Another advantage of <code class="notranslate">ErrorOr</code> is that it combines well with higher order functions. For example, we could write:</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="func WithFunc[T any](myfunc func()T) T WithFunc(func()int { ... }) WithFunc(func()ErrorOr[int] { ... })"><pre class="notranslate"><span class="pl-k">func</span> <span class="pl-en">WithFunc</span>[<span class="pl-s1">T</span> <span class="pl-smi">any</span>](<span class="pl-s1">myfunc</span> <span class="pl-k">func</span>()<span class="pl-smi">T</span>) <span class="pl-smi">T</span> <span class="pl-en">WithFunc</span>(<span class="pl-k">func</span>()<span class="pl-smi">int</span> { <span class="pl-c1">...</span> }) <span class="pl-en">WithFunc</span>(<span class="pl-k">func</span>()<span class="pl-smi">ErrorOr</span>[<span class="pl-smi">int</span>] { <span class="pl-c1">...</span> })</pre></div> <p dir="auto">instead of having 2 versions of <code class="notranslate">WithFunc</code>, one for errors and one for no errors:</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="func WithFunc[T any](myfunc func()T) T func WithFuncErr[T any](myfunc func()(T, error)) (T, error)"><pre class="notranslate"><span class="pl-k">func</span> <span class="pl-en">WithFunc</span>[<span class="pl-s1">T</span> <span class="pl-smi">any</span>](<span class="pl-s1">myfunc</span> <span class="pl-k">func</span>()<span class="pl-smi">T</span>) <span class="pl-smi">T</span> <span class="pl-k">func</span> <span class="pl-en">WithFuncErr</span>[<span class="pl-s1">T</span> <span class="pl-smi">any</span>](<span class="pl-s1">myfunc</span> <span class="pl-k">func</span>()(<span class="pl-smi">T</span>, <span class="pl-smi">error</span>)) (<span class="pl-smi">T</span>, <span class="pl-smi">error</span>)</pre></div> <p dir="auto">This would make it easier to write generic libraries and APIs.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 2" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-2417886" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>2</span> </button> <tool-tip id="tooltip-595d29bc-6460-4342-ba3e-cc31e2e901e4" for="discussion-upvote-button-DiscussionComment-2417886" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-8c9232" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>1</span> </button> <button name="input[content]" id="reactions--reaction_button_component-1dc0de" value="THUMBS_DOWN react" data-button-index-position="1" data-reaction-label="-1" data-reaction-content="-1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>3</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>1</span> </li> <li class="dropdown-item" aria-label="-1"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>3</span> </li> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 14 replies </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker color-bg-inset border-top color-border-default mt-n1 rounded-bottom-2" data-child-comments id="child-comments-discussioncomment-2417886"> <div data-view-component="true" class="TimelineItem TimelineItem--condensed discussion-nested-comment-paging-form pt-0 ml-0"> <div style="background-color: transparent; left: 30px;" data-view-component="true" class="TimelineItem-badge discussion-nested-comment-paging-badge pb-3 mt-0 pt-4"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg></div> <div data-view-component="true" class="TimelineItem-body discussion-nested-comment-paging-form-body"> <!-- '"` --><!-- </textarea></xmp> --></option></form><form data-replace-remote-form-target="child-comments-discussioncomment-2417886" data-replace-remote-form="true" data-turbo="false" action="/golang/go/discussions/48287/comments/2417886/threads" accept-charset="UTF-8" method="get"> <input type="hidden" name="back_page" value="1"> <input type="hidden" name="forward_page" value="0"> <input type="hidden" name="anchor_id" value="2420017"> <button data-disable-with="Loading more replies..." type="submit" data-view-component="true" class="Button--link Button--medium Button mb-2 pl-2 pt-2"> <span class="Button-content"> <span class="Button-label">Show 9 previous replies</span> </span> </button> </form></div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:2420017,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="ba69e388e19268d88ebb84588ba479bc1372f27f9316561f0876ca63d7f8080d" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Merovius"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/720787?s=60&amp;v=4" width="30" height="30" alt="@Merovius" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-2420017" data-gid="DC_kwDOAWBuf84AJO0x" data-url="/golang/go/discussions/48287/comments/2420017" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="46360855fd2663a2eb9361c177cb2304e471d56f422af877c8186b8c4858010c" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-2420017-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-2420017-list" aria-labelledby="tooltip-98d8e8a5-5cc6-4800-96c6-6e72375699b6" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-98d8e8a5-5cc6-4800-96c6-6e72375699b6" for="Comment-actions-2420017-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-2420017-list" role="menu" aria-labelledby="Comment-actions-2420017-text"> <include-fragment src="/golang/go/discussions/48287/comments/2420017/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F2420017" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:2420017,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="ba69e388e19268d88ebb84588ba479bc1372f27f9316561f0876ca63d7f8080d" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Merovius" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> Merovius </a> <a href="#discussioncomment-2420017" id="discussioncomment-2420017-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2022-03-23T06:28:22Z" class="no-wrap">Mar 23, 2022</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/2420017/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="2420017" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jabolopes/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jabolopes">@jabolopes</a></p> <blockquote> <p dir="auto">Haskell can panic (or throw) if the caller tries to take the value when the Either doesn't contain a value, for example:</p> </blockquote> <p dir="auto">Fair enough.</p> <blockquote> <p dir="auto">For multiple return values, a struct can be used or a tuple type (if we wanted to define one).</p> </blockquote> <p dir="auto">ISTM what you are really suggesting, then, is to de-facto replace Go's current multiple-return semantics with tuples. No reason to single out errors.</p> <p dir="auto">That would still leave us with the problem of arguments.</p> <blockquote> <p dir="auto">I don't understand what this means. Is taking arguments passing arguments via pointer?</p> </blockquote> <p dir="auto">No, I just mean "a function which takes an argument". Your <code class="notranslate">WithFunc</code> can't compose those.</p> <blockquote> <p dir="auto">I think this is yet another example of objecting to the proposal because it doesn't solve problems that it is not trying to solve.</p> </blockquote> <p dir="auto">Exactly. I'm objecting, because it provides too little value for too much harm. Saying "I don't <em>intend</em> to provide much value" doesn't make enough out of too little.</p> <blockquote> <p dir="auto">The currying bit I don't think plays a part here and it's rather orthogonal to the discussion.</p> </blockquote> <p dir="auto">The currying bit is what makes your <code class="notranslate">WithFunc</code> being unable to compose functions with arguments. It's the dual to composing multiple return types. So it's really the same problem.</p> <blockquote> <p dir="auto">I think calling it functional composition is somewhat misleading because it shifts the main argument of the proposal into a conversation about whether Go is or is not a functional language, which is really besides the point. I think the main point y'all here have been completely avoiding is the fact that (T, error) can't instantiate a single-return generic function.</p> </blockquote> <p dir="auto">That <em>is</em> saying "function composition doesn't work for functions which return an error". And one of <em>my</em> points is, that singling out "functions which return an error" for this is very limiting and prevents this from providing enough value to be worth its cost.</p> <p dir="auto">FWIW I'd be <em>far</em> more interested in a language change which makes multiple-return values behave like tuples (though I'm not sure we could do that). Your suggestion is just a special case of that.</p> <p dir="auto">I think in abseil, the main value <code class="notranslate">ErrorOr</code> provides is that C++ doesn't have multiple return values. I'm not sure that if C++ had multiple return values, <code class="notranslate">ErrorOr</code> would exist.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-ce4a00" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>3</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>3</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:2420427,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="6d5895f5e6ed5e6d28e022857bb475608397309ee3b88eddfe4e474c9c2929ed" data-hovercard-type="user" data-hovercard-url="/users/jabolopes/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/jabolopes"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/1850720?s=60&amp;v=4" width="30" height="30" alt="@jabolopes" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-2420427" data-gid="DC_kwDOAWBuf84AJO7L" data-url="/golang/go/discussions/48287/comments/2420427" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="232f7a0a3f3f6de512a463fc9c793f3c140b2bb0d67bcb735976178036203a89" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-2420427-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-2420427-list" aria-labelledby="tooltip-6344a772-eea8-4c9f-8b10-3b48fdce69fe" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-6344a772-eea8-4c9f-8b10-3b48fdce69fe" for="Comment-actions-2420427-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-2420427-list" role="menu" aria-labelledby="Comment-actions-2420427-text"> <include-fragment src="/golang/go/discussions/48287/comments/2420427/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F2420427" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:2420427,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="6d5895f5e6ed5e6d28e022857bb475608397309ee3b88eddfe4e474c9c2929ed" data-hovercard-type="user" data-hovercard-url="/users/jabolopes/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/jabolopes" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> jabolopes </a> <a href="#discussioncomment-2420427" id="discussioncomment-2420427-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2022-03-23T07:44:53Z" class="no-wrap">Mar 23, 2022</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/2420427/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="2420427" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/kylelemons/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/kylelemons">@kylelemons</a></p> <p dir="auto">The definition of <code class="notranslate">Do</code> that I had in my mind was slightly different from those, namely, it would be something like:</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="func Do[T any](g *Group, key string, f func() T) (v T, shared bool)"><pre class="notranslate"><span class="pl-k">func</span> <span class="pl-en">Do</span>[<span class="pl-s1">T</span> <span class="pl-smi">any</span>](<span class="pl-s1">g</span> <span class="pl-c1">*</span><span class="pl-smi">Group</span>, <span class="pl-s1">key</span> <span class="pl-smi">string</span>, <span class="pl-s1">f</span> <span class="pl-k">func</span>() <span class="pl-smi">T</span>) (<span class="pl-s1">v</span> <span class="pl-smi">T</span>, <span class="pl-s1">shared</span> <span class="pl-smi">bool</span>)</pre></div> <p dir="auto">where <code class="notranslate">f</code> could be instantiated with an error returning function (e.g., <code class="notranslate">func()ErrorOr[T]</code>) or not (e.g., <code class="notranslate">func()T</code>). So it would be the instantiation of <code class="notranslate">f</code> that would decide whether <code class="notranslate">Do</code> would return an error or not. This would also simplify the internal implementation of <code class="notranslate">SingleFlight</code>, which would only need to store a single return value per call (i.e., <code class="notranslate">ErrorT[T]</code>) rather than 2 values per call (i.e., <code class="notranslate">(T, error)</code>).</p> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Merovius">@Merovius</a></p> <blockquote> <p dir="auto">ISTM what you are really suggesting, then, is to de-facto replace Go's current multiple-return semantics with tuples. No reason to single out errors.</p> </blockquote> <p dir="auto">Not exactly. I'm suggesting introducing a new type <code class="notranslate">ErrorOr</code> to do error handling for new APIs instead of using <code class="notranslate">(T, error)</code>.</p> <p dir="auto">I think the option to use tuples instead of multiple-return semantics is an alternative to <code class="notranslate">ErrorOr</code> and a different way to go about the problem.</p> <p dir="auto">I think both options are possible and have different pros and cons. I think the <code class="notranslate">ErrorOr</code> approach is easier to do because it's just defining a new generic type, whereas the tuples approach would require changing parts of the semantic of Go, which is a much bigger proposal.</p> <p dir="auto">In any case, I'd be happy to discuss both options.</p> <blockquote> <p dir="auto">FWIW I'd be far more interested in a language change which makes multiple-return values behave like tuples (though I'm not sure we could do that).</p> </blockquote> <p dir="auto">Your suggestions regarding treating a <code class="notranslate">(x, y, z)</code> as a tuple of arguments instead of separate arguments, the suggestion of currying, the suggestion of improving composition, the suggestion of making multiple-return values behave like tuples, are all still valid and possible. The <code class="notranslate">ErrorOr</code> does not get in the way of that and if anything it makes certain things easier because functions become more composable.</p> <p dir="auto">So I don't understand why you'd object to <code class="notranslate">ErrorOr</code> when it doesn't get in the way of what you're trying to achieve and it even makes it easier for you to continue investing in the language features you care about. So it seems to me that by objecting to this proposal you're effectively making it more difficult for you to go further beyond this proposal and introducing those additional language features that you mentioned.</p> <blockquote> <p dir="auto">I think in abseil, the main value ErrorOr provides is that C++ doesn't have multiple return values. I'm not sure that if C++ had multiple return values, ErrorOr would exist.</p> </blockquote> <p dir="auto">In C++, it's possible: you can do something similar with the following code. So I don't think the argument is applicable:</p> <div class="highlight highlight-source-c++ notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="std::tuple&lt;T, int&gt; MyFunc() ... auto [x, err] = MyFunc(); if (!err) ..."><pre class="notranslate">std::tuple&lt;T, <span class="pl-k">int</span>&gt; <span class="pl-en">MyFunc</span>() ... auto [x, err] = MyFunc(); <span class="pl-k">if</span> (!err) ...</pre></div> <p dir="auto">One more thing that we haven't discussed is that we could extend Go with additional syntax so that <code class="notranslate">ErrorOr</code> could behave monadically so that we could solve the problem with exceptions without actually requiring exceptions. I think this is out of scope of this discussion, so I will just give a quick example.</p> <p dir="auto">Let's say we have a new operator (I will use <code class="notranslate">&lt;-</code> but other syntactic choices are possible), then we could do the following:</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="func MyFunc(...) ErrorOr[T] ... func OtherFunc(...) ErrorOr[T] { x := &lt;- MyFunc(...) ... } func OtherFunc2(...) ErrorOr[T] { x := MyFunc(...) if x.Err() != nil { return x } ... }"><pre class="notranslate"><span class="pl-k">func</span> <span class="pl-s1">MyFunc</span>(<span class="pl-c1">...</span>) <span class="pl-smi">ErrorOr</span>[<span class="pl-smi">T</span>] <span class="pl-c1">...</span> <span class="pl-k">func</span> <span class="pl-s1">OtherFunc</span>(<span class="pl-c1">...</span>) <span class="pl-smi">ErrorOr</span>[<span class="pl-smi">T</span>] { <span class="pl-s1">x</span> <span class="pl-c1">:=</span> <span class="pl-c1">&lt;-</span> <span class="pl-s1">MyFunc</span>(<span class="pl-c1">...</span>) <span class="pl-c1">...</span> } <span class="pl-k">func</span> <span class="pl-s1">OtherFunc2</span>(<span class="pl-c1">...</span>) <span class="pl-smi">ErrorOr</span>[<span class="pl-smi">T</span>] { <span class="pl-s1">x</span> <span class="pl-c1">:=</span> <span class="pl-smi">MyFunc</span>(<span class="pl-c1">...</span>) <span class="pl-k">if</span> x.<span class="pl-smi">Err</span>() <span class="pl-c1">!=</span> <span class="pl-c1">nil</span> { <span class="pl-k">return</span> <span class="pl-s1">x</span> } <span class="pl-c1">...</span> }</pre></div> <p dir="auto">In this example, <code class="notranslate">OtherFunc</code> and <code class="notranslate">OtherFunc2</code> are equivalent but in <code class="notranslate">OtherFunc</code> we use this new operator to avoid having to explicitly write the code that propagates the error up the chain call. This operator has the same meaning as the explicit error handling in <code class="notranslate">OtherFunc2</code>.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:2420643,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="ab14d03ace3655993403de5ab228ce070e6e37edd9f485440dc35df269546df1" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Merovius"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/720787?s=60&amp;v=4" width="30" height="30" alt="@Merovius" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-2420643" data-gid="DC_kwDOAWBuf84AJO-j" data-url="/golang/go/discussions/48287/comments/2420643" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="2872b69d386c3aac673bb36b4e8a1c8572bd4959cba12b9a60b456a1bc688bdc" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-2420643-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-2420643-list" aria-labelledby="tooltip-353658ba-8424-48fa-bd25-cb2c3865cb58" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-353658ba-8424-48fa-bd25-cb2c3865cb58" for="Comment-actions-2420643-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-2420643-list" role="menu" aria-labelledby="Comment-actions-2420643-text"> <include-fragment src="/golang/go/discussions/48287/comments/2420643/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F2420643" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:2420643,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="ab14d03ace3655993403de5ab228ce070e6e37edd9f485440dc35df269546df1" data-hovercard-type="user" data-hovercard-url="/users/Merovius/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Merovius" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> Merovius </a> <a href="#discussioncomment-2420643" id="discussioncomment-2420643-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2022-03-23T08:10:13Z" class="no-wrap">Mar 23, 2022</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/2420643/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="2420643" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <blockquote> <p dir="auto">So I don't understand why you'd object to <code class="notranslate">ErrorOr</code> when it doesn't get in the way of what you're trying to achieve</p> </blockquote> <p dir="auto">Because every change has a cost and must justify it. The less it does, the more difficult it is to justify that cost. I bring up these other things to demonstrate how small the benefits of your suggestion really are - it's a special case of a special case. What's left is</p> <ol dir="auto"> <li>Preventing people from accidentally returning both a value and an error. Which seems <a href="https://github.com/golang/go/discussions/48287#discussioncomment-2418490" data-hovercard-type="discussion" data-hovercard-url="/golang/go/discussions/48287/hovercard?comment_id=2418490">a non-existent problem to me</a>.</li> <li>Preventing people from <em>intentionally</em> returning both a value and an error. Which is <a href="https://github.com/golang/go/discussions/48287#discussioncomment-2419703" data-hovercard-type="discussion" data-hovercard-url="/golang/go/discussions/48287/hovercard?comment_id=2419703">arguably counterproductive</a>.</li> <li>Preventing people from returning neither, which both seems a non-existent problem <a href="https://github.com/golang/go/discussions/48287#discussioncomment-2418229" data-hovercard-type="discussion" data-hovercard-url="/golang/go/discussions/48287/hovercard?comment_id=2418229">and it doesn't even do that particularly well</a>.</li> <li>Allow people to compose error-returning functions, which doesn't need this, as functions could already return <code class="notranslate">struct{ T; error }</code>.</li> </ol> <p dir="auto">You are correct, that none of this is really talking about the <em>cost</em> of what you suggest. It just make statements about the benefits. For the cost, I'd mostly say</p> <ol dir="auto"> <li>The significant work required to move the ecosystem from one convention to the other</li> <li>Syntactical noise (which is subjective, though)</li> </ol> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:2421322,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="b5b95c99695ec4695ffd49c2363d08af79e86d13873e84fea22bc49656706005" data-hovercard-type="user" data-hovercard-url="/users/ncruces/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/ncruces"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/5637550?s=60&amp;v=4" width="30" height="30" alt="@ncruces" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-2421322" data-gid="DC_kwDOAWBuf84AJPJK" data-url="/golang/go/discussions/48287/comments/2421322" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="7591103be97dabe867f45932e385d83272eb511da8c502d94c56dc039d6f5d0f" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-2421322-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-2421322-list" aria-labelledby="tooltip-1dc71310-1dac-408a-8cc9-12bc7ee2e2b3" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-1dc71310-1dac-408a-8cc9-12bc7ee2e2b3" for="Comment-actions-2421322-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-2421322-list" role="menu" aria-labelledby="Comment-actions-2421322-text"> <include-fragment src="/golang/go/discussions/48287/comments/2421322/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F2421322" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:2421322,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="b5b95c99695ec4695ffd49c2363d08af79e86d13873e84fea22bc49656706005" data-hovercard-type="user" data-hovercard-url="/users/ncruces/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/ncruces" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> ncruces </a> <a href="#discussioncomment-2421322" id="discussioncomment-2421322-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2022-03-23T10:02:52Z" class="no-wrap">Mar 23, 2022</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/2421322/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="2421322" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <blockquote> <p dir="auto">I think in abseil, the main value <code class="notranslate">ErrorOr</code> provides is that C++ doesn't have multiple return values. I'm not sure that if C++ had multiple return values, <code class="notranslate">ErrorOr</code> would exist.</p> </blockquote> <p dir="auto">I'll go further than that: I'm not sure if C++ had exceptions from the start, we'd have <code class="notranslate">absl::StatusOr</code>.<br> <a href="https://google.github.io/styleguide/cppguide.html#Exceptions" rel="nofollow">https://google.github.io/styleguide/cppguide.html#Exceptions</a></p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:2421341,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="4f26d9531ad2243fd5bc0ed255b621b38c2e7ab7158760967c78208e82913927" data-hovercard-type="user" data-hovercard-url="/users/leaxoy/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/leaxoy"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/8556349?s=60&amp;v=4" width="30" height="30" alt="@leaxoy" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-2421341" data-gid="DC_kwDOAWBuf84AJPJd" data-url="/golang/go/discussions/48287/comments/2421341" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="dfae7dd44cc18fcec652ca991b8ec3c47aa96aaad894ef56aa15e842d0df490f" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-2421341-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-2421341-list" aria-labelledby="tooltip-d38d0dfc-b87c-4507-b9b1-3abf7d5dd82d" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-d38d0dfc-b87c-4507-b9b1-3abf7d5dd82d" for="Comment-actions-2421341-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-2421341-list" role="menu" aria-labelledby="Comment-actions-2421341-text"> <include-fragment src="/golang/go/discussions/48287/comments/2421341/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F2421341" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> <edit-history> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" aria-haspopup="true" aria-controls="discussion-edit-history-2421341-list" aria-expanded="false" id="discussion-edit-history-2421341-text" data-target="edit-history.menuTrigger" type="button" data-view-component="true" class="Button--invisible Button--small Button"> <span class="Button-content"> <span class="Button-label">edited</span> </span> <span class="Button-visual Button-trailingAction"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path> </svg> </span> </button> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="discussion-edit-history-2421341-list" role="menu" aria-labelledby="discussion-edit-history-2421341-text"> <include-fragment src="/golang/go/discussions/48287/comments/2421341/edits_log" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="edit-history.deletedDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> {{actor}} deleted this content <relative-time class="no-wrap" datetime="{{datetime}}"></relative-time>. </div> </scrollable-region> </dialog></dialog-helper> </template> <template data-target="edit-history.diffDialogTemplate"> <dialog-helper> <dialog data-action="cancel:edit-history#removeDialog" id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-large Overlay--motion-scaleFade Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{editor}}&#39;s edit </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body p-0"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> </edit-history> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:2421341,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="4f26d9531ad2243fd5bc0ed255b621b38c2e7ab7158760967c78208e82913927" data-hovercard-type="user" data-hovercard-url="/users/leaxoy/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/leaxoy" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> leaxoy </a> <a href="#discussioncomment-2421341" id="discussioncomment-2421341-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2022-03-23T10:06:08Z" class="no-wrap">Mar 23, 2022</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/2421341/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="2421341" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <blockquote> <blockquote> <p dir="auto">The "multiple invalid states" need to be guaranteed at the construction of <code class="notranslate">ErrorOr</code>.</p> </blockquote> <p dir="auto">That's the easy part. For the hard part, you suggest:</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" func (e ErrorOr[T]) Val() T ... func (e ErrorOr[T]) Err() error ... "><pre class="notranslate"><span class="pl-k">func</span> (<span class="pl-s1">e</span> <span class="pl-smi">ErrorOr</span>[<span class="pl-smi">T</span>]) <span class="pl-en">Val</span>() T ... <span class="pl-smi">func</span> (<span class="pl-s1">e</span> <span class="pl-smi">ErrorOr</span>[<span class="pl-smi">T</span>]) <span class="pl-s1">Err</span>() <span class="pl-s1">error</span> <span class="pl-c1">...</span></pre></div> <p dir="auto">How is that different from just returning <code class="notranslate">(T, error)</code>? i.e. What would prevent the user from calling <code class="notranslate">Val()</code> before checking <code class="notranslate">Err()</code>?</p> <p dir="auto">That's why I said the only really viable design is my <code class="notranslate">Match</code> method. It's the only way to <em>guarantee</em> that <em>only</em> the correct branch is executed. If you don't guarantee that, you might as well stay with <code class="notranslate">(T, error)</code>, it's idiomatic and provides the same level of safety.</p> </blockquote> <p dir="auto">The <code class="notranslate">(T,error)</code> is <code class="notranslate">product type</code>, while <code class="notranslate">ErrorOr[T]</code> or <code class="notranslate">Result[T]</code> is <code class="notranslate">sum type</code>.</p> <p dir="auto">For each element has two state, the first case will produce 4 states, and then second only produce 2 states.</p> <p dir="auto">When handling result, the first case will check all 4 states, but the second one only 2 states.</p> <p dir="auto">The proper way is introduce <code class="notranslate">tagged union</code> or <code class="notranslate">sum type</code>, and add <code class="notranslate">Result[T]</code> like rust.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AJO-L" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-2420619" data-gid="DC_kwDOAWBuf84AJO-L" data-url="/golang/go/discussions/48287/comments/2420619" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="0bc0acdcac88af29d09312d3f11b8a199d6d4ab75998b7cd7b56b28330a82ed6" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-2420619-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-2420619-list" aria-labelledby="tooltip-b51184e6-6140-4677-83f3-69cddc946112" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-b51184e6-6140-4677-83f3-69cddc946112" for="Comment-actions-2420619-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-2420619-list" role="menu" aria-labelledby="Comment-actions-2420619-text"> <include-fragment src="/golang/go/discussions/48287/comments/2420619/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F2420619" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:2420619,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="0b134b8d1331166dadd46aa061359beec4eabe9a7890545a64e0aa44c7d4eac4" data-hovercard-type="user" data-hovercard-url="/users/robpike/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/robpike" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/4324516?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">robpike</span> </div> </a> <a href="#discussioncomment-2420619" id="discussioncomment-2420619-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2022-03-23T08:06:29Z" class="no-wrap">Mar 23, 2022</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > <span title="This user is a collaborator on this repository." data-view-component="true" class="Label py-0 ml-1"> Collaborator </span> </div> </div> </h3> </div> </div> <div class="color-bg-default border-bottom position-relative"> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/2420619/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="2420619" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jabolopes/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jabolopes">@jabolopes</a> Your part of this discussion has drifted far from the original intent of this issue and is now taking up about half the space. Can you please move the discussion to a separate issue and do so in the form of a proposal?</p> <p dir="auto">This proposal is originally about how to introduce generic versions of things like Min and Map. You are asking for a new way to think about errors. That deserves to be a separate conversation.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 6" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-2420619" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>6</span> </button> <tool-tip id="tooltip-70b8c3ff-4f65-495c-a194-b73b4d1799b0" for="discussion-upvote-button-DiscussionComment-2420619" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 1 reply </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker color-bg-inset border-top color-border-default mt-n1 rounded-bottom-2" data-child-comments id="child-comments-discussioncomment-2420619"> <div class="TimelineItem js-comment-container js-nested-comment-container js-targetable-element ml-0 pb-2 pl-3 discussion-nested-comment-timeline-item discussion-primer-next-nested-comment-timeline-item width-full"> <div class="avatar-parent-child flex-column flex-items-center TimelineItem-avatar left-0 ml-3"><a class="d-inline-block" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:2433546,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="f62750a0244b73adebb9a10490deb7bb539f0eed5ddae9e113f4bfcc6e451154" data-hovercard-type="user" data-hovercard-url="/users/jabolopes/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/jabolopes"><img class="avatar rounded-2 mr-2 avatar-user" src="https://avatars.githubusercontent.com/u/1850720?s=60&amp;v=4" width="30" height="30" alt="@jabolopes" /></a></div> <div class="discussions-timeline-scroll-target" id="discussioncomment-2433546" data-gid="DC_kwDOAWBuf84AJSIK" data-url="/golang/go/discussions/48287/comments/2433546" data-error="" > <div class=" timeline-comment-group discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body discussion-nested-comment-group position-relative mt-0 pl-2 " > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment border-0 color-bg-inset nested-discussion-timeline-comment ml-n3" data-body-version="33e2d4800f4652d96bf4e7b8bdf796368150c0981a60f625a0db9745f7fac012" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center border-bottom-0 color-bg-inset"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-2433546-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-2433546-list" aria-labelledby="tooltip-951aa709-6fe6-438e-b1e8-50a04cb0fe58" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-951aa709-6fe6-438e-b1e8-50a04cb0fe58" for="Comment-actions-2433546-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-2433546-list" role="menu" aria-labelledby="Comment-actions-2433546-text"> <include-fragment src="/golang/go/discussions/48287/comments/2433546/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F2433546" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h4 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-1 pt-0"> <div class="d-flex flex-items-center"> <a width="fit" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:2433546,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="f62750a0244b73adebb9a10490deb7bb539f0eed5ddae9e113f4bfcc6e451154" data-hovercard-type="user" data-hovercard-url="/users/jabolopes/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/jabolopes" data-view-component="true" class="author css-truncate css-truncate-target lh-condensed Link--primary Link text-bold"> jabolopes </a> <a href="#discussioncomment-2433546" id="discussioncomment-2433546-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2022-03-24T22:34:57Z" class="no-wrap">Mar 24, 2022</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h4> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/2433546/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="2433546" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body px-3 pt-0 pb-2" > <p dir="auto">Hi Rob, thank you so much for the suggestion to create a new proposal. Created <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1180119864" data-permission-text="Title is private" data-url="https://github.com/golang/go/issues/51931" data-hovercard-type="issue" data-hovercard-url="/golang/go/issues/51931/hovercard" href="https://github.com/golang/go/issues/51931">#51931</a>.</p> <p dir="auto">Apologies for taking up so much space. When I wrote the first comment I didn't expect the thread to grow so much.</p> <p dir="auto">Thanks,<br> Jose</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center ml-1"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-7c1837" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>3</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>3</span> </li> </ul> </details> </div> </div> </div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AL4tQ" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-3115856" data-gid="DC_kwDOAWBuf84AL4tQ" data-url="/golang/go/discussions/48287/comments/3115856" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="25a02936414c6d61a9a3cd1cbb7522955c2546dda908b7950fd8048af98898e8" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-3115856-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-3115856-list" aria-labelledby="tooltip-00224999-4b99-413e-9541-7a5e9bd01bbc" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-00224999-4b99-413e-9541-7a5e9bd01bbc" for="Comment-actions-3115856-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-3115856-list" role="menu" aria-labelledby="Comment-actions-3115856-text"> <include-fragment src="/golang/go/discussions/48287/comments/3115856/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F3115856" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:3115856,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="9a2a1a0a345fcaf0bdaef35f632aa9be6c956277d7095dff4a69e83112477772" data-hovercard-type="user" data-hovercard-url="/users/smasher164/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/smasher164" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/12636891?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">smasher164</span> </div> </a> <a href="#discussioncomment-3115856" id="discussioncomment-3115856-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2022-07-10T14:35:17Z" class="no-wrap">Jul 10, 2022</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > <span title="This user is a collaborator on this repository." data-view-component="true" class="Label py-0 ml-1"> Collaborator </span> </div> </div> </h3> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/3115856/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="3115856" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto">I was recently discussing this on twitter, but instead of suggesting to library designers to provide two versions of each function, one with a predefined constraint, and one with a func value as a parameter -- why not provide functions for those operators in the constraints package?</p> <p dir="auto">That way, instead of choosing between <code class="notranslate">Sort(v)</code> and <code class="notranslate">Sort(v, func() { ... })</code>, they can just do</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Sort(v, constraints.LessThan[T])"><pre class="notranslate"><span class="pl-en">Sort</span>(<span class="pl-s1">v</span>, <span class="pl-s1">constraints</span>.<span class="pl-c1">LessThan</span>[<span class="pl-s1">T</span>])</pre></div> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 5" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-3115856" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>5</span> </button> <tool-tip id="tooltip-61157e15-8ec2-4116-ad58-20bf08580aca" for="discussion-upvote-button-DiscussionComment-3115856" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-9c5923" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>1</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>1</span> </li> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 0 replies </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker" data-child-comments id="child-comments-discussioncomment-3115856"> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AMrM2" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-3322678" data-gid="DC_kwDOAWBuf84AMrM2" data-url="/golang/go/discussions/48287/comments/3322678" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="cd4760543c7d90ab8eecd19927025836a4b098fadac0f60acac641aed2eb1c8f" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-3322678-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-3322678-list" aria-labelledby="tooltip-cb67f5f5-9140-4f03-9b07-bdb22a4f0857" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-cb67f5f5-9140-4f03-9b07-bdb22a4f0857" for="Comment-actions-3322678-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-3322678-list" role="menu" aria-labelledby="Comment-actions-3322678-text"> <include-fragment src="/golang/go/discussions/48287/comments/3322678/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F3322678" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:3322678,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="c9d796754636f653f7568d8e49e9c4e7bf79d0a3c98dd50b035b2da0ac0429cb" data-hovercard-type="user" data-hovercard-url="/users/willfaught/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/willfaught" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/63830?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">willfaught</span> </div> </a> <a href="#discussioncomment-3322678" id="discussioncomment-3322678-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2022-08-04T07:03:27Z" class="no-wrap">Aug 4, 2022</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h3> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/3322678/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="3322678" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/rsc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/rsc">@rsc</a>:</p> <blockquote> <ul dir="auto"> <li>func math.Abs would naturally be math.Abs[T]</li> <li>func math.Min would naturally be math.Min[T]</li> <li>func math.Max would naturally be math.Max[T]</li> </ul> </blockquote> <p dir="auto">I don't think we'd want to make math.Abs, Min, or Max generic anyway, since they take into account NaN, infinities, and signed zeroes. Are there any other examples of wanting to abstract a non-interface type to a type variable in the stdlib?</p> <p dir="auto">I think we should follow Java's approach, with <a href="https://docs.oracle.com/javase/tutorial/java/generics/rawTypes.html" rel="nofollow">raw types</a>. The Go equivalent would be:</p> <ul dir="auto"> <li>You can change any non-generic type into a generic type, but the constraints must be basic interfaces if the type will be used "raw."</li> <li>Uses of the type that don't instantiate it are implicitly instantiated with its constraint types (typically <code class="notranslate">interface{}</code>/<code class="notranslate">any</code>).</li> </ul> <p dir="auto">So <code class="notranslate">var x list.List</code> means <code class="notranslate">var x list.List[any]</code>, assuming the constraint is <code class="notranslate">any</code>.</p> <p dir="auto">We would get:</p> <ul dir="auto"> <li>Old code compiled with a pre-generics compiler continues to work.</li> <li>Old code compiled with a post-generics compiler continues to work.</li> <li>Old code with added generics continues to work with old pre-generics code.</li> <li>Old code with added generics works with post-generics code that uses it generically.</li> </ul> <p dir="auto">Due to the basic interface constraint limitation, we wouldn't be able to convert, say,</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="func Max(x, y int64) int64 { if x &gt; y { return x } return y } var max func(int64, int64) int64 = Max"><pre class="notranslate"><span class="pl-k">func</span> <span class="pl-en">Max</span>(<span class="pl-s1">x</span>, <span class="pl-s1">y</span> <span class="pl-smi">int64</span>) <span class="pl-smi">int64</span> { <span class="pl-k">if</span> <span class="pl-s1">x</span> <span class="pl-c1">&gt;</span> <span class="pl-s1">y</span> { <span class="pl-k">return</span> <span class="pl-s1">x</span> } <span class="pl-k">return</span> <span class="pl-s1">y</span> } <span class="pl-k">var</span> <span class="pl-s1">max</span> <span class="pl-k">func</span>(<span class="pl-smi">int64</span>, <span class="pl-smi">int64</span>) <span class="pl-smi">int64</span> <span class="pl-c1">=</span> <span class="pl-s1">Max</span></pre></div> <p dir="auto">to</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="func Max[T constraints.Ordered](x, y T) T { if x &gt; y { return x } return y } var max func(?, ?) ? = Max"><pre class="notranslate"><span class="pl-k">func</span> <span class="pl-en">Max</span>[<span class="pl-s1">T</span> constraints.<span class="pl-smi">Ordered</span>](<span class="pl-s1">x</span>, <span class="pl-s1">y</span> <span class="pl-smi">T</span>) <span class="pl-smi">T</span> { <span class="pl-k">if</span> <span class="pl-s1">x</span> <span class="pl-c1">&gt;</span> <span class="pl-s1">y</span> { <span class="pl-k">return</span> <span class="pl-s1">x</span> } <span class="pl-k">return</span> <span class="pl-s1">y</span> } <span class="pl-k">var</span> <span class="pl-s1">max</span> <span class="pl-k">func</span>(?, ?) ? <span class="pl-c1">=</span> <span class="pl-s1">Max</span></pre></div> <p dir="auto">because there's nothing we can put for <code class="notranslate">?</code>, because <code class="notranslate">constraints.Ordered</code> can't be used as a type for a value.</p> <p dir="auto">For the cases where we'd need to add a second, generic, variant of a function, I suggest appending the constraint to the name, rather than "Of". E.g. <code class="notranslate">FooAny[T any]</code>, <code class="notranslate">FooReader[T io.Reader]</code>, etc. for <code class="notranslate">Foo</code>. So, in the case of Max, we'd have Max and MaxOrdered.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 1" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-3322678" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>1</span> </button> <tool-tip id="tooltip-03865bcb-4aa8-45d6-9768-1e18b125a6a7" for="discussion-upvote-button-DiscussionComment-3322678" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-821be6" value="THUMBS_DOWN react" data-button-index-position="1" data-reaction-label="-1" data-reaction-content="-1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>2</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="-1"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>2</span> </li> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 0 replies </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker" data-child-comments id="child-comments-discussioncomment-3322678"> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-item js-timeline-progressive-focus-container js-quote-selection-container" data-gid="DC_kwDOAWBuf84AUXLj" data-quote-markdown=".js-comment-body" > <div class="TimelineItem discussion-timeline-item mx-0 js-comment-container" data-open-edit-form-after-load="false" > <div class="discussions-timeline-scroll-target js-targetable-element" id="discussioncomment-5337827" data-gid="DC_kwDOAWBuf84AUXLj" data-url="/golang/go/discussions/48287/comments/5337827" > <div class=" timeline-comment-group reactions-with-gap discussion-comment js-discussion-comment js-minimizable-comment-group js-targetable-element TimelineItem-body js-timeline-discussion-comment my-1 " data-error="" > <div class="d-flex"> <div class="width-full"> <div class="timeline-comment unminimized-comment comment previewable-edit js-task-list-container flex-auto box-shadow-none js-comment" data-body-version="d22fa7d921a5fa71c2e9d7338d450a81ad8b214d214b960eae2f1be0d7de9125" > <div class="edit-comment-hide"> <div class="clearfix d-flex px-3 flex-row-reverse flex-items-center"> <div class="timeline-comment-actions flex-shrink-0"> <div class="d-flex flex-row flex-items-center"> <comment-actions-container> <experimental-action-menu data-anchor-align="end" data-anchor-side="outside-bottom" data-view-component="true"> <button role="button" id="Comment-actions-5337827-text" aria-haspopup="true" aria-expanded="false" aria-controls="Comment-actions-5337827-list" aria-labelledby="tooltip-d354589e-968d-4b65-bd7d-e206c3a356e6" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-d354589e-968d-4b65-bd7d-e206c3a356e6" for="Comment-actions-5337827-text" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Comment options</tool-tip> <div class="Overlay-backdrop--anchor" data-menu-overlay> <div class="Overlay Overlay-whenNarrow Overlay--height-auto Overlay--width-auto" hidden> <div class="Overlay-body Overlay-body--paddingNone"> <ul class="ActionList" id="Comment-actions-5337827-list" role="menu" aria-labelledby="Comment-actions-5337827-text"> <include-fragment src="/golang/go/discussions/48287/comments/5337827/comment_actions_menu?form_path=%2Fgolang%2Fgo%2Fdiscussions%2F48287%2Fcomments%2F5337827" loading="lazy" data-target="action-menu.includeFragment"> <li class="ActionList-item d-flex flex-items-center flex-justify-center text-center" data-target="action-menu.includeFragmentLoadingItem" aria-disabled="true" > <span data-view-component="true"> <svg aria-label="Loading content..." style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="m-2 anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </li> </include-fragment> </ul> </div> </div> </div> </experimental-action-menu> <template data-target="comment-actions-container.dialogTemplate"> <dialog-helper> <dialog id="{{dialogId}}" aria-modal="true" aria-labelledby="{{dialogId}}-title" aria-describedby="{{dialogId}}-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--size-auto Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="{{dialogId}}-title"> {{title}} </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="{{dialogId}}" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="{{dialogId}}-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment src="{{src}}"> <div class="text-center" data-hide-on-error> <span data-view-component="true"> <svg aria-label="Loading" style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" role="img" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg></span> </div> <div class="text-center" data-show-on-error hidden> Something went wrong. </div> </include-fragment> </div> </scrollable-region> </dialog></dialog-helper> </template> <div data-target="comment-actions-container.dialogContainer"></div> <div hidden> <button data-hotkey="r" type="button" data-view-component="true" class="js-comment-quote-reply Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-label">Quote reply</span> </span> </button> </div> </comment-actions-container> </div> </div> <div class="d-none d-sm-flex flex-items-center"> <span class="d-inline-block js-comment-edit-history"> </span> </div> <h3 data-view-component="true" class="timeline-comment-header-text text-normal f5 pb-0 pt-2"> <div class="d-flex flex-items-center"> <a data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:5337827,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="b750dfcf108ae34179aa8cadcec3fd706305daf43ab23cf956d3ded914994150" data-hovercard-type="user" data-hovercard-url="/users/perj/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/perj" data-view-component="true" class="Truncate Link--primary Link d-flex flex-items-center text-bold"> <img aria-hidden="true" src="https://avatars.githubusercontent.com/u/224521?s=64&amp;v=4" alt="" size="32" height="32" width="32" data-view-component="true" class="avatar circle mr-2" /> <div class="d-flex flex-column Truncate"> <span data-view-component="true" class="Truncate-text text-bold">perj</span> </div> </a> <a href="#discussioncomment-5337827" id="discussioncomment-5337827-permalink" class="Link--secondary js-timestamp d-inline-block ml-2" > <relative-time datetime="2023-03-16T18:45:14Z" class="no-wrap">Mar 16, 2023</relative-time> </a> <div class="d-none d-sm-inline-flex ml-2" > </div> </div> </h3> </div> </div> <div class=""> <div class="edit-comment-hide"> <task-lists disabled sortable> <inline-machine-translation detected-language="en" detect-language-url="/golang/go/discussions/48287/comments/5337827/language_detections" > <p hidden class="mx-3 mt-3 mb-0 f6 color-fg-muted" data-target="inline-machine-translation.triggerContainer"> <span data-target="inline-machine-translation.fromLanguageContainer"></span> - <button title="Translate content" data-action="click:inline-machine-translation#click" data-target="inline-machine-translation.button" type="button" data-view-component="true" class="btn-link"> <span data-target="inline-machine-translation.targetLanguageContainer"></span> </button> </p> </inline-machine-translation> <table class="d-block" role="presentation" data-paste-markdown-skip> <tbody class="d-block js-translation-source" data-target-translation-id="5337827" data-target-translation-type="comment" > <tr class="d-block"> <td class="d-block color-fg-default comment-body markdown-body js-comment-body" > <p dir="auto">I've been holding off commenting here, because from the discussion it doesn't sound like this is a very popular choice, but since nobody mentioned it this way yet and this issue has resurfaced, I figured I would.</p> <p dir="auto">One obvious thing for me to consider when it's about a single or a few symbols that needs a new version is to version those symbols. That's how I've been solving the Setup function in one of my packages, without generics being involved. I renamed it to SetupV2, changing the signature, then made a new Setup with the old signature calling the new version, also indicating that's what it does in the documentation.</p> <p dir="auto">I think that's concise and delivers the message, while still being backwards compatible.</p> <p dir="auto">It's possible to extend it slightly based on some comments in this thread. For example, one could make sure to also create a SetupV1 when there need for SetupV2 arise. SetupV1 and the old Setup would be identical, both calling SetupV2. One could then start thinking about go.mod maneuvering to change the signature of Setup to that of SetupV2 instead of SetupV1 based on the version number in there, but it would be a later problem. Or perhaps to drop the versionless one altogether.</p> </td> </tr> </tbody> </table> <p class="mx-3 mb-3 f6 color-fg-muted js-translation-feedback" hidden> <span data-view-component="true" class="Label Label--success Label--inline color-border-open-emphasis">Beta</span> <span data-view-component="true" class="js-was-this-translation-helpful color-fg-muted ml-1">Was this translation helpful?</span> <a href="#" data-view-component="true" class="js-give-feedback Link">Give feedback.</a> </p> </task-lists> <div class="d-block d-sm-flex flex-items-center mb-3 ml-3"> <div class="d-flex flex-1 flex-justify-between flex-items-center"> <div class="d-flex flex-items-center"> <div class="d-flex"> <div data-replace-remote-form-target> <div class="text-center discussion-vote-form position-relative" > <button aria-label="Upvote: 1" aria-disabled="true" id="discussion-upvote-button-DiscussionComment-5337827" type="button" data-view-component="true" class="social-reaction-summary-item js-upvote-button Link--secondary btn-invisible btn d-flex flex-items-center mx-auto"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-arrow-up m-0"> <path d="M3.47 7.78a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0l4.25 4.25a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018L9 4.81v7.44a.75.75 0 0 1-1.5 0V4.81L4.53 7.78a.75.75 0 0 1-1.06 0Z"></path> </svg> <span>1</span> </button> <tool-tip id="tooltip-3fe221ec-4d27-460a-b750-3cd1dd761da6" for="discussion-upvote-button-DiscussionComment-5337827" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">You must be logged in to vote</tool-tip> </div> </div> </div> <div class="reactions-container d-flex flex-items-start flex-row-reverse flex-justify-end d-md-flex ml-2 has-reactions" > <div class="js-reactions-container"> <div class=" js-comment-reactions-options d-flex flex-items-center flex-row flex-wrap"> <button name="input[content]" id="reactions--reaction_button_component-fa4cec" value="THUMBS_UP react" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>1</span> </button> <button name="input[content]" id="reactions--reaction_button_component-ed99f7" value="THUMBS_DOWN react" data-button-index-position="1" data-reaction-label="-1" data-reaction-content="-1" aria-pressed="false" type="submit" disabled="disabled" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button btn-link d-flex no-underline color-fg-muted flex-items-baseline"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>3</span> </button> </div> <details class="dropdown details-reset details-overlay d-inline-block js-all-reactions-popover" hidden> <summary aria-haspopup="true" data-view-component="true" class="Button--link Button--medium Button"> <span class="Button-content"> <span class="Button-label">All reactions</span> </span> </summary> <ul class="dropdown-menu dropdown-menu-se"> <li class="dropdown-item" aria-label="+1"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span>1</span> </li> <li class="dropdown-item" aria-label="-1"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span>3</span> </li> </ul> </details> </div> </div> </div> <div class="f6 mr-3"> <span class="color-fg-muted no-wrap" > 0 replies </span> </div> </div> </div> </div> </div> <div class="js-timeline-marker" data-child-comments id="child-comments-discussioncomment-5337827"> </div> </div> </div></div> </div> </div> </div> </div> <div class="js-timeline-marker js-socket-channel js-updatable-content" data-timeline-updated-at="2023-04-24 15:20:53 UTC" data-gid="MDEwOkRpc2N1c3Npb24zNTYzNjAy" data-url="/golang/go/discussions/48287/timeline?timeline_last_modified=2023-04-24+15%3A20%3A53+UTC" data-channel="eyJjIjoiZGlzY3Vzc2lvbjozNTYzNjAyOnRpbWVsaW5lIiwidCI6MTczMjQzNTEwNn0=--8e74802c219da9a43831e409b9c254747776bf28a356f3916bf72c055c41e39e" > </div> <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="d-none js-timeline-marker-form" data-turbo="false" action="/_graphql/MarkNotificationSubjectAsRead" accept-charset="UTF-8" data-remote="true" method="post"><input type="hidden" data-csrf="true" name="authenticity_token" value="OxpecEqr6mM9jAv0nTAOyvSeU4aUWjRO1mRqlk5QqGg4HELpWYGKIEz8jFUr/h45r826McVnxADQMfeMcZMZYg==" /> <input type="hidden" name="variables[subjectId]" value="MDEwOkRpc2N1c3Npb24zNTYzNjAy"> </form></div> </div> <span id="issue-comment-box"></span> <div class="discussion-timeline-actions"> <div data-view-component="true" class="flash flash-warn mt-3"> <a rel="nofollow" class="btn btn-primary" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;signed out comment&quot;,&quot;repository_id&quot;:23096959,&quot;auth_type&quot;:&quot;SIGN_UP&quot;,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="5b6cb7053321925f6aab40815706f9cafa0a0b8112722b5b91a9cd141d8017d0" href="/join?source=comment-repo">Sign up for free</a> <strong>to join this conversation on GitHub</strong>. Already have an account? <a rel="nofollow" class="Link--inTextBlock" data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;signed out comment&quot;,&quot;repository_id&quot;:23096959,&quot;auth_type&quot;:&quot;LOG_IN&quot;,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="5367bf394acbe7584e29ac668b3a9457413c2e57c49bd9a9202901cd08fa7993" data-test-selector="comments-sign-in-link" href="/login?return_to=https%3A%2F%2Fgithub.com%2Fgolang%2Fgo%2Fdiscussions%2F48287">Sign in to comment</a> </div> </div> </div> </div> <div id="partial-discussion-sidebar" class="flex-shrink-0 col-12 col-md-3 mt-3 mt-md-0 js-socket-channel js-updatable-content" data-channel="eyJjIjoiZGlzY3Vzc2lvbjozNTYzNjAyIiwidCI6MTczMjQzNTEwNX0=--b0b9ec9991531ad5791eb54667e0abf37006af380ac7eca512b0d8dce5420a3d" data-gid="MDEwOkRpc2N1c3Npb24zNTYzNjAy" data-url="/golang/go/discussions/48287/sidebar" data-project-hovercards-enabled> <div class="discussion-sidebar-item pt-0"> <div> <div> <div class="text-bold discussion-sidebar-heading"> Category </div> <a href="/golang/go/discussions/categories/discussions" class="Link--onHover d-flex flex-row flex-items-center text-small color-fg-default text-bold no-underline" > <div class="d-flex flex-justify-center flex-items-center bg-discussions-row-emoji-box-small rounded-2 flex-shrink-0 mr-2" aria-hidden="true"> <g-emoji alias="turtle" fallback-src="https://github.githubassets.com/assets/1f422-53fdcdddedc7.png" class="f5">🐢</g-emoji> </div> Discussions </a> </div> </div> </div> <div class="discussion-sidebar-item js-discussion-sidebar-item"> <div class="discussion-sidebar-heading text-bold"> Labels </div> <div class="d-flex flex-wrap"> None yet </div> </div> <div id="partial-users-participants" class="discussion-sidebar-item"> <div class="participation"> <div class="discussion-sidebar-heading text-bold"> 81 participants </div> <div class="participation-avatars d-flex flex-wrap" > <a class="participant-avatar" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:null,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="02d7cfd14e40a400d0fc2f2ec0c46ee8702545ae614b77c0a2286a0048813c0a" data-hovercard-type="user" data-hovercard-url="/users/rsc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/rsc"> <img src="https://avatars.githubusercontent.com/u/104030?s=48&amp;v=4" alt="@rsc" size="24" height="24" width="24" data-view-component="true" class="avatar circle" /> </a> <a class="participant-avatar" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:null,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="02d7cfd14e40a400d0fc2f2ec0c46ee8702545ae614b77c0a2286a0048813c0a" data-hovercard-type="user" data-hovercard-url="/users/unders/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/unders"> <img src="https://avatars.githubusercontent.com/u/2189?s=48&amp;v=4" alt="@unders" size="24" height="24" width="24" data-view-component="true" class="avatar circle" /> </a> <a class="participant-avatar" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:null,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="02d7cfd14e40a400d0fc2f2ec0c46ee8702545ae614b77c0a2286a0048813c0a" data-hovercard-type="user" data-hovercard-url="/users/dotwaffle/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/dotwaffle"> <img src="https://avatars.githubusercontent.com/u/17210?s=48&amp;v=4" alt="@dotwaffle" size="24" height="24" width="24" data-view-component="true" class="avatar circle" /> </a> <a class="participant-avatar" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:null,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="02d7cfd14e40a400d0fc2f2ec0c46ee8702545ae614b77c0a2286a0048813c0a" data-hovercard-type="user" data-hovercard-url="/users/apparentlymart/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/apparentlymart"> <img src="https://avatars.githubusercontent.com/u/20180?s=48&amp;v=4" alt="@apparentlymart" size="24" height="24" width="24" data-view-component="true" class="avatar circle" /> </a> <a class="participant-avatar" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:null,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="02d7cfd14e40a400d0fc2f2ec0c46ee8702545ae614b77c0a2286a0048813c0a" data-hovercard-type="user" data-hovercard-url="/users/cep21/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/cep21"> <img src="https://avatars.githubusercontent.com/u/20358?s=48&amp;v=4" alt="@cep21" size="24" height="24" width="24" data-view-component="true" class="avatar circle" /> </a> <a class="participant-avatar" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:null,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="02d7cfd14e40a400d0fc2f2ec0c46ee8702545ae614b77c0a2286a0048813c0a" data-hovercard-type="user" data-hovercard-url="/users/gbarr/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/gbarr"> <img src="https://avatars.githubusercontent.com/u/32673?s=48&amp;v=4" alt="@gbarr" size="24" height="24" width="24" data-view-component="true" class="avatar circle" /> </a> <a class="participant-avatar" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:null,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="02d7cfd14e40a400d0fc2f2ec0c46ee8702545ae614b77c0a2286a0048813c0a" data-hovercard-type="user" data-hovercard-url="/users/wolverian/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/wolverian"> <img src="https://avatars.githubusercontent.com/u/42124?s=48&amp;v=4" alt="@wolverian" size="24" height="24" width="24" data-view-component="true" class="avatar circle" /> </a> <a class="participant-avatar" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:null,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="02d7cfd14e40a400d0fc2f2ec0c46ee8702545ae614b77c0a2286a0048813c0a" data-hovercard-type="user" data-hovercard-url="/users/willfaught/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/willfaught"> <img src="https://avatars.githubusercontent.com/u/63830?s=48&amp;v=4" alt="@willfaught" size="24" height="24" width="24" data-view-component="true" class="avatar circle" /> </a> <a class="participant-avatar" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:null,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="02d7cfd14e40a400d0fc2f2ec0c46ee8702545ae614b77c0a2286a0048813c0a" data-hovercard-type="user" data-hovercard-url="/users/rogpeppe/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/rogpeppe"> <img src="https://avatars.githubusercontent.com/u/66491?s=48&amp;v=4" alt="@rogpeppe" size="24" height="24" width="24" data-view-component="true" class="avatar circle" /> </a> <a class="participant-avatar" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:null,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="02d7cfd14e40a400d0fc2f2ec0c46ee8702545ae614b77c0a2286a0048813c0a" data-hovercard-type="user" data-hovercard-url="/users/smyrman/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/smyrman"> <img src="https://avatars.githubusercontent.com/u/75205?s=48&amp;v=4" alt="@smyrman" size="24" height="24" width="24" data-view-component="true" class="avatar circle" /> </a> <a class="participant-avatar" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:null,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="02d7cfd14e40a400d0fc2f2ec0c46ee8702545ae614b77c0a2286a0048813c0a" data-hovercard-type="user" data-hovercard-url="/users/lunny/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/lunny"> <img src="https://avatars.githubusercontent.com/u/81045?s=48&amp;v=4" alt="@lunny" size="24" height="24" width="24" data-view-component="true" class="avatar circle" /> </a> <a class="participant-avatar" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:null,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="02d7cfd14e40a400d0fc2f2ec0c46ee8702545ae614b77c0a2286a0048813c0a" data-hovercard-type="user" data-hovercard-url="/users/narqo/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/narqo"> <img src="https://avatars.githubusercontent.com/u/88045?s=48&amp;v=4" alt="@narqo" size="24" height="24" width="24" data-view-component="true" class="avatar circle" /> </a> <a class="participant-avatar" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:null,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="02d7cfd14e40a400d0fc2f2ec0c46ee8702545ae614b77c0a2286a0048813c0a" data-hovercard-type="user" data-hovercard-url="/users/fsouza/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/fsouza"> <img src="https://avatars.githubusercontent.com/u/108725?s=48&amp;v=4" alt="@fsouza" size="24" height="24" width="24" data-view-component="true" class="avatar circle" /> </a> <a class="participant-avatar" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:null,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="02d7cfd14e40a400d0fc2f2ec0c46ee8702545ae614b77c0a2286a0048813c0a" data-hovercard-type="user" data-hovercard-url="/users/peterbourgon/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/peterbourgon"> <img src="https://avatars.githubusercontent.com/u/114509?s=48&amp;v=4" alt="@peterbourgon" size="24" height="24" width="24" data-view-component="true" class="avatar circle" /> </a> <a class="participant-avatar" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:null,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="02d7cfd14e40a400d0fc2f2ec0c46ee8702545ae614b77c0a2286a0048813c0a" data-hovercard-type="user" data-hovercard-url="/users/tux21b/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/tux21b"> <img src="https://avatars.githubusercontent.com/u/125986?s=48&amp;v=4" alt="@tux21b" size="24" height="24" width="24" data-view-component="true" class="avatar circle" /> </a> <a class="participant-avatar" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:null,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="02d7cfd14e40a400d0fc2f2ec0c46ee8702545ae614b77c0a2286a0048813c0a" data-hovercard-type="user" data-hovercard-url="/users/sfllaw/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/sfllaw"> <img src="https://avatars.githubusercontent.com/u/155692?s=48&amp;v=4" alt="@sfllaw" size="24" height="24" width="24" data-view-component="true" class="avatar circle" /> </a> <a class="participant-avatar" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:null,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="02d7cfd14e40a400d0fc2f2ec0c46ee8702545ae614b77c0a2286a0048813c0a" data-hovercard-type="user" data-hovercard-url="/users/seebs/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/seebs"> <img src="https://avatars.githubusercontent.com/u/166725?s=48&amp;v=4" alt="@seebs" size="24" height="24" width="24" data-view-component="true" class="avatar circle" /> </a> <a class="participant-avatar" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:null,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="02d7cfd14e40a400d0fc2f2ec0c46ee8702545ae614b77c0a2286a0048813c0a" data-hovercard-type="user" data-hovercard-url="/users/Laremere/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Laremere"> <img src="https://avatars.githubusercontent.com/u/202599?s=48&amp;v=4" alt="@Laremere" size="24" height="24" width="24" data-view-component="true" class="avatar circle" /> </a> <a class="participant-avatar" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:null,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="02d7cfd14e40a400d0fc2f2ec0c46ee8702545ae614b77c0a2286a0048813c0a" data-hovercard-type="user" data-hovercard-url="/users/earthboundkid/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/earthboundkid"> <img src="https://avatars.githubusercontent.com/u/222245?s=48&amp;v=4" alt="@earthboundkid" size="24" height="24" width="24" data-view-component="true" class="avatar circle" /> </a> <a class="participant-avatar" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:null,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="02d7cfd14e40a400d0fc2f2ec0c46ee8702545ae614b77c0a2286a0048813c0a" data-hovercard-type="user" data-hovercard-url="/users/perj/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/perj"> <img src="https://avatars.githubusercontent.com/u/224521?s=48&amp;v=4" alt="@perj" size="24" height="24" width="24" data-view-component="true" class="avatar circle" /> </a> <a class="participant-avatar" data-hydro-click="{&quot;event_type&quot;:&quot;discussions.click&quot;,&quot;payload&quot;:{&quot;event_context&quot;:&quot;DISCUSSION_VIEW&quot;,&quot;target&quot;:&quot;USER_PROFILE_LINK&quot;,&quot;current_repository_id&quot;:23096959,&quot;discussion_repository_id&quot;:23096959,&quot;org_level&quot;:false,&quot;discussion_id&quot;:3563602,&quot;discussion_comment_id&quot;:null,&quot;originating_url&quot;:&quot;https://github.com/golang/go/discussions/48287&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="02d7cfd14e40a400d0fc2f2ec0c46ee8702545ae614b77c0a2286a0048813c0a" data-hovercard-type="user" data-hovercard-url="/users/akavel/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/akavel"> <img src="https://avatars.githubusercontent.com/u/273837?s=48&amp;v=4" alt="@akavel" size="24" height="24" width="24" data-view-component="true" class="avatar circle" /> </a> <span class="participation-more">and others</span> </div> </div> </div> </div> <template class="js-discussions-markdown-toolbar-template"> <markdown-toolbar role="presentation" for="{{ textareaId }}" data-no-focus="true" data-view-component="true" class="CommentBox-toolbar"> <action-bar role="toolbar" data-view-component="true" class="ActionBar"> <div data-target="action-bar.itemContainer" data-view-component="true" class="ActionBar-item-container"> <div data-targets="action-bar.items" data-view-component="true" class="ActionBar-item"><button id="action-bar-b2b0ce47-ecb6-492e-814d-018b5f25c454" data-md-button="header-3" data-analytics-event="{&quot;category&quot;:&quot;comment_box&quot;,&quot;action&quot;:&quot;HEADING&quot;,&quot;label&quot;:null}" aria-labelledby="tooltip-c3c16661-650d-4b92-8b0e-48f6f507d84e" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-heading Button-visual"> <path d="M3.75 2a.75.75 0 0 1 .75.75V7h7V2.75a.75.75 0 0 1 1.5 0v10.5a.75.75 0 0 1-1.5 0V8.5h-7v4.75a.75.75 0 0 1-1.5 0V2.75A.75.75 0 0 1 3.75 2Z"></path> </svg> </button><tool-tip id="tooltip-c3c16661-650d-4b92-8b0e-48f6f507d84e" for="action-bar-b2b0ce47-ecb6-492e-814d-018b5f25c454" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Heading</tool-tip> </div> <div data-targets="action-bar.items" data-view-component="true" class="ActionBar-item"><button id="action-bar-d01d5233-a640-4137-bbcd-dfe649df03a5" data-md-button="bold" data-hotkey-scope="{{ textareaId }}" data-hotkey="Control+b" data-analytics-event="{&quot;category&quot;:&quot;comment_box&quot;,&quot;action&quot;:&quot;BOLD&quot;,&quot;label&quot;:null}" aria-labelledby="tooltip-f8534991-3be8-4a38-8562-23886ee44c33" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bold Button-visual"> <path d="M4 2h4.5a3.501 3.501 0 0 1 2.852 5.53A3.499 3.499 0 0 1 9.5 14H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Zm1 7v3h4.5a1.5 1.5 0 0 0 0-3Zm3.5-2a1.5 1.5 0 0 0 0-3H5v3Z"></path> </svg> </button><tool-tip id="tooltip-f8534991-3be8-4a38-8562-23886ee44c33" for="action-bar-d01d5233-a640-4137-bbcd-dfe649df03a5" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Bold</tool-tip> </div> <div data-targets="action-bar.items" data-view-component="true" class="ActionBar-item"><button id="action-bar-c4f1ae43-15ea-4a4f-8e3c-79231d00de6a" data-md-button="italic" data-hotkey-scope="{{ textareaId }}" data-hotkey="Control+i" data-analytics-event="{&quot;category&quot;:&quot;comment_box&quot;,&quot;action&quot;:&quot;ITALIC&quot;,&quot;label&quot;:null}" aria-labelledby="tooltip-34e7e4e1-f4bc-4083-9b7f-b11bc8f4b6b6" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-italic Button-visual"> <path d="M6 2.75A.75.75 0 0 1 6.75 2h6.5a.75.75 0 0 1 0 1.5h-2.505l-3.858 9H9.25a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1 0-1.5h2.505l3.858-9H6.75A.75.75 0 0 1 6 2.75Z"></path> </svg> </button><tool-tip id="tooltip-34e7e4e1-f4bc-4083-9b7f-b11bc8f4b6b6" for="action-bar-c4f1ae43-15ea-4a4f-8e3c-79231d00de6a" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Italic</tool-tip> </div> <div data-targets="action-bar.items" data-view-component="true" class="ActionBar-item"><button id="action-bar-46a700c8-b138-4dc0-96c0-972adaeec4ce" data-md-button="quote" data-hotkey-scope="{{ textareaId }}" data-hotkey="Control+Shift+&gt;" data-analytics-event="{&quot;category&quot;:&quot;comment_box&quot;,&quot;action&quot;:&quot;QUOTE&quot;,&quot;label&quot;:null}" aria-labelledby="tooltip-b078cec1-ad9b-4c8a-920f-fc95fea0fd4e" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-quote Button-visual"> <path d="M1.75 2.5h10.5a.75.75 0 0 1 0 1.5H1.75a.75.75 0 0 1 0-1.5Zm4 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5Zm0 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5ZM2.5 7.75v6a.75.75 0 0 1-1.5 0v-6a.75.75 0 0 1 1.5 0Z"></path> </svg> </button><tool-tip id="tooltip-b078cec1-ad9b-4c8a-920f-fc95fea0fd4e" for="action-bar-46a700c8-b138-4dc0-96c0-972adaeec4ce" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Quote</tool-tip> </div> <div data-targets="action-bar.items" data-view-component="true" class="ActionBar-item"><button id="action-bar-aba792e6-e51c-432a-af6f-784daaf89b59" data-md-button="code" data-hotkey-scope="{{ textareaId }}" data-hotkey="Control+e" data-analytics-event="{&quot;category&quot;:&quot;comment_box&quot;,&quot;action&quot;:&quot;CODE&quot;,&quot;label&quot;:null}" aria-labelledby="tooltip-5550afb5-e252-4458-bc17-d8f18c47184d" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code Button-visual"> <path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path> </svg> </button><tool-tip id="tooltip-5550afb5-e252-4458-bc17-d8f18c47184d" for="action-bar-aba792e6-e51c-432a-af6f-784daaf89b59" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Code</tool-tip> </div> <div data-targets="action-bar.items" data-view-component="true" class="ActionBar-item"><button id="action-bar-b52c0154-94fa-4739-a1c3-4725b37bac7e" data-md-button="link" data-hotkey-scope="{{ textareaId }}" data-hotkey="Control+k" data-analytics-event="{&quot;category&quot;:&quot;comment_box&quot;,&quot;action&quot;:&quot;LINK&quot;,&quot;label&quot;:null}" aria-labelledby="tooltip-4dd22375-a98f-4077-a3f8-4c4db469f29b" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link Button-visual"> <path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path> </svg> </button><tool-tip id="tooltip-4dd22375-a98f-4077-a3f8-4c4db469f29b" for="action-bar-b52c0154-94fa-4739-a1c3-4725b37bac7e" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Link</tool-tip> </div> <hr role="presentation" aria-hidden="true" data-targets="action-bar.items" data-view-component="true" class="ActionBar-item ActionBar-divider" /> <div data-targets="action-bar.items" data-view-component="true" class="ActionBar-item"><button id="action-bar-f10ac3f6-9cda-4624-9c01-037a772e66ba" data-md-button="ordered-list" data-hotkey-scope="{{ textareaId }}" data-hotkey="Control+Shift+&amp;" data-analytics-event="{&quot;category&quot;:&quot;comment_box&quot;,&quot;action&quot;:&quot;ORDERED_LIST&quot;,&quot;label&quot;:null}" aria-labelledby="tooltip-2ff670db-3b9e-43b9-aa5c-01f3a01dae37" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-list-ordered Button-visual"> <path d="M5 3.25a.75.75 0 0 1 .75-.75h8.5a.75.75 0 0 1 0 1.5h-8.5A.75.75 0 0 1 5 3.25Zm0 5a.75.75 0 0 1 .75-.75h8.5a.75.75 0 0 1 0 1.5h-8.5A.75.75 0 0 1 5 8.25Zm0 5a.75.75 0 0 1 .75-.75h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1-.75-.75ZM.924 10.32a.5.5 0 0 1-.851-.525l.001-.001.001-.002.002-.004.007-.011c.097-.144.215-.273.348-.384.228-.19.588-.392 1.068-.392.468 0 .858.181 1.126.484.259.294.377.673.377 1.038 0 .987-.686 1.495-1.156 1.845l-.047.035c-.303.225-.522.4-.654.597h1.357a.5.5 0 0 1 0 1H.5a.5.5 0 0 1-.5-.5c0-1.005.692-1.52 1.167-1.875l.035-.025c.531-.396.8-.625.8-1.078a.57.57 0 0 0-.128-.376C1.806 10.068 1.695 10 1.5 10a.658.658 0 0 0-.429.163.835.835 0 0 0-.144.153ZM2.003 2.5V6h.503a.5.5 0 0 1 0 1H.5a.5.5 0 0 1 0-1h.503V3.308l-.28.14a.5.5 0 0 1-.446-.895l1.003-.5a.5.5 0 0 1 .723.447Z"></path> </svg> </button><tool-tip id="tooltip-2ff670db-3b9e-43b9-aa5c-01f3a01dae37" for="action-bar-f10ac3f6-9cda-4624-9c01-037a772e66ba" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Numbered list</tool-tip> </div> <div data-targets="action-bar.items" data-view-component="true" class="ActionBar-item"><button id="action-bar-f220f809-230a-42c8-a22e-84cd91f45fe8" data-md-button="unordered-list" data-hotkey-scope="{{ textareaId }}" data-hotkey="Control+Shift+*" data-analytics-event="{&quot;category&quot;:&quot;comment_box&quot;,&quot;action&quot;:&quot;UNORDERED_LIST&quot;,&quot;label&quot;:null}" aria-labelledby="tooltip-5b84e8c9-bfb5-4193-b4c9-d2833b8700c9" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-list-unordered Button-visual"> <path d="M5.75 2.5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5Zm0 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5Zm0 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5ZM2 14a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM2 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path> </svg> </button><tool-tip id="tooltip-5b84e8c9-bfb5-4193-b4c9-d2833b8700c9" for="action-bar-f220f809-230a-42c8-a22e-84cd91f45fe8" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Unordered list</tool-tip> </div> <div data-targets="action-bar.items" data-view-component="true" class="ActionBar-item"><button id="action-bar-6ba4ecc7-ea2f-4297-8933-32d18372b179" data-md-button="task-list" data-hotkey-scope="{{ textareaId }}" data-hotkey="Control+Shift+L" data-analytics-event="{&quot;category&quot;:&quot;comment_box&quot;,&quot;action&quot;:&quot;TASK_LIST&quot;,&quot;label&quot;:null}" aria-labelledby="tooltip-6593614e-56e9-4c75-bca2-51dcb0e9dc42" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-tasklist Button-visual"> <path d="M2 2h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Zm4.655 8.595a.75.75 0 0 1 0 1.06L4.03 14.28a.75.75 0 0 1-1.06 0l-1.5-1.5a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l.97.97 2.095-2.095a.75.75 0 0 1 1.06 0ZM9.75 2.5h5.5a.75.75 0 0 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5Zm0 5h5.5a.75.75 0 0 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5Zm0 5h5.5a.75.75 0 0 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5Zm-7.25-9v3h3v-3Z"></path> </svg> </button><tool-tip id="tooltip-6593614e-56e9-4c75-bca2-51dcb0e9dc42" for="action-bar-6ba4ecc7-ea2f-4297-8933-32d18372b179" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Task list</tool-tip> </div> <hr role="presentation" aria-hidden="true" data-targets="action-bar.items" data-view-component="true" class="ActionBar-item ActionBar-divider" /> <div data-targets="action-bar.items" data-view-component="true" class="ActionBar-item"><button id="action-bar-86ac68c4-46bb-4170-ae4f-b9c9e7b0f352" data-analytics-event="{&quot;category&quot;:&quot;comment_box&quot;,&quot;action&quot;:&quot;ATTACH_FILES&quot;,&quot;label&quot;:null}" data-file-attachment-for="fc-{{ textareaId }}" aria-labelledby="tooltip-eb11f92d-1831-4c9d-832e-ae9df635c220" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-paperclip Button-visual"> <path d="M12.212 3.02a1.753 1.753 0 0 0-2.478.003l-5.83 5.83a3.007 3.007 0 0 0-.88 2.127c0 .795.315 1.551.88 2.116.567.567 1.333.89 2.126.89.79 0 1.548-.321 2.116-.89l5.48-5.48a.75.75 0 0 1 1.061 1.06l-5.48 5.48a4.492 4.492 0 0 1-3.177 1.33c-1.2 0-2.345-.487-3.187-1.33a4.483 4.483 0 0 1-1.32-3.177c0-1.195.475-2.341 1.32-3.186l5.83-5.83a3.25 3.25 0 0 1 5.553 2.297c0 .863-.343 1.691-.953 2.301L7.439 12.39c-.375.377-.884.59-1.416.593a1.998 1.998 0 0 1-1.412-.593 1.992 1.992 0 0 1 0-2.828l5.48-5.48a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-5.48 5.48a.492.492 0 0 0 0 .707.499.499 0 0 0 .352.154.51.51 0 0 0 .356-.154l5.833-5.827a1.755 1.755 0 0 0 0-2.481Z"></path> </svg> </button><tool-tip id="tooltip-eb11f92d-1831-4c9d-832e-ae9df635c220" for="action-bar-86ac68c4-46bb-4170-ae4f-b9c9e7b0f352" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Attach files</tool-tip> </div> <div data-targets="action-bar.items" data-view-component="true" class="ActionBar-item"><button id="action-bar-f5c06d86-6923-4f44-acfc-94df889edaf8" data-md-button="mention" data-analytics-event="{&quot;category&quot;:&quot;comment_box&quot;,&quot;action&quot;:&quot;MENTION&quot;,&quot;label&quot;:null}" aria-labelledby="tooltip-0288860c-10e4-4b1c-b54f-6786c8b8e796" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-mention Button-visual"> <path d="M4.75 2.37a6.501 6.501 0 0 0 6.5 11.26.75.75 0 0 1 .75 1.298A7.999 7.999 0 0 1 .989 4.148 8 8 0 0 1 16 7.75v1.5a2.75 2.75 0 0 1-5.072 1.475 3.999 3.999 0 0 1-6.65-4.19A4 4 0 0 1 12 8v1.25a1.25 1.25 0 0 0 2.5 0V7.867a6.5 6.5 0 0 0-9.75-5.496ZM10.5 8a2.5 2.5 0 1 0-5 0 2.5 2.5 0 0 0 5 0Z"></path> </svg> </button><tool-tip id="tooltip-0288860c-10e4-4b1c-b54f-6786c8b8e796" for="action-bar-f5c06d86-6923-4f44-acfc-94df889edaf8" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Mention</tool-tip> </div> <div data-targets="action-bar.items" data-view-component="true" class="ActionBar-item"><button id="action-bar-d8cd4fb8-7830-406b-9d4d-e2a6de910202" data-md-button="ref" data-analytics-event="{&quot;category&quot;:&quot;comment_box&quot;,&quot;action&quot;:&quot;REFERENCE&quot;,&quot;label&quot;:null}" aria-labelledby="tooltip-10941a3d-d859-4fec-a84a-d209566b4b8d" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-cross-reference Button-visual"> <path d="M2.75 3.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h4.5a.25.25 0 0 0 .25-.25v-2.5a.75.75 0 0 1 1.5 0v2.5A1.75 1.75 0 0 1 13.25 13H9.06l-2.573 2.573A1.458 1.458 0 0 1 4 14.543V13H2.75A1.75 1.75 0 0 1 1 11.25v-7.5C1 2.784 1.784 2 2.75 2h5.5a.75.75 0 0 1 0 1.5ZM16 1.25v4.146a.25.25 0 0 1-.427.177L14.03 4.03l-3.75 3.75a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l3.75-3.75-1.543-1.543A.25.25 0 0 1 11.604 1h4.146a.25.25 0 0 1 .25.25Z"></path> </svg> </button><tool-tip id="tooltip-10941a3d-d859-4fec-a84a-d209566b4b8d" for="action-bar-d8cd4fb8-7830-406b-9d4d-e2a6de910202" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Reference</tool-tip> </div> </div> <action-menu data-target="action-bar.moreMenu" hidden="hidden" data-select-variant="none" data-view-component="true" class="ActionBar-more-menu"> <focus-group direction="vertical" mnemonics retain> <button id="action-bar-319e02c0-4a71-45e6-a66a-7c56a9e4c323-button" popovertarget="action-bar-319e02c0-4a71-45e6-a66a-7c56a9e4c323-overlay" aria-controls="action-bar-319e02c0-4a71-45e6-a66a-7c56a9e4c323-list" aria-haspopup="true" aria-labelledby="tooltip-59790e87-1bfb-4ec6-b852-86ad2a599844" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal Button-visual"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path> </svg> </button><tool-tip id="tooltip-59790e87-1bfb-4ec6-b852-86ad2a599844" for="action-bar-319e02c0-4a71-45e6-a66a-7c56a9e4c323-button" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Menu</tool-tip> <anchored-position id="action-bar-319e02c0-4a71-45e6-a66a-7c56a9e4c323-overlay" anchor="action-bar-319e02c0-4a71-45e6-a66a-7c56a9e4c323-button" align="end" side="outside-bottom" anchor-offset="normal" popover="auto" data-view-component="true"> <div data-view-component="true" class="Overlay Overlay--size-auto"> <div data-view-component="true" class="Overlay-body Overlay-body--paddingNone"> <action-list> <div data-view-component="true"> <ul aria-labelledby="action-bar-319e02c0-4a71-45e6-a66a-7c56a9e4c323-button" id="action-bar-319e02c0-4a71-45e6-a66a-7c56a9e4c323-list" role="menu" data-view-component="true" class="ActionListWrap--inset ActionListWrap"> <li value="" hidden="hidden" data-for="action-bar-b2b0ce47-ecb6-492e-814d-018b5f25c454" data-action="click:action-bar#menuItemClick" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <button tabindex="-1" id="item-484986ad-055e-4a94-89e1-b7a85c057b6c" type="button" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-heading"> <path d="M3.75 2a.75.75 0 0 1 .75.75V7h7V2.75a.75.75 0 0 1 1.5 0v10.5a.75.75 0 0 1-1.5 0V8.5h-7v4.75a.75.75 0 0 1-1.5 0V2.75A.75.75 0 0 1 3.75 2Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Heading </span> </button> </li> <li value="" hidden="hidden" data-for="action-bar-d01d5233-a640-4137-bbcd-dfe649df03a5" data-action="click:action-bar#menuItemClick" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <button tabindex="-1" id="item-31f1b21a-5f74-4b13-941b-d21d1e4b913b" type="button" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bold"> <path d="M4 2h4.5a3.501 3.501 0 0 1 2.852 5.53A3.499 3.499 0 0 1 9.5 14H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Zm1 7v3h4.5a1.5 1.5 0 0 0 0-3Zm3.5-2a1.5 1.5 0 0 0 0-3H5v3Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Bold </span> </button> </li> <li value="" hidden="hidden" data-for="action-bar-c4f1ae43-15ea-4a4f-8e3c-79231d00de6a" data-action="click:action-bar#menuItemClick" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <button tabindex="-1" id="item-8dc47c58-f14f-4ffb-98c9-fd5406c5f2a4" type="button" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-italic"> <path d="M6 2.75A.75.75 0 0 1 6.75 2h6.5a.75.75 0 0 1 0 1.5h-2.505l-3.858 9H9.25a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1 0-1.5h2.505l3.858-9H6.75A.75.75 0 0 1 6 2.75Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Italic </span> </button> </li> <li value="" hidden="hidden" data-for="action-bar-46a700c8-b138-4dc0-96c0-972adaeec4ce" data-action="click:action-bar#menuItemClick" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <button tabindex="-1" id="item-5a13e7d2-acb8-4458-b1ab-6d8e82ce253f" type="button" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-quote"> <path d="M1.75 2.5h10.5a.75.75 0 0 1 0 1.5H1.75a.75.75 0 0 1 0-1.5Zm4 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5Zm0 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5ZM2.5 7.75v6a.75.75 0 0 1-1.5 0v-6a.75.75 0 0 1 1.5 0Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Quote </span> </button> </li> <li value="" hidden="hidden" data-for="action-bar-aba792e6-e51c-432a-af6f-784daaf89b59" data-action="click:action-bar#menuItemClick" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <button tabindex="-1" id="item-a812fc61-7f03-4564-a05d-5425cb3d738f" type="button" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code"> <path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Code </span> </button> </li> <li value="" hidden="hidden" data-for="action-bar-b52c0154-94fa-4739-a1c3-4725b37bac7e" data-action="click:action-bar#menuItemClick" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <button tabindex="-1" id="item-5d2c8be9-7008-43af-b45a-a2363eda92fb" type="button" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link"> <path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Link </span> </button> </li> <li hidden="hidden" role="presentation" aria-hidden="true" data-view-component="true" class="ActionList-sectionDivider"></li> <li value="" hidden="hidden" data-for="action-bar-f10ac3f6-9cda-4624-9c01-037a772e66ba" data-action="click:action-bar#menuItemClick" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <button tabindex="-1" id="item-5e989026-04a6-40e3-8823-25f771d35399" type="button" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-list-ordered"> <path d="M5 3.25a.75.75 0 0 1 .75-.75h8.5a.75.75 0 0 1 0 1.5h-8.5A.75.75 0 0 1 5 3.25Zm0 5a.75.75 0 0 1 .75-.75h8.5a.75.75 0 0 1 0 1.5h-8.5A.75.75 0 0 1 5 8.25Zm0 5a.75.75 0 0 1 .75-.75h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1-.75-.75ZM.924 10.32a.5.5 0 0 1-.851-.525l.001-.001.001-.002.002-.004.007-.011c.097-.144.215-.273.348-.384.228-.19.588-.392 1.068-.392.468 0 .858.181 1.126.484.259.294.377.673.377 1.038 0 .987-.686 1.495-1.156 1.845l-.047.035c-.303.225-.522.4-.654.597h1.357a.5.5 0 0 1 0 1H.5a.5.5 0 0 1-.5-.5c0-1.005.692-1.52 1.167-1.875l.035-.025c.531-.396.8-.625.8-1.078a.57.57 0 0 0-.128-.376C1.806 10.068 1.695 10 1.5 10a.658.658 0 0 0-.429.163.835.835 0 0 0-.144.153ZM2.003 2.5V6h.503a.5.5 0 0 1 0 1H.5a.5.5 0 0 1 0-1h.503V3.308l-.28.14a.5.5 0 0 1-.446-.895l1.003-.5a.5.5 0 0 1 .723.447Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Numbered list </span> </button> </li> <li value="" hidden="hidden" data-for="action-bar-f220f809-230a-42c8-a22e-84cd91f45fe8" data-action="click:action-bar#menuItemClick" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <button tabindex="-1" id="item-d51030d3-6346-416d-9a03-f020a6ac1508" type="button" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-list-unordered"> <path d="M5.75 2.5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5Zm0 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5Zm0 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5ZM2 14a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM2 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Unordered list </span> </button> </li> <li value="" hidden="hidden" data-for="action-bar-6ba4ecc7-ea2f-4297-8933-32d18372b179" data-action="click:action-bar#menuItemClick" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <button tabindex="-1" id="item-c401b891-6e27-4651-8f9b-900358497df9" type="button" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-tasklist"> <path d="M2 2h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Zm4.655 8.595a.75.75 0 0 1 0 1.06L4.03 14.28a.75.75 0 0 1-1.06 0l-1.5-1.5a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l.97.97 2.095-2.095a.75.75 0 0 1 1.06 0ZM9.75 2.5h5.5a.75.75 0 0 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5Zm0 5h5.5a.75.75 0 0 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5Zm0 5h5.5a.75.75 0 0 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5Zm-7.25-9v3h3v-3Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Task list </span> </button> </li> <li hidden="hidden" role="presentation" aria-hidden="true" data-view-component="true" class="ActionList-sectionDivider"></li> <li value="" hidden="hidden" data-for="action-bar-86ac68c4-46bb-4170-ae4f-b9c9e7b0f352" data-action="click:action-bar#menuItemClick" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <button tabindex="-1" id="item-71b5a825-c292-4710-a375-b995c0d3d9af" type="button" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-paperclip"> <path d="M12.212 3.02a1.753 1.753 0 0 0-2.478.003l-5.83 5.83a3.007 3.007 0 0 0-.88 2.127c0 .795.315 1.551.88 2.116.567.567 1.333.89 2.126.89.79 0 1.548-.321 2.116-.89l5.48-5.48a.75.75 0 0 1 1.061 1.06l-5.48 5.48a4.492 4.492 0 0 1-3.177 1.33c-1.2 0-2.345-.487-3.187-1.33a4.483 4.483 0 0 1-1.32-3.177c0-1.195.475-2.341 1.32-3.186l5.83-5.83a3.25 3.25 0 0 1 5.553 2.297c0 .863-.343 1.691-.953 2.301L7.439 12.39c-.375.377-.884.59-1.416.593a1.998 1.998 0 0 1-1.412-.593 1.992 1.992 0 0 1 0-2.828l5.48-5.48a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-5.48 5.48a.492.492 0 0 0 0 .707.499.499 0 0 0 .352.154.51.51 0 0 0 .356-.154l5.833-5.827a1.755 1.755 0 0 0 0-2.481Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Attach files </span> </button> </li> <li value="" hidden="hidden" data-for="action-bar-f5c06d86-6923-4f44-acfc-94df889edaf8" data-action="click:action-bar#menuItemClick" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <button tabindex="-1" id="item-9a77f661-0206-4efb-9ef4-3d4143497c58" type="button" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-mention"> <path d="M4.75 2.37a6.501 6.501 0 0 0 6.5 11.26.75.75 0 0 1 .75 1.298A7.999 7.999 0 0 1 .989 4.148 8 8 0 0 1 16 7.75v1.5a2.75 2.75 0 0 1-5.072 1.475 3.999 3.999 0 0 1-6.65-4.19A4 4 0 0 1 12 8v1.25a1.25 1.25 0 0 0 2.5 0V7.867a6.5 6.5 0 0 0-9.75-5.496ZM10.5 8a2.5 2.5 0 1 0-5 0 2.5 2.5 0 0 0 5 0Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Mention </span> </button> </li> <li value="" hidden="hidden" data-for="action-bar-d8cd4fb8-7830-406b-9d4d-e2a6de910202" data-action="click:action-bar#menuItemClick" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <button tabindex="-1" id="item-4aa426db-291c-481c-bbe1-b0ee7baf3569" type="button" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-cross-reference"> <path d="M2.75 3.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h4.5a.25.25 0 0 0 .25-.25v-2.5a.75.75 0 0 1 1.5 0v2.5A1.75 1.75 0 0 1 13.25 13H9.06l-2.573 2.573A1.458 1.458 0 0 1 4 14.543V13H2.75A1.75 1.75 0 0 1 1 11.25v-7.5C1 2.784 1.784 2 2.75 2h5.5a.75.75 0 0 1 0 1.5ZM16 1.25v4.146a.25.25 0 0 1-.427.177L14.03 4.03l-3.75 3.75a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l3.75-3.75-1.543-1.543A.25.25 0 0 1 11.604 1h4.146a.25.25 0 0 1 .25.25Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-label"> Reference </span> </button> </li> </ul> </div></action-list> </div> </div></anchored-position> </focus-group> </action-menu></action-bar></markdown-toolbar> <dialog-helper> <dialog id="saved_replies_menu_{{ textareaId }}-dialog" aria-modal="true" aria-labelledby="saved_replies_menu_{{ textareaId }}-dialog-title" aria-describedby="saved_replies_menu_{{ textareaId }}-dialog-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--placement-bottom-whenNarrow js-saved-reply-container Overlay--disableScroll"> <div data-view-component="true" class="Overlay-header"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 class="Overlay-title " id="saved_replies_menu_{{ textareaId }}-dialog-title"> Select a reply </h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="saved_replies_menu_{{ textareaId }}-dialog" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg></button> </div> </div> </div> <scrollable-region data-labelled-by="saved_replies_menu_{{ textareaId }}-dialog-title"> <div data-view-component="true" class="Overlay-body"> <include-fragment class="js-saved-reply-include-fragment" role="menuitem" aria-label="Loading" src="/settings/replies?context=none" loading="lazy"> <span data-view-component="true"> <svg style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" aria-hidden="true" data-view-component="true" class="my-6 mx-auto d-block anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" fill="none" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /> </svg> <span class="sr-only">Loading</span> </span> </include-fragment> </div> </scrollable-region> <div data-view-component="true" class="Overlay-footer Overlay-footer--alignEnd Overlay-footer--divided"> <a href="/settings/replies?return_to=1" data-view-component="true" class="Button--invisible Button--medium Button Button--fullWidth"> <span class="Button-content Button-content--alignStart"> <span class="Button-visual Button-leadingVisual"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-plus"> <path d="M7.75 2a.75.75 0 0 1 .75.75V7h4.25a.75.75 0 0 1 0 1.5H8.5v4.25a.75.75 0 0 1-1.5 0V8.5H2.75a.75.75 0 0 1 0-1.5H7V2.75A.75.75 0 0 1 7.75 2Z"></path> </svg> </span> <span class="Button-label">Create a new saved reply</span> </span> </a> </div> </dialog></dialog-helper> </template> <template id="emoji-reaction-button-template-+1"> <button name="input[content]" id="reactions--reaction_button_component-62c5d7" value="THUMBS_UP unreact" data-button-index-position="0" data-reaction-label="+1" data-reaction-content="+1" aria-pressed="true" type="submit" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button user-has-reacted btn-link d-flex no-underline flex-items-baseline"> <g-emoji alias="+1" fallback-src="https://github.githubassets.com/assets/1f44d-41cb66fe1e22.png" class="social-button-emoji">👍</g-emoji> <span class="js-discussion-reaction-group-count">1</span> </button> <tool-tip id="tooltip-d67457ea-4187-4677-b95d-7bb05b6ebdd2" for="reactions--reaction_button_component-62c5d7" popover="manual" data-direction="n" data-type="description" data-view-component="true" class="sr-only position-absolute"> reacted with thumbs up emoji</tool-tip> </template> <template id="emoji-reaction-button-template--1"> <button name="input[content]" id="reactions--reaction_button_component-df15b5" value="THUMBS_DOWN unreact" data-button-index-position="1" data-reaction-label="-1" data-reaction-content="-1" aria-pressed="true" type="submit" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button user-has-reacted btn-link d-flex no-underline flex-items-baseline"> <g-emoji alias="-1" fallback-src="https://github.githubassets.com/assets/1f44e-ce91733aae25.png" class="social-button-emoji">👎</g-emoji> <span class="js-discussion-reaction-group-count">1</span> </button> <tool-tip id="tooltip-d9cc3110-88b0-4e72-8cf0-c7637b6564b2" for="reactions--reaction_button_component-df15b5" popover="manual" data-direction="n" data-type="description" data-view-component="true" class="sr-only position-absolute"> reacted with thumbs down emoji</tool-tip> </template> <template id="emoji-reaction-button-template-smile"> <button name="input[content]" id="reactions--reaction_button_component-b2317d" value="LAUGH unreact" data-button-index-position="2" data-reaction-label="Laugh" data-reaction-content="smile" aria-pressed="true" type="submit" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button user-has-reacted btn-link d-flex no-underline flex-items-baseline"> <g-emoji alias="smile" fallback-src="https://github.githubassets.com/assets/1f604-7528822fb4c5.png" class="social-button-emoji">😄</g-emoji> <span class="js-discussion-reaction-group-count">1</span> </button> <tool-tip id="tooltip-93de1906-cb5b-4a9c-9e27-5c2dae709541" for="reactions--reaction_button_component-b2317d" popover="manual" data-direction="n" data-type="description" data-view-component="true" class="sr-only position-absolute"> reacted with laugh emoji</tool-tip> </template> <template id="emoji-reaction-button-template-tada"> <button name="input[content]" id="reactions--reaction_button_component-12181d" value="HOORAY unreact" data-button-index-position="3" data-reaction-label="Hooray" data-reaction-content="tada" aria-pressed="true" type="submit" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button user-has-reacted btn-link d-flex no-underline flex-items-baseline"> <g-emoji alias="tada" fallback-src="https://github.githubassets.com/assets/1f389-36899a2cb781.png" class="social-button-emoji">🎉</g-emoji> <span class="js-discussion-reaction-group-count">1</span> </button> <tool-tip id="tooltip-1745e550-4d65-4518-a1c0-5deae418c370" for="reactions--reaction_button_component-12181d" popover="manual" data-direction="n" data-type="description" data-view-component="true" class="sr-only position-absolute"> reacted with hooray emoji</tool-tip> </template> <template id="emoji-reaction-button-template-thinking_face"> <button name="input[content]" id="reactions--reaction_button_component-8edb08" value="CONFUSED unreact" data-button-index-position="4" data-reaction-label="Confused" data-reaction-content="thinking_face" aria-pressed="true" type="submit" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button user-has-reacted btn-link d-flex no-underline flex-items-baseline"> <g-emoji alias="thinking_face" fallback-src="https://github.githubassets.com/assets/1f615-4bb1369c4251.png" class="social-button-emoji">😕</g-emoji> <span class="js-discussion-reaction-group-count">1</span> </button> <tool-tip id="tooltip-8972b70b-2556-4ce5-ab59-8ac10ca3ad49" for="reactions--reaction_button_component-8edb08" popover="manual" data-direction="n" data-type="description" data-view-component="true" class="sr-only position-absolute"> reacted with confused emoji</tool-tip> </template> <template id="emoji-reaction-button-template-heart"> <button name="input[content]" id="reactions--reaction_button_component-00ea81" value="HEART unreact" data-button-index-position="5" data-reaction-label="Heart" data-reaction-content="heart" aria-pressed="true" type="submit" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button user-has-reacted btn-link d-flex no-underline flex-items-baseline"> <g-emoji alias="heart" fallback-src="https://github.githubassets.com/assets/2764-982dc91ea48a.png" class="social-button-emoji">❤️</g-emoji> <span class="js-discussion-reaction-group-count">1</span> </button> <tool-tip id="tooltip-a2abf510-c7f0-4686-b8ed-8ba047bbe1ec" for="reactions--reaction_button_component-00ea81" popover="manual" data-direction="n" data-type="description" data-view-component="true" class="sr-only position-absolute"> reacted with heart emoji</tool-tip> </template> <template id="emoji-reaction-button-template-rocket"> <button name="input[content]" id="reactions--reaction_button_component-d5919d" value="ROCKET unreact" data-button-index-position="6" data-reaction-label="Rocket" data-reaction-content="rocket" aria-pressed="true" type="submit" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button user-has-reacted btn-link d-flex no-underline flex-items-baseline"> <g-emoji alias="rocket" fallback-src="https://github.githubassets.com/assets/1f680-d0ef47fdb515.png" class="social-button-emoji">🚀</g-emoji> <span class="js-discussion-reaction-group-count">1</span> </button> <tool-tip id="tooltip-204dcec7-d4ab-496e-b263-af28b7b6b273" for="reactions--reaction_button_component-d5919d" popover="manual" data-direction="n" data-type="description" data-view-component="true" class="sr-only position-absolute"> reacted with rocket emoji</tool-tip> </template> <template id="emoji-reaction-button-template-eyes"> <button name="input[content]" id="reactions--reaction_button_component-cb21be" value="EYES unreact" data-button-index-position="7" data-reaction-label="Eyes" data-reaction-content="eyes" aria-pressed="true" type="submit" data-view-component="true" class="social-reaction-summary-item js-reaction-group-button user-has-reacted btn-link d-flex no-underline flex-items-baseline"> <g-emoji alias="eyes" fallback-src="https://github.githubassets.com/assets/1f440-ee44e91e92a7.png" class="social-button-emoji">👀</g-emoji> <span class="js-discussion-reaction-group-count">1</span> </button> <tool-tip id="tooltip-406bfbfb-9c91-4b89-8054-07e7da5b540b" for="reactions--reaction_button_component-cb21be" popover="manual" data-direction="n" data-type="description" data-view-component="true" class="sr-only position-absolute"> reacted with eyes emoji</tool-tip> </template> </div> </div> </div> </turbo-frame> </main> </div> </div> <footer class="footer pt-8 pb-6 f6 color-fg-muted p-responsive" role="contentinfo" > <h2 class='sr-only'>Footer</h2> <div class="d-flex flex-justify-center flex-items-center flex-column-reverse flex-lg-row flex-wrap flex-lg-nowrap"> <div class="d-flex flex-items-center flex-shrink-0 mx-2"> <a aria-label="Homepage" title="GitHub" class="footer-octicon mr-2" href="https://github.com"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-mark-github"> <path d="M12.5.75C6.146.75 1 5.896 1 12.25c0 5.089 3.292 9.387 7.863 10.91.575.101.79-.244.79-.546 0-.273-.014-1.178-.014-2.142-2.889.532-3.636-.704-3.866-1.35-.13-.331-.69-1.352-1.18-1.625-.402-.216-.977-.748-.014-.762.906-.014 1.553.834 1.769 1.179 1.035 1.74 2.688 1.25 3.349.948.1-.747.402-1.25.733-1.538-2.559-.287-5.232-1.279-5.232-5.678 0-1.25.445-2.285 1.178-3.09-.115-.288-.517-1.467.115-3.048 0 0 .963-.302 3.163 1.179.92-.259 1.897-.388 2.875-.388.977 0 1.955.13 2.875.388 2.2-1.495 3.162-1.179 3.162-1.179.633 1.581.23 2.76.115 3.048.733.805 1.179 1.825 1.179 3.09 0 4.413-2.688 5.39-5.247 5.678.417.36.776 1.05.776 2.128 0 1.538-.014 2.774-.014 3.162 0 .302.216.662.79.547C20.709 21.637 24 17.324 24 12.25 24 5.896 18.854.75 12.5.75Z"></path> </svg> </a> <span> &copy; 2024 GitHub,&nbsp;Inc. </span> </div> <nav aria-label="Footer"> <h3 class="sr-only" id="sr-footer-heading">Footer navigation</h3> <ul class="list-style-none d-flex flex-justify-center flex-wrap mb-2 mb-lg-0" aria-labelledby="sr-footer-heading"> <li class="mx-2"> <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to Terms&quot;,&quot;label&quot;:&quot;text:terms&quot;}" href="https://docs.github.com/site-policy/github-terms/github-terms-of-service" data-view-component="true" class="Link--secondary Link">Terms</a> </li> <li class="mx-2"> <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to privacy&quot;,&quot;label&quot;:&quot;text:privacy&quot;}" href="https://docs.github.com/site-policy/privacy-policies/github-privacy-statement" data-view-component="true" class="Link--secondary Link">Privacy</a> </li> <li class="mx-2"> <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to security&quot;,&quot;label&quot;:&quot;text:security&quot;}" href="https://github.com/security" data-view-component="true" class="Link--secondary Link">Security</a> </li> <li class="mx-2"> <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to status&quot;,&quot;label&quot;:&quot;text:status&quot;}" href="https://www.githubstatus.com/" data-view-component="true" class="Link--secondary Link">Status</a> </li> <li class="mx-2"> <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to docs&quot;,&quot;label&quot;:&quot;text:docs&quot;}" href="https://docs.github.com/" data-view-component="true" class="Link--secondary Link">Docs</a> </li> <li class="mx-2"> <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to contact&quot;,&quot;label&quot;:&quot;text:contact&quot;}" href="https://support.github.com?tags=dotcom-footer" data-view-component="true" class="Link--secondary Link">Contact</a> </li> <li class="mx-2" > <cookie-consent-link> <button type="button" class="Link--secondary underline-on-hover border-0 p-0 color-bg-transparent" data-action="click:cookie-consent-link#showConsentManagement" data-analytics-event="{&quot;location&quot;:&quot;footer&quot;,&quot;action&quot;:&quot;cookies&quot;,&quot;context&quot;:&quot;subfooter&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;cookies_link_subfooter_footer&quot;}" > Manage cookies </button> </cookie-consent-link> </li> <li class="mx-2"> <cookie-consent-link> <button type="button" class="Link--secondary underline-on-hover border-0 p-0 color-bg-transparent" data-action="click:cookie-consent-link#showConsentManagement" data-analytics-event="{&quot;location&quot;:&quot;footer&quot;,&quot;action&quot;:&quot;dont_share_info&quot;,&quot;context&quot;:&quot;subfooter&quot;,&quot;tag&quot;:&quot;link&quot;,&quot;label&quot;:&quot;dont_share_info_link_subfooter_footer&quot;}" > Do not share my personal information </button> </cookie-consent-link> </li> </ul> </nav> </div> </footer> <ghcc-consent id="ghcc" class="position-fixed bottom-0 left-0" style="z-index: 999999" data-initial-cookie-consent-allowed="" data-cookie-consent-required="false"></ghcc-consent> <div id="ajax-error-message" class="ajax-error-message flash flash-error" hidden> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path> </svg> <button type="button" class="flash-close js-ajax-error-dismiss" aria-label="Dismiss error"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg> </button> You can’t perform that action at this time. </div> <template id="site-details-dialog"> <details class="details-reset details-overlay details-overlay-dark lh-default color-fg-default hx_rsm" open> <summary role="button" aria-label="Close dialog"></summary> <details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast hx_rsm-dialog hx_rsm-modal"> <button class="Box-btn-octicon m-0 btn-octicon position-absolute right-0 top-0" type="button" aria-label="Close dialog" data-close-dialog> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path> </svg> </button> <div class="octocat-spinner my-6 js-details-dialog-spinner"></div> </details-dialog> </details> </template> <div class="Popover js-hovercard-content position-absolute" style="display: none; outline: none;"> <div class="Popover-message Popover-message--bottom-left Popover-message--large Box color-shadow-large" style="width:360px;"> </div> </div> <template id="snippet-clipboard-copy-button"> <div class="zeroclipboard-container position-absolute right-0 top-0"> <clipboard-copy aria-label="Copy" class="ClipboardButton btn js-clipboard-copy m-2 p-0" data-copy-feedback="Copied!" data-tooltip-direction="w"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy js-clipboard-copy-icon m-2"> <path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path> </svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check js-clipboard-check-icon color-fg-success d-none m-2"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path> </svg> </clipboard-copy> </div> </template> <template id="snippet-clipboard-copy-button-unpositioned"> <div class="zeroclipboard-container"> <clipboard-copy aria-label="Copy" class="ClipboardButton btn btn-invisible js-clipboard-copy m-2 p-0 d-flex flex-justify-center flex-items-center" data-copy-feedback="Copied!" data-tooltip-direction="w"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy js-clipboard-copy-icon"> <path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path> </svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check js-clipboard-check-icon color-fg-success d-none"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path> </svg> </clipboard-copy> </div> </template> </div> <div id="js-global-screen-reader-notice" class="sr-only mt-n1" aria-live="polite" aria-atomic="true" ></div> <div id="js-global-screen-reader-notice-assertive" class="sr-only mt-n1" aria-live="assertive" aria-atomic="true"></div> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10