{"id":2251,"date":"2017-03-06T22:58:06","date_gmt":"2017-03-06T21:58:06","guid":{"rendered":"http:\/\/monodes.com\/predaelli\/?p=2251"},"modified":"2017-03-06T22:58:06","modified_gmt":"2017-03-06T21:58:06","slug":"main-weaknesses-of-c-as-a-programming-language-disadvantages","status":"publish","type":"post","link":"https:\/\/monodes.com\/predaelli\/2017\/03\/06\/main-weaknesses-of-c-as-a-programming-language-disadvantages\/","title":{"rendered":"Main Weaknesses Of C++ As A Programming Language &#8211; Disadvantages"},"content":{"rendered":"<p><em><a href=\"http:\/\/www.improgrammer.net\/main-weaknesses-of-c-as-a-programming-language\/\">Main Weaknesses Of C++ As A Programming Language &#8211; Disadvantages<\/a><\/em><\/p>\n<p><a href=\"http:\/\/www.improgrammer.net\/main-weaknesses-of-c-as-a-programming-language\/\"><img data-recalc-dims=\"1\" decoding=\"async\" class=\"alignnone size-full\" src=\"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2017\/03\/C-Disadvantages-1.jpg?w=910\" alt=\"\" \/><\/a><\/p>\n<p><!--more--><\/p>\n<blockquote>\n<div class=\"qtext_para\">Because the lack of different in <strong>brackets<\/strong> and <strong>parentheses<\/strong> on a regular keyboard, the syntax of modern <a href=\"http:\/\/www.improgrammer.net\/online-c-learning-resources\/\"><strong>C++<\/strong> <\/a>sometimes gets complex.\u00a0And not only for people, but for code highlighting too, which should tell us something.<\/div>\n<div class=\"qtext_para\"><\/div>\n<div class=\"qtext_para\">Let\u2019s see:<\/div>\n<div id=\"article-0-inread\" class=\"inread ng-isolate-scope\"><\/div>\n<p><b>&lt;&gt;<\/b>: Template declaration and usage. And bitwise shift operators if used as &lt;&lt; and &gt;&gt;, also overloaded as reads and writes into streams.This is for shifting on either left or right side. Before few years, back \u00a0these two use cases were being regularly confused by various compilers, and programmers had to receive extra spaces in complex templates.<\/p>\n<p><b>[]<\/b> : Array indexing. And lambda definition \/ capture list. Oh, and also Objective-C uses <strong>square<\/strong> brackets to send messages.<\/p>\n<p><b>{}<\/b> : Code blocks. Only code blocks, right? Wrong. Also initialization. And the modern idealize makes a heavy push towards {}-based initialization.<\/p>\n<p><b>()<\/b>: Construction of <strong>variables<\/strong>, definition\/declarations of functions, function calls. The first two cases can be disoriented in a remarkable fashion, and the \u201cissue\u201d still exists. \u00a0prepare for macros too. Ah, and casts (h\/t <strong><span class=\"qlink_container\"><a href=\"https:\/\/www.quora.com\/profile\/Nathan-F-Yospe\">Nathan F Yospe<\/a><\/span><\/strong>).<\/p>\n<p><b>\/* *\/<\/b> : Comments. Unambiguous, right? Wrong. At times \u201c\/*\u201d can be a legal language construct extend the comment: int* pa = &amp;a; int* pb = &amp;b; int c = *pa \/ *pb, and we suddenly have a place where <strong>C++<\/strong> requires a whitespace among among operators.<\/p>\n<p><b><a rel=\"tag\" class=\"hashtag u-tag u-category\" href=\"https:\/\/monodes.com\/predaelli\/tag\/if\/\">#if<\/a><\/b> \/ <b><a rel=\"tag\" class=\"hashtag u-tag u-category\" href=\"https:\/\/monodes.com\/predaelli\/tag\/endif\/\">#endif<\/a><\/b><\/p>\n<div class=\"qtext_para\">On the one hand, I\u2019m happy <strong>C++<\/strong> folks are creating heavy use of existing semantics and are not accessing to reinvent the wheel. Haskell, Ruby, and F#, where the range of capability adding new operators is broadly used, often scare me by their syntax. <strong>C++<\/strong> won\u2019t be C++ if it starts using some \u201c@\u201d, \u201c=&gt;\u201d, \u201c$\u201d, or \u201c&lt;* \u2026 *&gt;\u201d + \u201c(* \u2026 *)\u201d constructs.<\/div>\n<div class=\"qtext_para\"><\/div>\n<div class=\"qtext_para\">On the other hand, if only we could use various pairs of brackets\/parentheses for program code and data initialization, for <strong>lambdas<\/strong> and array indexing, for function definitions and calls, and for macros, the language would read so much clear to my taste.\u00a0Too bad our <strong>keyboards<\/strong> and the <strong>ASCII<\/strong> table don\u2019t\u00a0proposal viable options.<\/div>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">Main Weaknesses Of C++ As A Programming Language &#8211; Disadvantages<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/monodes.com\/predaelli\/2017\/03\/06\/main-weaknesses-of-c-as-a-programming-language-disadvantages\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"link","meta":{"inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-2251","post","type-post","status-publish","format-link","hentry","category-senza-categoria","post_format-post-format-link"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6daft-Aj","jetpack-related-posts":[{"id":9236,"url":"https:\/\/monodes.com\/predaelli\/2022\/04\/04\/c-isnt-a-programming-language-anymore-the-register\/","url_meta":{"origin":2251,"position":0},"title":"C isn&#8217;t a programming language anymore \u2022 The Register","author":"Paolo Redaelli","date":"2022-04-04","format":"quote","excerpt":"C isn't a programming language anymore \u2022 The Register C is often praised for being \"close to the metal,\" for being a \"portable assembly language.\"It was, once, but it hasn't been since the 1970s; the underlying computational models of modern computers are nothing like the one that C represents, which\u2026","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5473,"url":"https:\/\/monodes.com\/predaelli\/2019\/04\/09\/most-popular-programming-languages-c-knocks-python-out-of-top-three-in-new-study-slashdot\/","url_meta":{"origin":2251,"position":1},"title":"Most Popular Programming Languages: C++ Knocks Python Out of Top Three in New Study &#8211; Slashdot","author":"Paolo Redaelli","date":"2019-04-09","format":"link","excerpt":"Is it time to give C++ a second canche or to revive mi interest for Eiffel? Source: Most Popular Programming Languages: C++ Knocks Python Out of Top Three in New Study - Slashdot C++ has knocked machine-learning favorite Python out of the top 3 in the TIOBE Index of popular\u2026","rel":"","context":"In &quot;Mood&quot;","block_context":{"text":"Mood","link":"https:\/\/monodes.com\/predaelli\/category\/mood\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":8158,"url":"https:\/\/monodes.com\/predaelli\/2021\/02\/07\/the-v-programming-language\/","url_meta":{"origin":2251,"position":2},"title":"The V Programming Language","author":"Paolo Redaelli","date":"2021-02-07","format":false,"excerpt":"I've just read \"Is Zig the long awaited C replacement\" and it cites: The V Programming Language seems to be a \"fastly compiling\" language. Compilation speed benchmark C 5.2s gcc test.c C++ 1m 25s g++ test.cpp Zig 10.1s zig build-exe test.zig Nim 45s nim c test.nim Rust Stopped after 30\u2026","rel":"","context":"In &quot;Comparisons&quot;","block_context":{"text":"Comparisons","link":"https:\/\/monodes.com\/predaelli\/category\/comparisons\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":8181,"url":"https:\/\/monodes.com\/predaelli\/2023\/03\/12\/replacing-c\/","url_meta":{"origin":2251,"position":3},"title":"Replacing C","author":"Paolo Redaelli","date":"2023-03-12","format":false,"excerpt":"Do We Need a Replacement for C? I found this old draft that cites Zig programming language... time to undraft it... :) C is a widely used language used to program anything from OS kernels to cryptography libraries. Is it time for a replacement? Erik EngheimNov 25, 2020\u00b75 min read\u2026","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10303,"url":"https:\/\/monodes.com\/predaelli\/2023\/03\/12\/modern-c-replacements\/","url_meta":{"origin":2251,"position":4},"title":"Modern C replacements?","author":"Paolo Redaelli","date":"2023-03-12","format":false,"excerpt":"These days I was just wondering if anyone has compiled a list of \"Modern C replacement\" languages when Slashdot almost read my mind: Meet Zig: the Modern Alternative to the C Programming Language - Slashdot Systems-oriented developers already have programming languages like C, C++, Rust, and Go, notes InfoWorld. But\u2026","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1286,"url":"https:\/\/monodes.com\/predaelli\/2016\/04\/17\/eiffel-a-viable-candidate-as-a-language-for-the-gnome-platform\/","url_meta":{"origin":2251,"position":5},"title":"Eiffel: A viable candidate as a language for the Gnome platform ?","author":"Paolo Redaelli","date":"2016-04-17","format":false,"excerpt":"Eiffel: A viable candidate as a language for the Gnome platform ? It was 2004. Linux were labelled as a cancer by Ballmer, Android and iPhone didn't existed. Multi-core CPU were still high-end. It was a different world. From archive.org, before it got lost.... Twelve years ago. And it was\u2026","rel":"","context":"In &quot;Eiffel&quot;","block_context":{"text":"Eiffel","link":"https:\/\/monodes.com\/predaelli\/category\/eiffel\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/2251","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/comments?post=2251"}],"version-history":[{"count":0,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/2251\/revisions"}],"wp:attachment":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media?parent=2251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/categories?post=2251"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/tags?post=2251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}