Skip to Content
Javaへの関数的アプローチ
book

Javaへの関数的アプローチ

by Ben Weidig
March 2025
Intermediate to advanced
414 pages
5h 47m
Japanese
O'Reilly Media, Inc.
Content preview from Javaへの関数的アプローチ

第1章. 関数型プログラミング入門

この作品はAIを使って翻訳されている。ご意見、ご感想をお待ちしている:translation-feedback@oreilly.com

Javaでより関数型プログラミングスタイルを取り入れる方法をよりよく理解するためには、まず、関数型言語とはどういう意味なのか、その基礎概念は何なのかを理解する必要がある。

この章では、ワークフローに関数型プログラミングスタイルを取り入れるために必要な、関数型プログラミングのルーツを探る。

何が言語を機能的にするのか?

プログラミング・パラダイムは、オブジェクト指向、関数型、手続き型など、言語を分類する総合的な概念であり、特定のスタイルでプログラムを構成し、問題を解決するために異なるアプローチを使用する方法を提供する。 ほとんどのパラダイムと同様に、関数型プログラミングには単一の合意された定義がなく、何をもって言語を関数型と定義するかについて多くの縄張り争いが行われている。 私自身の定義を述べる代わりに、何をもって言語を関数型とするかについて、さまざまな側面から見ていくことにする。

この概念は、1930年代に論理学者アロンゾ・チャーチによって考案された形式数学体系ラムダ微積分に根ざしている。1 ラムダ微積分は、抽象的な関数とそれに変数を適用する方法で計算を表現するシステムである。 ラムダ微積分」という名前付けは、その記号にギリシャ文字の「λ」が選ばれたことに由来する: λ .

オブジェクト指向開発者として、あなたは命令型プログラミングに慣れている。一連のステートメントを定義することで、特定のタスクを達成するために何をすべきかをコンピュータに指示しているのだ。

プログラミング言語が関数型とみなされるためには、実際の制御フローを記述せずに計算のロジックを表現する宣言的なスタイルが実現可能である必要がある。このような宣言的プログラミングスタイルでは、プログラムで何を行うべきかではなく、結果やプログラムがどのように動作すべきかを式で記述する。

Javaでは、式は演算子、オペランド、メソッド呼び出しのシーケンスであり、計算を定義し、1つの値に評価する: ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

学習アルゴリズム

学習アルゴリズム

George Heineman
エンジニアが学ぶ会計システムの「知識」と「技術」

エンジニアが学ぶ会計システムの「知識」と「技術」

広川 敬祐, 五島 伸二, 小田 恭彦, 大塚 晃, 川勝 健司

Publisher Resources

ISBN: 9798341625730