Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Me in the interpreter my first days of trying to understand
- // things about what I'm seeing trying to read Scala sources.
- scala> class WhatDoesThisSyntaxDo() { println("Constructed, IG") }
- defined class WhatDoesThisSyntaxDo
- scala> new WhatDoesThisSyntaxDo
- Constructed, IG
- res0: WhatDoesThisSyntaxDo = WhatDoesThisSyntaxDo@20011bf
- scala> new WhatDoesThisSyntaxDo()
- Constructed, IG
- res1: WhatDoesThisSyntaxDo = WhatDoesThisSyntaxDo@7d3fb0ef
- scala> class WhatDoesThisSyntaxDo { println("Constructed, IG") }
- defined class WhatDoesThisSyntaxDo
- scala> new WhatDoesThisSyntaxDo
- Constructed, IG
- res3: WhatDoesThisSyntaxDo = WhatDoesThisSyntaxDo@316cda31
- scala> new WhatDoesThisSyntaxDo()
- Constructed, IG
- res4: WhatDoesThisSyntaxDo = WhatDoesThisSyntaxDo@691567ea
- scala> new WhatDoesThisSyntaxDo { println("Wtf is this now") }
- Constructed, IG
- Wtf is this now
- res7: WhatDoesThisSyntaxDo = $anon$1@464aeb09
- scala> new WhatDoesThisSyntaxDo() { println("Wtf is this now") }
- Constructed, IG
- Wtf is this now
- res8: WhatDoesThisSyntaxDo = $anon$1@4fa0ee7e
- scala> class Unclear extends WhatDoesThisSyntaxDo { println("Wtf is this now") }
- defined class Unclear
- scala> new Unclear
- Constructed, IG
- Wtf is this now
- res10: Unclear = Unclear@6c9151c1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement