Neat-Lang / neat

The Neat Language compiler. Early beta?
BSD 3-Clause "New" or "Revised" License
110 stars 9 forks source link

String interpolation improvement #45

Closed dejlek closed 4 months ago

dejlek commented 4 months ago

Python's f-strings have many cool features this one among them is one i use frequently lately:

a = 5
b = 7
print(f"{a + b = }")
#Output: a + b = 12

Basically it prints expression (any expression!), = and result of evaluating that expression, which is very useful for quick debugging. Neat, isn't it?

FeepingCreature commented 4 months ago

Should be done with https://github.com/Neat-Lang/neat/commit/4ff94611109d6d6169cfc79f45818a9662b930ee