re: You Either Have It Or You Don't VIEW POST

FULL DISCUSSION
 

when you focus on pure data.

what is the different between

{:name "mr. b" :age 12}
{:name "mr. b" :age nil}
{:name "mr. b"}
{:name nil :age nil}
{}
nil

what's the problem maybe could solve?

 

True, but how do you encode business requirements? What does the defrecord look like? Is this what spec is for?

 

It is different if you have different use cases on when :name has been specified, or not.

In a static type system, those use cases are encoded in a type, which becomes integral part of the information carried by the data. In dynamic type systems these are (hopefully) encoded in documentation and tests.

There is place and use for both systems.

code of conduct - report abuse