Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm digressing a bit, but what language is used here? A skim-over looks like Prolog, but recommendation links at the bottom say Scala. Are the functions (when, and) predefined and not part of the language itself?


It's Scala. They show the definitions of the "When" and "And" in the post:

  case class And(contract1: Contract, contract2: Contract) extends Contract
  case class When(date: LocalDate, contract: Contract) extends Contract
It's basically a DSL on top of Scala.


Not a digression, one of the reasons for this post was to practice Scala a bit further.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: