News for hackers. Stuff that matters.
Re:Swift: Google’s Bet on Differentiable Programming by Someone on Thursday April 09, 2020 @01:32PM (#22825035)
”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)

There are no comments on this comment yet.