Edited, memorised or added to reading queue

on 24-Sep-2016 (Sat)

Do you want BuboFlash to help you learning these things? Click here to log in or create user.

#odersky-programming-in-scala-2ed #scala
One exception to the method / operator precedence rule based on first character in the method name is this: If an operator ends in an equals character (=), and the operator is not one of the comparison operators <=, >=, ==, or !=, then the precedence of the operator is the same as that of simple assignment (=).
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#odersky-programming-in-scala-2ed #scala
In Java, classes have constructors, which can take parameters, whereas in Scala, classes can take parameters directly.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




Flashcard 149630206

Tags
#odersky-programming-in-scala-2ed #scala
Question
Why won't this compile?

class Rational(n: Int, d: Int) { // This won’t compile
  require(d != 0)
  override def toString = n +"/"+ d
  def add(that: Rational): Rational =
  new Rational(n * that.d + that.n * d, d * that.d)
}
Answer
Because n and d can only be accessed in methods for this object - they seem to be captured like in closure for toString. They are not fields / members though

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149632811

Tags
#odersky-programming-in-scala-2ed #scala
Question
What do you put into package objects? How is it different than Java?
Answer
Any kind of definition that you can put inside a class, you can also put at the top level of a package, by putting it into package object. In Java, only classes and interfaces can be members of packages.

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Obama was reelected president in November 2012, defeating Republican nominee Mitt Romney, and was sworn in for a second term on January 20, 2013.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Barack Obama - Wikipedia, the free encyclopedia
the Democratic Party lost a total of 63 seats; and, after a lengthy debate over federal spending and whether or not to raise the nation's debt limit, Obama signed the Budget Control Act of 2011 and the American Taxpayer Relief Act of 2012. <span>Obama was reelected president in November 2012, defeating Republican nominee Mitt Romney, and was sworn in for a second term on January 20, 2013. During his second term, Obama has promoted domestic policies related to gun control in response to the Sandy Hook Elementary School shooting, and has called for greater inclusiveness for




Flashcard 1401676500236

Question
Obama was reelected president in [...], defeating Republican nominee Mitt Romney, and was sworn in for a second term on January 20, 2013.
Answer
November 2012

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
Obama was reelected president in November 2012, defeating Republican nominee Mitt Romney, and was sworn in for a second term on January 20, 2013.

Original toplevel document

Barack Obama - Wikipedia, the free encyclopedia
the Democratic Party lost a total of 63 seats; and, after a lengthy debate over federal spending and whether or not to raise the nation's debt limit, Obama signed the Budget Control Act of 2011 and the American Taxpayer Relief Act of 2012. <span>Obama was reelected president in November 2012, defeating Republican nominee Mitt Romney, and was sworn in for a second term on January 20, 2013. During his second term, Obama has promoted domestic policies related to gun control in response to the Sandy Hook Elementary School shooting, and has called for greater inclusiveness for







Flashcard 1401678073100

Question
Obama was reelected president in November 2012, defeating Republican nominee [...], and was sworn in for a second term on January 20, 2013.
Answer
Mitt Romney

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
Obama was reelected president in November 2012, defeating Republican nominee Mitt Romney, and was sworn in for a second term on January 20, 2013.

Original toplevel document

Barack Obama - Wikipedia, the free encyclopedia
the Democratic Party lost a total of 63 seats; and, after a lengthy debate over federal spending and whether or not to raise the nation's debt limit, Obama signed the Budget Control Act of 2011 and the American Taxpayer Relief Act of 2012. <span>Obama was reelected president in November 2012, defeating Republican nominee Mitt Romney, and was sworn in for a second term on January 20, 2013. During his second term, Obama has promoted domestic policies related to gun control in response to the Sandy Hook Elementary School shooting, and has called for greater inclusiveness for