You’re Creating a New Programming Language — What Will the Syntax Look Like?
I asked a bunch of programmers about their favorite syntax — here’s what they said

A little while ago I decided to have a little fun and wrote an article titled “My Favorite Pieces of Syntax in 8 Different Programming Languages.”
I published it and then decided to share it on a subreddit — r/ProgrammingLanguages. This led to an interesting discussion about programming language syntax, as users shared their own favorites.
It left me with no choice: I had to write a new article with my favorite pieces of syntax from the r/ProgrammingLanguages community.
A Compilation of Adored Syntax Across Programming Languages
Before we get into it, I should quickly clarify what this article is and what it isn’t.
❌ It isn’t a programming tutorial.
❌ It isn’t going to explain the snippets presented.
❌ It isn’t an objective list.
✅ It is meant for fun.
✅ It is a compilation of opinions from various people.
While it would be awesome to go in-depth into each of the snippets, there are just too many of them. In any case, I’m not familiar with all the languages mentioned.
As such, I’ll add a bit of the explanation from the user who posted it if one was available. However, you’re welcome to contribute on GitHub to this list, and more in-depth explanations are welcome there.
Finally, the reason for the title of this article is that many users in the subreddit actually have built or are building their own programming languages, and some have mentioned that they’re looking to include their favorite syntax from other languages in it.
Maybe you can draw inspiration from for your own programming language from this list.

Generator Expressions/ List Comprehensions
Posted by: u/ibrahimqasim and u/usernamecreationhell













