{"id":453410,"date":"2022-07-21T11:20:56","date_gmt":"2022-07-21T09:20:56","guid":{"rendered":"https:\/\/mybroadband.co.za\/news\/?p=453410"},"modified":"2022-07-22T07:27:43","modified_gmt":"2022-07-22T05:27:43","slug":"googles-carbon-programming-language-aims-to-replace-c","status":"publish","type":"post","link":"https:\/\/mybroadband.co.za\/news\/software\/453410-googles-carbon-programming-language-aims-to-replace-c.html","title":{"rendered":"Google&#8217;s Carbon programming language aims to replace C++"},"content":{"rendered":"<p>Google unveiled a new programming language called Carbon on Tuesday, 19 July 2022, which it said is an experimental replacement for C++.<\/p>\n<p>9to5Google <strong><a href=\"https:\/\/9to5google.com\/2022\/07\/19\/carbon-programming-language-google-cpp\/\" target=\"_blank\" rel=\"noopener\">reported<\/a> <\/strong>that Google principal software engineer Chandler Carruth announced Carbon during the Cpp North convention in Toronto.<\/p>\n<p>Carruth said that although many may suggest that Rust is a successor to C++, it lacks the level of &#8220;bi-directional interoperability&#8221; that Carbon offers.<\/p>\n<p>He said Carbon is intended to be fully interoperable with existing C++ code, adding that the goal is to make the transition from C++ to Carbon as easy as possible.<\/p>\n<p>&#8220;If Rust works for you today, you should use it. But moving a C++ ecosystem to Rust is hard,&#8221; said Carruth.<\/p>\n<p>Conor Hoekstra, a convention attendee, <strong><a href=\"https:\/\/twitter.com\/code_report\/status\/1549383435642445824?s=20&amp;t=oVWTp7o3eGb-sOM2_Cvo8w\" target=\"_blank\" rel=\"noopener\">posted<\/a><\/strong> Carruth&#8217;s slides on Twitter.<\/p>\n<div id=\"attachment_453416\" style=\"width: 810px\" class=\"wp-caption aligncenter\"><a  data-lightbox=\"post-image\" href=\"https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2022\/07\/Chandler-Carruth.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-453416\" class=\"size-full wp-image-453416\" src=\"https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2022\/07\/Chandler-Carruth.jpg\" alt=\"\" width=\"800\" height=\"533\" srcset=\"https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2022\/07\/Chandler-Carruth.jpg 800w, https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2022\/07\/Chandler-Carruth-600x400.jpg 600w, https:\/\/mybroadband.co.za\/news\/wp-content\/uploads\/2022\/07\/Chandler-Carruth-768x512.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><p id=\"caption-attachment-453416\" class=\"wp-caption-text\">Chandler Carruth, principal software engineer at Google<\/p><\/div>\n<p>Highlights of Google&#8217;s new programming language include:<\/p>\n<ul>\n<li>Introducer words and a simple grammar<\/li>\n<li>Function input parameters are read-only values<\/li>\n<li>Pointers provide indirect access and mutation<\/li>\n<li>Use expressions to name types<\/li>\n<li>The package is the root namespace<\/li>\n<li>Import APIs through their package name<\/li>\n<li>Explicit object parameter declares a method<\/li>\n<li>Single inheritance \u2014 classes are final by default<\/li>\n<li>Powerful, definition-checked generics<\/li>\n<li>Types explicitly implement interfaces<\/li>\n<\/ul>\n<p>Interestingly, Google noted that for the language to be successful, Carbon must be &#8220;an independent community driven project&#8221; and not solely for Google&#8217;s use.<\/p>\n<p>Therefore, while most of Carbon&#8217;s current leads are Google developers, there is no explicit information classifying it as a Google project.<\/p>\n<p>The source code for Carbon is available on <strong><a href=\"https:\/\/github.com\/carbon-language\/carbon-lang\" target=\"_blank\" rel=\"noopener\">GitHub<\/a><\/strong> and is open to pull requests.<\/p>\n<hr \/>\n<h3 class=\"my-4\">Now read: <a href=\"https:\/\/mybroadband.co.za\/news\/software\/452992-software-developer-salaries-in-south-africa.html\" target=\"_blank\" rel=\"noopener\">Software developer salaries in South Africa<\/a><\/h3>\n","protected":false},"excerpt":{"rendered":"<p>Principal software engineer at Google, Chandler Carruth, unveiled the C++ successor on Tuesday, 19 July 2022.<\/p>\n","protected":false},"author":341076,"featured_media":453414,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[28709,79998,167,32376,60323],"class_list":["post-453410","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","tag-c","tag-carbon","tag-google","tag-programming-languages","tag-rust"],"_links":{"self":[{"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/posts\/453410"}],"collection":[{"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/users\/341076"}],"replies":[{"embeddable":true,"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/comments?post=453410"}],"version-history":[{"count":1,"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/posts\/453410\/revisions"}],"predecessor-version":[{"id":453442,"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/posts\/453410\/revisions\/453442"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/media\/453414"}],"wp:attachment":[{"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/media?parent=453410"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/categories?post=453410"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mybroadband.co.za\/news\/wp-json\/wp\/v2\/tags?post=453410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}