Hacker News with Generative AI: Syntax

Change Python's syntax with the " coding:" trick (bitecode.dev)
You know how 93% of Paint Splatters are Valid Perl Programs?
Parinfer: Simpler Lisp Editing (shaunlebron.github.io)
Lisp is often dismissed as an undesirable programming syntax due to excessive parentheses.
Show HN: Python with do..end in place of strict indentation (github.com/navxio)
An experimental Python preprocessor that enables do..end syntax in place of strict indentation
C "clockwise/spiral" rule to understand declarations (c-faq.com)
There is a technique known as the ``Clockwise/Spiral Rule'' which enables any C programmer to parse in their head any C declaration!
2D Racket Syntax (racket-lang.org)
The 2d language installs #2d reader support in the readtables, and then chains to the reader of another language that is specified immediately after 2d.
Show HN: Indentation-based syntax for Clojure (github.com/ilevd)
Indentation-based syntax for Clojure.
OCaml Syntax Sucks (2016) (xahlee.info)
OCaml's let … = … in … is very confusing. When nested, you can't tell how it's nested.
What does f(x) mean in C++? (biowpn.github.io)
It is universally agreed that C++ is a complex language. One reason is that its syntax is highly overloaded, meaning that the same code could mean many different things. Let’s do a simple mental exersice by considering the following code:
Is `(expession, lvalue) = rvalue` a valid assignment in C or C++? (stackoverflow.com)
Some time ago I stumbled upon the idea of how a C construct, such as (expr0, expr1, expr2), evaluates (see "What does the comma operator , do?" for more context).
Zig's (.{}){} Syntax (openmymind.net)
One of the first pieces of Zig code that you're likely to see, and write, is this beginner-unfriendly line:
Rust's Most Subtle Syntax (zkrising.com)
Rust’s most subtle syntax is that constants, themselves, are patterns.
That's now valid syntax in Python 3.13 (reddit.com)
There are a few changes that didn't get much attention in the last releases, and one of them is that comprehensions and lambdas can now be used in annotations (the place where you put type hints).
The Ultimate Conditional Syntax (dl.acm.org)
Functional programming languages typically support expressive pattern-matching syntax allowing programmers to write concise and type-safe code, especially appropriate for manipulating algebraic data types.
Coding without braces: An alternate C Syntax (deusinmachina.net)
I recently stumbled upon an interesting piece of C language trivia that underscores how different computers were when C was first created. Specifically, C allows the use of digraphs (two letter combinations that represent a single letter) like <% and %> as alternatives of { and } and <: and :> as substitutes for [ and ]. The purpose of this was to provide an alternate syntax to support keyboards and character sets where braces and brackets were not available.
Guile 3.0.10 now ships with support for parens-optional syntax (wisp) (draketo.de)
» I love the syntax of Python, but crave the simplicity and power of Lisp.«
Railroad Diagram Generator (from EBNF syntax) (red-dove.com)
Rust's Ugly Syntax (2023) (matklad.github.io)
PEP 750: Tag Strings for Writing Domain-Specific Languages (python.org)
Lisp Macros to Enable C Syntax in Common Lisp (github.com/y2q-actionman)
Rhombus: Macro-extensible language with conventional syntax built on Racket (racket-lang.org)
Ask HN: Why do people say "Lisp has no syntax"? It has infinite syntax (ycombinator.com)
No one should use the AT&T syntax (2021) (outerproduct.net)
1001 Representations of Syntax with Binding (2021) (jesper.cx)
Simplifying Join Syntax (github.com/SPLWare)