News for hackers. Stuff that matters.
Re:Show HN: Motif – Scala-like pattern matching with Java 8 by leothekim on Wednesday July 22, 2015 @06:29PM (#9932796)
As a point of reference, compiling ~200 Scala classes at a time would take ~2.5 minutes on average. At my last job, compiling >2000 Java classes took about 10-15 seconds with an ant script doing a top-down build. Unfortunately I don't remember LOC, but I don't remember the average Scala file being overly large at my Scala job, or the average Java file being unusually short at my Java job.
Re:Show HN: Motif – Scala-like pattern matching with Java 8 by lmm on Thursday July 23, 2015 @06:00AM (#9934822)
> Unfortunately I don't remember LOC, but I don't remember the average Scala file being overly large at my Scala job, or the average Java file being unusually short at my Java job.

LOC isn't what should count though - there are cases where 1 line of Scala offers functionality that would take 10 or more lines of Java to implement.

Re:Show HN: Motif – Scala-like pattern matching with Java 8 by AdieuToLogic on Wednesday July 22, 2015 @10:37PM (#9933667)
> As a point of reference, compiling ~200 Scala classes at a time would take ~2.5 minutes on average.

Odd... I just did a full compile of a Scala project I work on which has:

- 259 source files

- Contains dozens of macros[1]

- Results in 2097 classes (includes companion objects and anonymous types)

And it took 75 seconds on my laptop. As I mentioned in another reply, doing a full recompile is rarely needed but was done now to provide quantified metrics.

1 - http://docs.scala-lang.org/overviews/macros/overview.html

Re:Show HN: Motif – Scala-like pattern matching with Java 8 by leothekim on Wednesday July 22, 2015 @11:34PM (#9933826)
In Java, I compile around 250 classes in about 6 seconds on my laptop. It results in around 250 class files being generated because no filea for anonymous inner classes are created from the lambdas in the code. I don't need a full recompile either. An incremental compile in Java is measured in milliseconds. IntelliJ is usable to its fullest instead of being a fancy editor that just autocompletes and jumps to symbol definitions.

You may not be using all of scala's language features. I'm using java's features to the fullest. I compile in 6 seconds. You compile in 75 seconds. You may still prefer that trade off. After working with thousands of scala files (you have 259 source files? That's cute! I wish I could pinch your cheeks!) where a 75 second compile sounds like a fail-fast error, I think I will live happier with what Java 8 has, limited and warted though it may be.

Re:Show HN: Motif – Scala-like pattern matching with Java 8 by AdieuToLogic on Thursday July 23, 2015 @11:36AM (#9936389)
You have no idea my background, how I use Scala, and assume that the small project I reference is the only project I _could_ reference. It was chosen due to being near the size of the situation you describe as "compiling ~200 Scala classes at a time would take ~2.5 minutes."

Being a condescending asshole doesn't help you communicate with others. Frankly, it strengthens my opinion that you don't know how to organize a medium-sized project, since being able to do so obviates requiring to compile 2000+ files for each build _in any language_.

Re:Show HN: Motif – Scala-like pattern matching with Java 8 by carterehsmith on Wednesday July 22, 2015 @06:48PM (#9932867)
Question - I don't know much about Scala - how often does one need to do a full build? I am talking regular development cycle, ie make a change, save/compile, check if it works etc. I mean typically a compiled language will have some 'incremental compile' to compile just the file you edited. Does that work with Scala?
Re:Show HN: Motif – Scala-like pattern matching with Java 8 by AdieuToLogic on Wednesday July 22, 2015 @09:52PM (#9933532)
> Question - I don't know much about Scala - how often does one need to do a full build?

Not often at all.

> I am talking regular development cycle, ie make a change, save/compile, check if it works etc.

sbt[1] supports incremental compilation and projects such as Play[2] leverage this to support "on-the-fly" recompilation while the container remains running.

1 - http://www.scala-sbt.org/0.13/docs/Understanding-Recompilati...

2 - https://www.playframework.com