lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



```lua
smt = getmetatable("sd")
smt.__call = string.format

print( ("Hello, %s!")("world") )
--> Hello, world!

```

I hadn't seen this hack before. I'm also sure it's been the subject of past controversy, but I think that this syntax is awesome enough for me to forgive lua for omitting printf!


--Andrew