News for hackers. Stuff that matters.
Re:Scala – The Simple Parts by platz on Tuesday May 13, 2014 @03:45PM (#7740231)
yep. When I first tasted Scala it seemed great, but the having abstractions that leak less (haskell) is something I really appreciate.

And there's something about Scala using traits for everything that rubs me the wrong way.

Stuff like this I still find odd, mixing abstract classes with functions and inheritance.

        abstract class IntSeqBuffer extends SeqBuffer {
     	     type U = Int
	}
	object AbstractTypeTest1 extends App {
  	  def newIntSeqBuf(elem1: Int, elem2: Int): IntSeqBuffer =
    	    new IntSeqBuffer {
         	 type T = List[U]
         	 val element = List(elem1, elem2)
       	       }
  	  val buf = newIntSeqBuf(7, 8)
	}

There are no comments on this comment yet.