The hottest Syntax Substack posts right now

And their main takeaways
Category
Top Technology Topics
Bite code! • 1957 implied HN points • 19 Feb 24
  1. Python automatically concatenates strings written next to each other, making it easier to break long strings across multiple lines.
  2. In Python, be mindful of the differences between functions like sorted() and list.sort(), as they behave differently in terms of returning values.
  3. Tuples in Python are created using commas, with parentheses being optional for non-empty tuples, but crucial for tuples of one element to avoid confusion.
Bite code! • 1100 implied HN points • 15 Jan 24
  1. The splat operator ( ) in Python is used for unpacking function arguments and defining infinite (variadic) parameters.
  2. Differentiate between arguments and parameters in Python; parameters are defined variables in a function signature, while arguments are values passed to those parameters when calling the function.
  3. Positional and keyword arguments in Python allow passing arguments by position or by name in a function call.
zverok on lucid code • 86 implied HN points • 01 Dec 23
  1. Ruby introduced a new syntax for defining one-line methods using the 'def method(args) = body' structure
  2. This syntax change aimed to make code more concise and readable, especially for small helper methods
  3. The use of '=' in method definitions sparked debate around clarity and potential confusion between values and methods
Get a weekly roundup of the best Substack posts, by hacker news affinity:
zverok on lucid code • 115 implied HN points • 19 Oct 23
  1. Pattern matching in Ruby allows for declaratively matching nested data structures and binding parts to local variables
  2. The importance and impact of pattern matching in Ruby has sparked debates, with some considering it mere syntax sugar and others a separate paradigm
  3. Ruby introduced pattern matching in version 2.7, using the 'in' keyword for pattern matching within the 'case' statement
The Leftovers • 79 implied HN points • 05 Jun 23
  1. Pace in writing involves creating a specific dynamic rhythm in the narrative events, achieved through factors like syntax, punctuation, and montage.
  2. The use of present tense influences the pace of writing by creating a sense of ongoingness in the narrative.
  3. Understanding pace in writing is essential for creating engaging and impactful storytelling that keeps readers hooked.
zverok on lucid code • 3 HN points • 10 Oct 23
  1. Ruby introduced a feature with numbered block parameters to avoid repeating block arguments, making code more concise and readable.
  2. Using numbered block parameters can improve visual lightness, saving screen space and avoiding unnecessary repetition in chains of short blocks.
  3. The small syntax change of using numbered block parameters can encourage a declarative coding style, emphasizing transformations from inputs to outputs in a more readable manner.
Get Code • 2 HN points • 22 Mar 23
  1. Typed Tagless Final Interpreters in Rust provide efficiency, extensibility, and expressiveness.
  2. Domain-specific languages focus on solving specific problems well and can be embedded into a host language like Rust.
  3. In the final style, the host language's type system is leveraged directly, allowing for type-safe operations like formatted string processing.
bumbread • 0 implied HN points • 26 Oct 23
  1. Consider the naming problem when writing bindings - changing casing or renaming functions is acceptable for better integration with the language, but avoid renaming to maintain searchability.
  2. Leverage the strengths of the language when creating bindings - use language features like bitsets, tuples, and enums to make the bindings more user-friendly and reduce the need for excessive typecasting.
  3. Be conscious of the usability and integration of bindings - ensure that bindings are well-documented, easy to search, integrate with existing codebases, and offer value beyond just enabling procedure calls.