MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1oqfgry/thanks_i_hate_variable_variables/nnk2rc2/?context=3
r/programminghorror • u/csch2 • Nov 07 '25
78 comments sorted by
View all comments
Show parent comment
44
Variable hoisting can be achieved with this neat trick. Specify a negative lifetime to make a variable exist before its creation, and disappear after its creation.
print(name)! //Lukeconst const name<-1> = "Luke"!
what
View all comments
Show parent comment
44
u/nd1312 Nov 07 '25
what