<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Java on Echo $Musings</title>
    <link>https://hongzhucui.com/tags/java/</link>
    <description>Recent content in Java on Echo $Musings</description>
    <image>
      <title>Echo $Musings</title>
      <url>https://hongzhucui.com/images/papermod-cover.png</url>
      <link>https://hongzhucui.com/images/papermod-cover.png</link>
    </image>
    <generator>Hugo -- 0.137.1</generator>
    <language>en</language>
    <copyright>Hongzhu Cui</copyright>
    <lastBuildDate>Sat, 03 May 2025 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://hongzhucui.com/tags/java/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Async/await I - Brief history of async/await</title>
      <link>https://hongzhucui.com/posts/async_await_i_brief_history/</link>
      <pubDate>Sat, 03 May 2025 00:00:00 +0000</pubDate>
      <guid>https://hongzhucui.com/posts/async_await_i_brief_history/</guid>
      <description>The async/await pattern was introduced to simplify asynchronous programming by making asynchronous code look and behave more like synchronous code. Here’s how it evolved across different programming languages.</description>
    </item>
    <item>
      <title>Functional programming in Python, Java, C#</title>
      <link>https://hongzhucui.com/posts/fp_python_java_csharp/</link>
      <pubDate>Mon, 28 Oct 2024 00:00:00 +0000</pubDate>
      <guid>https://hongzhucui.com/posts/fp_python_java_csharp/</guid>
      <description>&lt;p&gt;Functional programming (FP) is a paradigm that emphasizes immutability, pure functions, and higher-order functions. While Python, Java, and C# are all multi-paradigm languages (supporting both object-oriented and functional programming), they each have different levels of FP support. Here’s a comparison:&lt;/p&gt;
&lt;h3 id=&#34;1-first-class-functions&#34;&gt;&lt;strong&gt;1. First-Class Functions&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;All three languages support first-class functions, meaning functions can be assigned to variables, passed as arguments, and returned from other functions.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Python:&lt;/strong&gt; Full support for first-class functions using &lt;code&gt;lambda&lt;/code&gt;, &lt;code&gt;map()&lt;/code&gt;, &lt;code&gt;filter()&lt;/code&gt;, &lt;code&gt;reduce()&lt;/code&gt;, and list comprehensions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Java:&lt;/strong&gt; Added functional support in Java 8 with &lt;strong&gt;lambda expressions&lt;/strong&gt; and the &lt;strong&gt;Stream API&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;C#:&lt;/strong&gt; Supports functional programming via &lt;strong&gt;delegates&lt;/strong&gt;, &lt;strong&gt;lambda expressions&lt;/strong&gt;, and &lt;strong&gt;LINQ (Language Integrated Query)&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;2-higher-order-functions&#34;&gt;&lt;strong&gt;2. Higher-Order Functions&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;A function is considered &lt;strong&gt;higher-order&lt;/strong&gt; if it takes another function as an argument or returns one.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
