Skip to content

Instantly share code, notes, and snippets.

@Eliah-Lakhin
Last active August 29, 2015 14:00
Show Gist options
  • Save Eliah-Lakhin/2e29ba32782cfddfc2f8 to your computer and use it in GitHub Desktop.
Save Eliah-Lakhin/2e29ba32782cfddfc2f8 to your computer and use it in GitHub Desktop.
Scala vs Erlang deconstruction
val (x, y) = (1, 2) // compiles, no errors in runtime
val a = (100, 200, 300)
val (z, w) = a // I doesn't throw an exception, it just will not compile, since the code syntactically incorrect.
// However Erlang/Elixir will compile it, but throw an exception in runtime.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment