Tag

syntactic sugar

1 views collected around this technical thread.

Raymond Ops
Raymond Ops
Mar 17, 2025 · Fundamentals

Unlock Go's Syntactic Sugar: Master Variadic Functions and := Assignment

This article explains the concept of syntactic sugar in Go, illustrating how variadic parameters (using ...) and the short variable declaration operator := simplify code, with clear examples and important usage notes to improve readability and reduce errors.

GoProgrammingshort variable declaration
0 likes · 4 min read
Unlock Go's Syntactic Sugar: Master Variadic Functions and := Assignment
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 26, 2021 · Fundamentals

Understanding Java Enums: Syntax Sugar, Compilation Details, and State‑Transition Implementation

This article explains the concept of syntactic sugar in Java, how the compiler desugars enum definitions into bytecode, the structure and generated members of enum classes, and demonstrates a practical enum‑based state‑transition mechanism for order processing with complete source code examples.

BackendJavaenum
0 likes · 10 min read
Understanding Java Enums: Syntax Sugar, Compilation Details, and State‑Transition Implementation
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Dec 29, 2020 · Fundamentals

Understanding Java Syntactic Sugar: Generics, Autoboxing, Enums, Inner Classes, Varargs and More

This article explains the concept of syntactic sugar in Java, covering generics, autoboxing/unboxing, enums, inner classes, variable‑length arguments, enhanced for‑loops, switch on strings, conditional compilation, assertions, try‑with‑resources, and string concatenation, with code examples and byte‑code analysis.

Inner ClassesJavaVarargs
0 likes · 17 min read
Understanding Java Syntactic Sugar: Generics, Autoboxing, Enums, Inner Classes, Varargs and More
macrozheng
macrozheng
Dec 25, 2020 · Fundamentals

Unveiling Java’s Hidden Syntactic Sugar: From Generics to Try‑with‑Resources

This article explains the concept of syntactic sugar in Java, detailing how features such as generics, auto‑boxing/unboxing, enums, inner classes, var‑args, enhanced for loops, switch with strings, conditional compilation, assertions, try‑with‑resources, and string concatenation are implemented by the compiler and why they improve code readability and safety.

CompilerJavacode examples
0 likes · 18 min read
Unveiling Java’s Hidden Syntactic Sugar: From Generics to Try‑with‑Resources
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Dec 9, 2020 · Fundamentals

Understanding Java Syntactic Sugar: Generics, Autoboxing, Enums, and More

This article explains the concept of syntactic sugar in Java, covering generics, autoboxing/unboxing, enums, inner classes, var‑args, enhanced for‑loops, switch on strings, conditional compilation, assertions, try‑with‑resources, and string concatenation, while showing the underlying bytecode transformations.

Inner ClassesJavaautoboxing
0 likes · 18 min read
Understanding Java Syntactic Sugar: Generics, Autoboxing, Enums, and More