- Scala PR review checklist
- Scala SIP Template / review checklist
- Finalize classes/methods in stdlib
- Unused code detection / eradication
- optimize local lazy vals that don't escape
package sbtcomplete | |
import sbt._ | |
import complete.JLineCompletion | |
import Keys._ | |
object SbtComplete { | |
private val CompletionsCommand = "completions" | |
private val CompletionsBrief = ("<arg>", "The string to complete.") |
// [info] Running p.Run | |
// List(Fish(Bob, Esq.,12), Kitty(Thor, Esq.,java.awt.Color[r=255,g=200,b=0])) | |
package misc | |
import java.awt.Color | |
trait Pet[A] { | |
def name(a: A): String | |
def renamed(a: A, newName: String): A |
Using every tool in the box to squeeze out some more compiler performance.
JMC / JFR resources:
# You will need Mercurial; get it with `brew install hg`. | |
hg clone http://hg.openjdk.java.net/jdk8u/jdk8u | |
cd jdk8u | |
hg update jdk8u92-b14 | |
chmod +x ./get_source.sh; ./get_source.sh | |
cd hotspot/src/share/tools/hsdis | |
wget http://ftp.heanet.ie/mirrors/gnu/binutils/binutils-2.26.tar.gz | |
tar -xzf binutils-2.26.tar.gz | |
make BINUTILS=binutils-2.26 ARCH=amd64 |
Java 8 introduced lambdas to the Java language. While the design choices differ in many regards from Scala's functions, the underlying mechanics used to represent Java lambdas is flexible enough to be used as a target for the Scala compiler.
Java does not have canonical heirarchy of generic function types (ala scala.FunctionN
), but instead allows a lambda to be used as a shorthand for an anonymous implementation of an Functional Interface
Here's an example of creating a predicate that closes over one value: