<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Wen on Medium]]></title>
        <description><![CDATA[Stories by Wen on Medium]]></description>
        <link>https://medium.com/@wenyuxu?source=rss-84e7d8ace880------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*gym8OKvUMhNHDedA.</url>
            <title>Stories by Wen on Medium</title>
            <link>https://medium.com/@wenyuxu?source=rss-84e7d8ace880------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 15:17:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@wenyuxu/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[C, C++, and C#]]></title>
            <link>https://medium.com/@wenyuxu/c-c-and-c-95b50dba8f7f?source=rss-84e7d8ace880------2</link>
            <guid isPermaLink="false">https://medium.com/p/95b50dba8f7f</guid>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[c]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Wen]]></dc:creator>
            <pubDate>Tue, 28 Jan 2020 01:11:25 GMT</pubDate>
            <atom:updated>2020-01-28T01:11:25.236Z</atom:updated>
            <content:encoded><![CDATA[<h3>Curiosity: C, C++, and C#</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*9VhBc1smQofu9g6saTOW5g.jpeg" /><figcaption>Source: <a href="https://inteng-storage.s3.amazonaws.com/img/iea/V0OyRR5JGQ/sizes/cprogrammingbundle_resize_md.jpg">https://inteng-storage.s3.amazonaws.com/img/iea/V0OyRR5JGQ/sizes/cprogrammingbundle_resize_md.jpg</a></figcaption></figure><p>I’ve always wondered what are the differences between these three languages. In my freshman year, we first learned about C and then advanced into C++. For higher years, the language used no longer mattered, although there were still restrictions. Even though I have programmed extensively with C and C++ before, I didn’t get a chance to thoroughly know the differences from a broad, general perspective.</p><p>So, here comes this article.</p><p>There are plenty of differences in features between these languages (or else they won’t be “different” languages). My attempt in this article is to introduce the differences and cover the most important features. If you wish to read about more detailed differences, I encourage you to go to the links at the end of this article.</p><p>Note that both C++ and C# are part of <a href="https://en.wikipedia.org/wiki/List_of_C-family_programming_languages">the bigger family of C languages</a>. Most family members are no longer in use.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*Y1pMuAZRwgIXu2kWfEJa8g.png" /><figcaption>Source: <a href="https://www.homeworkhelponline.net/images/new/c.png">https://www.homeworkhelponline.net/images/new/c.png</a></figcaption></figure><h3>C</h3><p>Paradigms: imperative, procedural, structured</p><p><strong>The C language is the oldest. </strong>It was invented by Dennis Ritchie in 1972 at Bell Labs to write operating systems. It was developed as an augmented version of <a href="https://en.wikipedia.org/wiki/B_(programming_language)">B</a> for the development of a new version of Unix.</p><p><strong>It has the properties of both low-level and high-level languages.</strong> It is a good language to develop computer code systems. GeeksforGeeks calls it a middle-level programming language. Some call it a low-level language since it operates almost as efficient as assembly code. Note that what determines if a language is low-level or high-level is <a href="https://en.wikipedia.org/wiki/High-level_programming_language#Abstraction_penalty">its level of abstraction from details of the computer.</a> High-level languages suffer from abstraction penalty, defined by Wikipedia as “the cost that high-level programming techniques pay for being unable to optimize performance”.</p><p>(Just for fun: the first high-level programming language is the FORTRAN, owned by IBM, released in 1957)</p><p>It gained popularity in the 1980s, and then became the most widely used programming language in embedded applications and operating systems.</p><p><strong>It is a good starting programming language for beginners</strong> since it is the foundation of many newer languages. It is simple and does not have many advanced features of newer languages, so you would have to build things from scratch. This helps you to understand the underlying process of how algorithms/programs/memory/computers work, which is not possible with many higher-level languages such as Python. <a href="https://www.quora.com/Is-C-a-good-first-programming-language">Here</a> are some arguments on Quora on why C should be the starting language.</p><p><strong>What to remember:</strong></p><ul><li><strong>C is the oldest of the three. It is an imperative, procedural programming language. Many new languages were built upon it. It is mostly used to develop operating systems.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*tGomLySLtUSvTZTb2Ptw6w.png" /><figcaption>Source: Programiz</figcaption></figure><h3>C++ (“C plus plus”)</h3><p>C++ is “C with classes”.</p><p>“++” is the increment operator in C.</p><p>C++ was developed as an extension to C, to add object-oriented capabilities without sacrificing the efficiency in C.</p><p>It was created by Bjarne Stroustrup and was published in 1985. It can be used alongside C to develop operating systems.</p><p>New features of C++ include operator overloading, references, improved type checking, and more.</p><p>The features of C++ were updated continuously. With C++2.0, features such as abstract classes, static/const/protected member functions, and multiple inheritances.</p><p>Paradigms: <a href="https://en.wikipedia.org/wiki/Procedural_programming">procedural</a>, <a href="https://en.wikipedia.org/wiki/Functional_programming">functional</a>, <a href="https://en.wikipedia.org/wiki/Object-oriented_programming">object-oriented</a>, <a href="https://en.wikipedia.org/wiki/Generic_programming">generic</a></p><p><strong>What to remember:</strong></p><ul><li><strong>C++ is an extension to C. Although it has many new features, its most notable difference to C is that it supports OOP.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*sn815K8slZc0-eEwSVwAOA.png" /><figcaption>Source: Programiz</figcaption></figure><h3>C# (“C-Sharp”)</h3><p>C# is an extension of C that is based on the .NET framework.</p><p>Similar to C++, the name C# indicates an “incrementation” to C. In music, a sharp indicates that a note should be made one semitone higher in pitch. However, it has more commonalities with Java than with C/C++.</p><p>It was developed by a team at Microsoft led by Anders Hejlsberg in 2002 to compete with Java. At first, its name was Cool, which stood for “<a href="https://en.wikipedia.org/wiki/C-like">C-like</a> Object-Oriented Language”. <a href="https://en.wikipedia.org/wiki/James_Gosling">James Gosling</a>, the creator of Java, called it an “imitator” of Java. He also said that “[C# is] sort of Java with reliability, productivity and security deleted.” However, since 2005, C# and Java started to diverge into two different programming languages.</p><p>Unlike C and C++, pointers in C# can only be used in unsafe mode.</p><p>The biggest between C# and C/C++ is that it uses component-oriented programming in addition to OOP. <a href="https://www.oreilly.com/library/view/programming-net-components/0596102070/ch01s02.html">Here</a> is an article about COP vs. OOP. Quoting from an <a href="https://csharp-station.com/understanding-the-differences-between-c-c-and-c/">article</a> from C# Station: <strong>“Component-oriented programming uses exchangeable code modules that work on their own and don’t need you to know their inner workings to use them.”</strong></p><p>Wikipedia paradigms: <a href="https://en.wikipedia.org/wiki/Structured_programming">Structured</a>, <a href="https://en.wikipedia.org/wiki/Imperative_programming">imperative</a>, <a href="https://en.wikipedia.org/wiki/Object-oriented_programming">object-oriented</a>, <a href="https://en.wikipedia.org/wiki/Event-driven_programming">event-driven</a>, <a href="https://en.wikipedia.org/wiki/The_Task-based_Asynchronous_Pattern">task-driven</a>, <a href="https://en.wikipedia.org/wiki/Functional_programming">functional</a>, <a href="https://en.wikipedia.org/wiki/Generic_programming">generic</a>, <a href="https://en.wikipedia.org/wiki/Reflective_programming">reflective</a>, <a href="https://en.wikipedia.org/wiki/Concurrent_computing">concurrent</a></p><p><strong>What to remember:</strong></p><ul><li><strong>C# is an extension of C, but it has more commonalities with Java than with C. The biggest difference between C#and C/C++ is that it has component-oriented programming in addition to OOP.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*pJeLEX557gJ3KcGZyxyhdA.png" /><figcaption>Source: Programiz</figcaption></figure><h3>Further Reading</h3><p>C as the first language: <a href="https://www.quora.com/Is-C-a-good-first-programming-language">https://www.quora.com/Is-C-a-good-first-programming-language</a></p><p>C/C#: <a href="https://www.geeksforgeeks.org/difference-between-c-and-c-sharp/">https://www.geeksforgeeks.org/difference-between-c-and-c-sharp/</a></p><p>Differences: <a href="https://csharp-station.com/understanding-the-differences-between-c-c-and-c/">https://csharp-station.com/understanding-the-differences-between-c-c-and-c/</a></p><p>Component-oriented programming vs. OOP:<a href="https://www.oreilly.com/library/view/programming-net-components/0596102070/ch01s02.html">https://www.oreilly.com/library/view/programming-net-components/0596102070/ch01s02.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95b50dba8f7f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Programming Paradigms and Programming Languages Types]]></title>
            <link>https://medium.com/@wenyuxu/programming-paradigms-and-programming-languages-types-286f1ee59f4f?source=rss-84e7d8ace880------2</link>
            <guid isPermaLink="false">https://medium.com/p/286f1ee59f4f</guid>
            <category><![CDATA[programming-languages]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[education]]></category>
            <dc:creator><![CDATA[Wen]]></dc:creator>
            <pubDate>Mon, 27 Jan 2020 09:39:06 GMT</pubDate>
            <atom:updated>2020-01-27T09:51:26.462Z</atom:updated>
            <content:encoded><![CDATA[<p>A programming paradigm is a programming style, an approach to programming, your way to problem-solving.</p><p><em>(Note that it is wrong to say “programming language paradigm”)</em></p><p>It is independent of programming languages, but some languages are not designed to implement some paradigms. Most problems have many ways (paradigms) to solve them.</p><p>However, solving some types of problems naturally leads to using certain paradigms, such as using OOP for creating interacting robot characters.</p><p>The following summarizes the most popular and important paradigms used in computer programming.</p><p>Note that there are different ways to categorize programming languages, such as compiled vs. interpreted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*GjaVcRSEr-yIcRkkMtlaMQ.jpeg" /><figcaption>Source: <a href="https://learntocodewith.me/programming/source-code/">L</a>earntoCodeWith</figcaption></figure><p><strong>Compiled programming language:</strong> pack of code is converted into machine code first, and then it is run. Eg) C, C++</p><ul><li>Environment-dependent for the generated machine code</li><li>Slow to test for large programs</li></ul><p><strong>Interpreted programming language:</strong> code is translated into machine code and run line by line. Eg) Python, JavaScript</p><ul><li>Easy for testing</li><li>Dynamic typing, flexible</li><li>Relatively slower compilation time</li></ul><h3>Programming Paradigms</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R3JtXZWv6-WctWeSVHlmvw.png" /><figcaption>Source: <a href="https://media.geeksforgeeks.org/wp-content/uploads/1-344.png">G</a>eeksforGeek</figcaption></figure><p><a href="https://en.wikipedia.org/wiki/Imperative_programming"><strong>Imperative programming</strong></a><strong>:</strong> changes the state of the program step by step through each command. It emphasis process, or how the program accomplishes its purposes. Order is crucial. It is the oldest programming style.</p><ul><li>Disadvantages: side effects, difficult to understand, less efficient.</li></ul><p><a href="https://en.wikipedia.org/wiki/Declarative_programming"><strong>Declarative programming</strong></a>: emphasis on the goal, or what the program should return. It does not care about the process as much as long as the goal is accomplished.</p><h3>Object-Oriented Programming (OOP)</h3><blockquote>OOP is a software programming model constructed around objects. It views that world as a system of interacting objects.</blockquote><blockquote>This programming language views the world as a group of objects that have internal data and external accessing parts of that data. The aim […] is to think about the fault by separating it into a collection of objects that offer services that can be used to solve a specific problem.(Article: <a href="https://www.typesnuses.com/types-of-programming-languages-with-differences/">“What is a Programming Language and Different Types”</a>)</blockquote><p>Eg) Python, Java, Ruby, C++</p><ul><li>Heavily emphasizes <a href="https://en.wikipedia.org/wiki/Abstraction_(computer_science)">abstraction</a></li><li>Provides <a href="https://en.wikipedia.org/wiki/Encapsulation_(computer_programming)">encapsulation</a> (restricting access to specific information of an object) and inheritance (base class’ attributes are inherited by its derived classes)</li><li>Often uses classes (objects are instances of a class), attributes, and methods</li></ul><p>This <a href="https://brilliant.org/wiki/object-oriented-programming/">Brilliant wiki</a> explains it well.</p><h3>Functional Programming</h3><blockquote>Control flow is expressed by combining function calls, rather than by assigning values to variables.</blockquote><p>(Definition copied from <a href="https://cs.lmu.edu/~ray/notes/paradigms/">here</a>)</p><p>Eg) Java, Python, Swift, PHP, Ruby</p><ul><li>The power of this paradigm comes from using functions as arguments to functions and also returning functions from functions. <strong>Eg) lambdas</strong></li><li>Codes are much, much shorter.</li><li>Storing states is discouraged.</li></ul><h3>Structured Programming</h3><blockquote>Control flow is defined by nested loops, conditionals, and subroutines.</blockquote><h3>Procedural Programming</h3><blockquote>Describes the step-by-step the procedures needed to solve a problem.</blockquote><blockquote><strong>The procedural programming language is used to execute a sequence of statements that lead to a result.</strong> Typically, this type of programming language uses multiple variables, heavy loops and other elements, which separates them from functional programming languages. Functions of procedural language may control variables, other than function’s value returns. (Article: <a href="https://www.typesnuses.com/types-of-programming-languages-with-differences/">“What is a Programming Language and Different Types”</a>)</blockquote><p>Eg) BASIC, C, Python</p><p>These are the first languages that are described as high-level programming languages in history. They were the first to use English vocabulary to describe commands, such as move, load, data.</p><h3>My Words to You…</h3><p>Here are the most popular programming paradigms! It is by no means comprehensive.</p><p>Below, you could find a few links for further details about these topics.</p><h3>Resources</h3><p>Compiled vs. interpreted: <a href="https://guide.freecodecamp.org/computer-science/compiled-versus-interpreted-languages/">guide.freecodecamp.org</a></p><p>Paradigms: <a href="http://www.eecs.ucf.edu/~leavens/ComS541Fall97/hw-pages/paradigms/major.html">www.eecs.ucf.edu</a>, <a href="https://www.typesnuses.com/types-of-programming-languages-with-differences/">https://www.typesnuses.com/types-of-programming-languages-with-differences/</a>, <a href="https://www.freecodecamp.org/news/what-exactly-is-a-programming-paradigm/">https://www.freecodecamp.org/news/what-exactly-is-a-programming-paradigm/</a></p><p>OOP: <a href="https://brilliant.org/wiki/object-oriented-programming/">https://brilliant.org/wiki/object-oriented-programming/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=286f1ee59f4f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>