<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Scala on foojay.io - Friends of OpenJDK</title><link>https://foojayio.github.io/website/today/category/scala/</link><description>Recent content in Scala on foojay.io - Friends of OpenJDK</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 05 Aug 2025 07:40:41 +0000</lastBuildDate><atom:link href="https://foojayio.github.io/website/today/category/scala/index.xml" rel="self" type="application/rss+xml"/><item><title>Pattern-matching across different languages</title><link>https://foojayio.github.io/website/today/pattern-matching-across-different-languages/</link><pubDate>Tue, 05 Aug 2025 07:40:40 +0000</pubDate><guid>https://foojayio.github.io/website/today/pattern-matching-across-different-languages/</guid><description>&lt;p&gt;Pattern matching is a major feature in software development. While pattern matching applies in several locations, its current usage is limited to &lt;code&gt;switch case&lt;/code&gt; blocks. I want to compare the power of pattern matching across a couple of programming languages I&amp;rsquo;m familiar with in this post.&lt;/p&gt;
&lt;p&gt;I assume that every reader is familiar with the &lt;code&gt;switch case&lt;/code&gt; syntax inherited from C. In short:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;switch&lt;/code&gt; clause references a value-returning statement&lt;/li&gt;
&lt;li&gt;Each &lt;code&gt;case&lt;/code&gt; clause sets another statement; if the value matches the statement, it executes the related block&lt;/li&gt;
&lt;li&gt;&lt;code&gt;case&lt;/code&gt; clauses are evaluated in order. The first clause that matches gets its block executed&lt;/li&gt;
&lt;li&gt;In C, &lt;code&gt;case&lt;/code&gt; clauses are fall-through; you need to explicitly &lt;code&gt;break&lt;/code&gt; to escape the &lt;code&gt;switch&lt;/code&gt;, otherwise, the next &lt;code&gt;case&lt;/code&gt; is evaluated&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="h2-0-java-s-pattern-matching"&gt;Java&amp;rsquo;s pattern matching&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;ll start with Java, as it was the first programming language I used in a professional context.&lt;/p&gt;</description></item><item><title>Getting Started With Scala</title><link>https://foojayio.github.io/website/today/getting-started-with-scala/</link><pubDate>Wed, 16 Jul 2025 06:41:05 +0000</pubDate><guid>https://foojayio.github.io/website/today/getting-started-with-scala/</guid><description>&lt;p&gt;&lt;strong&gt;Why Scala?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;At &lt;a href="https://www.quantexa.com/" target="_blank" rel="noopener noreferrer"&gt;Quantexa&lt;/a&gt;
, we love Scala. This may be the first dedicated article on Foojay.io about Scala. I hope my colleagues and I can add more in due course.&lt;/p&gt;
&lt;p&gt;Scala is built on the Java Virtual Machine (JVM). For foojay.io readers, this is &amp;ldquo;stating the bleeding obvious,&amp;rdquo; but it means it compiles to Java bytecode and runs on the same runtime environment as Java. This brings significant enterprise scalability, resilience and big data ecosystem benefits.&lt;/p&gt;</description></item></channel></rss>