2012/4/3 Piotr Przybyła <[email protected]>: > Hello everyone, > I am considering applying to Google Summer of Code, particularly in > Spotting task for DBpedia Spotlight. The problem is that I know Java > well and work with it every day, but have never written a single line > in Scala and barely heard about it. I've spent quite a while browsing > the Spotlight code and still can't figure out, what's the rule - why > some parts of the code are written in Scala and others in Java? Even > small modules are split into two parts. > Of course I'd like to take GSoC as an occasion to learn new, > surprisingly popular language, and also expect myself to be able to > read other's Scala code, but would definitely prefer to write my own > in Java. Will it be a problem?
I wouldn't think it would be much of a problem, but now is a good time to extend yourself :) Twitter's Scala School is a pretty good place to start: http://twitter.github.com/scala_school/ Scala comes with a REPL, so it's easy to play with. If I give you these lines, they're probably a little cryptic: val list = List(("Foo", 44), ("Bar", 7), ("Baz", 65)) val sort = list.sortWith(_._2 > _._2) but if you look at them in the repl: scala> val list = List(("Foo", 44), ("Bar", 7), ("Baz", 65)) list: List[(java.lang.String, Int)] = List((Foo,44), (Bar,7), (Baz,65)) scala> val sort = list.sortWith(_._2 > _._2) sort: List[(java.lang.String, Int)] = List((Baz,65), (Foo,44), (Bar,7)) ...it's easier to understand what's happening. -- <Sefam> Are any of the mentors around? <jimregan> yes, they're the ones trolling you ------------------------------------------------------------------------------ Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev _______________________________________________ Dbpedia-discussion mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion
