3 ms·
To play devils advocate here... This specific example could be solved with implicit returns in Coffeescript: class FileInfo constructor: (@name)->
by n0thing2kn0 15y ago
To play devils advocate here... This specific example could be solved with implicit returns in Coffeescript:
class FileInfo
constructor: (@name)->
mtime: ->
#implicit return
@withFile (f)->
if f.time isnt 999 then "too old"
withFile: (block)->
try
block
name: @name
time: 1000
finally
console.log 'finished'
f = new FileInfo('name')
console.log f.mtime()
#finished
#too old