”start = time.time(): doesnt need any explanation”
So, is that evaluated when that statement is run, when the value is first read (lazy evaluation, as in Haskell), or every time ‘start’ gets read. For example, Scala has both
val start = time.time()
(evaluates it once, immediately),
lazy val start = time.time()
(evaluates it once, at first use), and
def start = time.time()
(creates a parameterless function that evaluates time.time() every time it is called)
So, is that evaluated when that statement is run, when the value is first read (lazy evaluation, as in Haskell), or every time ‘start’ gets read. For example, Scala has both
(evaluates it once, immediately), (evaluates it once, at first use), and (creates a parameterless function that evaluates time.time() every time it is called)