Last active
August 29, 2015 14:14
-
-
Save paxer/642e04e72d5c107a967b to your computer and use it in GitHub Desktop.
Love Scala!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ruby | |
class Example | |
def initialize(n,d) | |
raise ArgumentError if d == 0 | |
@n, @b = n, d | |
end | |
end | |
// Scala | |
class Example(n: Int, d: Int) { | |
require(d != 0) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment