{"id":30,"date":"2013-03-11T04:17:23","date_gmt":"2013-03-11T04:17:23","guid":{"rendered":"http:\/\/96.126.106.214\/?p=30"},"modified":"2023-11-26T01:02:40","modified_gmt":"2023-11-26T01:02:40","slug":"python-is-great","status":"publish","type":"post","link":"https:\/\/codingismycraft.blog\/index.php\/2013\/03\/11\/python-is-great\/","title":{"rendered":"Python is great"},"content":{"rendered":"<p>I have fallen in love with several programming languages in the past, with C++ being the most dominate of them.<\/p>\n<p>During the last years though, I have become a Python fan boy, trying to use it as much as I can, something that translates to use it almost everywhere except the rare cases that I have to rely to C++ strictly for performance reasons.<\/p>\n<p>A programming language can be characterized by the following attributes:<\/p>\n<p>&#8211;\u00a0\u00a0\u00a0\u00a0\u00a0 Expressibility<\/p>\n<p>&#8211;\u00a0\u00a0\u00a0\u00a0\u00a0 Standard library<\/p>\n<p>&#8211;\u00a0\u00a0\u00a0\u00a0\u00a0 Performance<\/p>\n<p>&#8211;\u00a0\u00a0\u00a0\u00a0\u00a0 Metaprogramming<\/p>\n<p>&#8211;\u00a0\u00a0\u00a0\u00a0\u00a0 Community base, maturity and future potential<\/p>\n<p>The ability to express algorithms classifies a language as imperative or declarative\u2026\u00a0 A good example of an imperative language is C while SQL in the other hand is another good example of a declarative one.<\/p>\n<p>Imperative languages tend to be verbose limiting their expessibility by polluting the code with low level details while declarative ones are allowing the programmer to be produce more compact code that is both easier to understand and write.<\/p>\n<p>Python expressibility is one of the best someone can imagine. It\u2019s collection classes (list, set, tuple and dictionary) that are part of the language are very flexible and intuitive to use even for the beginner while the dynamic nature of the language makes possible lots of programming tricks that greatly simplify the way the code is written. For example the return value of a function can be of any type; something than in C++ jargon can be expressed as polymorphism by return type. This feature can greatly simplify cases where we need to return objects of not know type to the caller for example a type agnostic factory function or in combination of the fact that we can actually return from a function any number of values as opposed to only one in traditional statically linked languages we can simplify cases where we need to pass some variables by reference with the intention to actually change its value\u2026 Overall when it comes to expressibility I am convinced that Python scores much higher than any other language I have already used and this includes C, C++, C#, Java, Basic, Pascal, JavaScript and SQL to name a few\u2026.<\/p>\n<p>&nbsp;<\/p>\n<p>The Standard library of a language is another critical factor I am considering when choosing a programming language. No matter how expressive or fast a language is without a sufficiently extensive standard library will have to rely to third party implementations for things like data base access, XML parsing and network programming.\u00a0 Although from a purely theoretical perspective such an approach keeps the language lean propagating responsibility to third parties, which can either be an individual developer, a software development company or even the open source community, it is proven that such an approach might lead to a non standardized platform that suffers from multiple implementations resolving the same concept following slightly different approaches.\u00a0 This pluralism can lead to purely written documented and supported interfaces that in many cases can be accounted for the failure of a well designed language to gain popularity as for example happened to LISP and SCHEME.<\/p>\n<p>Python\u2019s Standard Library is very comprehensive and it design fits perfectly with its spirit while has almost the same feeling across the board\u2026\u00a0 It covers data base, flat files, csv, xml, Unicode and almost everything that can be considered a \u2018standard\u2019 need minimizing the need for custom development.. The concept of a complete standard library is such a fundamental \u2018pythonic\u2019 concept that was nicked named as \u2018batteries included\u2019.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have fallen in love with several programming languages in the past, with C++ being the most dominate of them. During the last years though,&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-30","post","type-post","status-publish","format-standard","hentry","category-programming"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":279,"url":"https:\/\/codingismycraft.blog\/index.php\/2024\/10\/03\/the-challenges-of-python-migration-lessons-from-c-and-beyond\/","url_meta":{"origin":30,"position":0},"title":"The Challenges of Python Migration: Lessons from C++ and Beyond","author":"john","date":"October 3, 2024","format":false,"excerpt":"One project that confirmed the need for caution and conservatism when estimating deadlines involved migrating a massive codebase of over 4,000 Python files and 250+ open-source libraries from Python 3.6 to 3.10. What was initially seen as a straightforward task, expected to take just a few weeks, ended up consuming\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":35,"url":"https:\/\/codingismycraft.blog\/index.php\/2013\/03\/11\/programming-languages\/","url_meta":{"origin":30,"position":1},"title":"Programming Languages","author":"john","date":"March 11, 2013","format":false,"excerpt":"As a seasoned programmer I have used a wide spectrum of programming languages and development approaches. By the end of the 80's I was introduced to the concepts of Object Oriented Programming using as main language the C++ which I still follow very closely. As a heavy user of Visual\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":66,"url":"https:\/\/codingismycraft.blog\/index.php\/2016\/03\/10\/the-three-dimensions-of-a-programmer\/","url_meta":{"origin":30,"position":2},"title":"The three dimensions of a programmer.","author":"john","date":"March 10, 2016","format":false,"excerpt":"\u00a0 It is my impression that the vast majority of new developers, tend to underestimate the importance of design and implementation details as they struggle to prove that they can deliver a solution very quickly and please their managers with very tight deadlines. A developer eager to prove his abilities,\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/codingismycraft.blog\/index.php\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":213,"url":"https:\/\/codingismycraft.blog\/index.php\/2017\/10\/04\/adding-descriptors-to-your-python-arsenal\/","url_meta":{"origin":30,"position":3},"title":"Adding descriptors to your python arsenal","author":"john","date":"October 4, 2017","format":false,"excerpt":"Python\u00a0provides a\u00a0 rich programming paradigm providing the ability to the programmer to express his solutions in a very concise and elegant way.\u00a0 One of the python features that is not in wide use although it gives the opportunity to simplify certain pieces of code,\u00a0is the descriptor protocol which is the\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/codingismycraft.blog\/index.php\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":219,"url":"https:\/\/codingismycraft.blog\/index.php\/2014\/05\/23\/python-decorators-basics\/","url_meta":{"origin":30,"position":4},"title":"Python Decorators Basics","author":"john","date":"May 23, 2014","format":false,"excerpt":"Introduction to decorators Decorators introduce a programming paradigm that is not found in statically linked languages, like C++ or Java. Taking advantage of closures and the fact that functions are first class citizens of python, we can easily change the behaviour of them adding a single line of code. If\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/codingismycraft.blog\/index.php\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":217,"url":"https:\/\/codingismycraft.blog\/index.php\/2014\/05\/26\/interface-driven-programming-in-python\/","url_meta":{"origin":30,"position":5},"title":"Interface Driven Programming In Python","author":"john","date":"May 26, 2014","format":false,"excerpt":"If it looks like a duck, quacks like a duck and walks like a duck, it's a duck Probably the greatest feature of python is its dynamic nature.\u00a0 By this we mean that variable names are not bound to types and they also can be assigned at run time, this\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/codingismycraft.blog\/index.php\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/codingismycraft.blog\/index.php\/wp-json\/wp\/v2\/posts\/30","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codingismycraft.blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codingismycraft.blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codingismycraft.blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codingismycraft.blog\/index.php\/wp-json\/wp\/v2\/comments?post=30"}],"version-history":[{"count":1,"href":"https:\/\/codingismycraft.blog\/index.php\/wp-json\/wp\/v2\/posts\/30\/revisions"}],"predecessor-version":[{"id":31,"href":"https:\/\/codingismycraft.blog\/index.php\/wp-json\/wp\/v2\/posts\/30\/revisions\/31"}],"wp:attachment":[{"href":"https:\/\/codingismycraft.blog\/index.php\/wp-json\/wp\/v2\/media?parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codingismycraft.blog\/index.php\/wp-json\/wp\/v2\/categories?post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codingismycraft.blog\/index.php\/wp-json\/wp\/v2\/tags?post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}