Hacker News new | ask | show | jobs
by Estragon 3738 days ago

   say "Code took {now - INIT now} seconds to run";
   # Code took 0.01111143 seconds to run
Implicit string interpolation??? What if I just want to print out the string "now"?
2 comments

Why implicit? There are braces around `now - INIT now`. In Ruby it'd be "Code took #{Time.now - start_time} seconds to run".
Ah, right. Thanks.
If you want a real reason to be astonished, the bit with "INIT now" is run at a completely different time than the rest of the interpolation, apparently.