Skip to content

Instantly share code, notes, and snippets.

@supermanue
Created April 11, 2022 17:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save supermanue/d9b09ef6d53f40724466d8dd19d57a23 to your computer and use it in GitHub Desktop.
Save supermanue/d9b09ef6d53f40724466d8dd19d57a23 to your computer and use it in GitHub Desktop.
better type system
case class Person(name: Name, surname: Surname)
def getPerson(name: Name, surname: Surname)
val person = Person("manuel", "Rodriguez")
getPerson(person.surname, person.name)
//DOES NOT COMPILE, THANK YOU GODS OF SCALA
getPerson(person.name, person.surname)
//this is greater than beer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment