Top "Syntactic-sugar" questions

Syntactic sugar is a computer science term that refers to syntax within a programming language that is designed to make things easier to read or to express.

AWK: shortened if-then-else with regex

The following AWK format: /REGEX/ {Action} Will execute Action if the current line matches REGEX. Is there a way to …

regex awk syntactic-sugar
Ignore an element while building list in python

I need to build a list from a string in python using the [f(char) for char in string] syntax …

python list syntactic-sugar
What is the best or most interesting use of Extension Methods you've seen?

I'm starting to really love extension methods... I was wondering if anyone her has stumbled upon one that really blew …

c# .net extension-methods syntactic-sugar
Is there a way to implement custom language features in C#?

I've been puzzling about this for a while and I've looked around a bit, unable to find any discussion about …

c# syntactic-sugar language-construct
Getting the desugared part of a Scala for/comprehension expression?

Does anyone know how to get the (Scala part only) desugared translation of a for/comprehension expression before it actually …

scala syntactic-sugar for-comprehension
Is there such thing as a relative jQuery selector?

I have a reference to a jquery object with the this variable. I am looking for a way of applying …

jquery jquery-selectors syntactic-sugar
How to unpack the columns of a pandas DataFrame to multiple variables

Lists or numpy arrays can be unpacked to multiple variables if the dimensions match. For a 3xN array, the following …

python pandas syntactic-sugar
Is there a way to call multiple functions on the same object with one line?

Just trying to tidy up a program and was wondering if anyone could feed me some syntax sugar with regard …

c++ method-chaining syntactic-sugar function-calls member-functions
Evaluate many boolean expressions like Array#join in Ruby

In Ruby, you can use Array#join to simple join together multiple strings with an optional delimiter. [ "a", "b", "c" ].…

ruby syntactic-sugar boolean-expression