Skip to content

feat: add streams concept #2983

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

navaneedan07
Copy link

pull request

Closes #2982


Reviewer Resources:

Track Policies

Copy link
Member

@kahgoh kahgoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @navaneedan07, @jagdish-15 has commented in #2982 to create a forum post for this one. Assuming the streams concept is added, we should also add a concept exercise to give students the chance to practice using it.

@@ -0,0 +1,13 @@
# Introduction

Imagine you’re at an airport, watching suitcases glide past on a conveyor belt. You don’t grab every bag—you scan for yours, maybe sort by color or tag, and pick only what you need. That’s how Java Streams work.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the use of the analogy! Just one thing - each sentence should be on a new line (see our paragraph specification).

Suggested change
Imagine you’re at an airport, watching suitcases glide past on a conveyor belt. You don’t grab every bag—you scan for yours, maybe sort by color or tag, and pick only what you need. That’s how Java Streams work.
Imagine you’re at an airport, watching suitcases glide past on a conveyor belt.
You don’t grab every bag—you scan for yours, maybe sort by color or tag, and pick only what you need.
That’s how Java Streams work.

Comment on lines +7 to +12
Streams are part of Java’s functional programming toolkit. They help you write code that’s:
- **Declarative** – Focused on intent, not mechanics.
- **Composable** – Easy to chain operations.
- **Lazy** – Efficient by computing only when needed.

Once you start using streams, you’ll find yourself writing fewer loops and more elegant pipelines. It’s not just cleaner—it’s fun.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should avoid promoting streams over for loops here. Generally, the introduction should focus on how to use streams (see introducton.md docs), not what they offer. I'd recommend having a look at existing concept introductions like lists, datetime or randomness.

@@ -0,0 +1,25 @@
# About
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally, the about.md follows the introduction.md, although it can also have more information. See the about.md documentation or the lists, datetime or randomness for examples.

@@ -0,0 +1,18 @@
[
{
"url": "https://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The track targets Java 21 and older, but these links are specifically for Java 8. Have there been any significant changes to this package since 8?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(concepts): add Streams concept
3 participants