4 ms·
Enclosed log evaluation is really nice and I'd have some trouble going back. It's older than Elixir, too; Commons.Logging in C# has supported it for a long time
by eropple 12y ago
Enclosed log evaluation is really nice and I'd have some trouble going back. It's older than Elixir, too; Commons.Logging in C# has supported it for a long time and most logging frameworks in Scala take a call-by-name parameter rather than an evaluated arg.
- saryant 12y agoExample in Scala from Play: https://github.com/playframework/playframework/blob/2.3.x/framework/src/play/src/main/scala/play/api/Logger.scala#L92 https://github.com/playframework/playframework/blob/2.3.x/fr... The '=>' means call-by-name in Scala, the argument is lazily evaluated.