Hacker News new | past | comments | ask | show | jobs | submit login

Adjectives, to me, are more unresolved but I think Clojure's protocols appear to be close to the right answer.

Adjectives are properties or classes of things, like Numeric or Closeable (with-open pattern) or Monad. The Haskell solution is type classes. The Java solution is OOP. The Erlang solution (fairly similar) is the actor model, which is the inspiration for OOP's principle of locally interpreted functions/methods (as opposed to global function definitions). OCaml's is functors, which are extremely powerful but hard for most people to use.




Perhaps protocols/interfaces are like restrictive adjectival phrases, and metadata like non-restrictive.

Just in case you don't know: Restrictive clauses limit the possible meaning of a preceding subject, whereas non-restrictive clauses tell something about a preceding subject, but do not limit its meaning.

Example of restrictive use: The suspect in the lineup who has red hair committed the crime.

Example of non-restrictive use: The suspect in the lineup, who owns a red car, committed the crime.




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

Search: