Data Deserves a
Language Too
Bernard Lambeau
Université catholique de Louvain (Belgium)
@blambeau
csv,conf – Berlin – 15 July 2014
We’ve got
a serious
marriage issue
between
Code and Data
You can’t
disentangle
them when
designed
conjointly
e.g. try sending a Java Graph abstraction over the wire
to another (non Java) software Component
You can’t
assemble
them when
designed
separately
e.g. try solving the Impedance Mismatch
in a sound and elegant way
Coupling issue known for ages
• Niklaus Wirth, 1976
– The father of Pascal,
Modula 2 and a lot more
• Main message
– Data structures and
Algorithms are highly related
• Yields another coupling issue
– Between software
components
– Hurts evolution
A solution used for ages
• Information Hiding
– Parnas, 1971
• Abstract Data Types
– Liskov, 1974
Avoid coupling between software components
• Encapsulate data
• Access it only via behavioral interfaces
• e.g. the Stack ADT and its axiomatic contract
Software: a black-box cathedral
?
?
?
A Possible Root Cause
• Programming languages & practices have
strong biases towards Behavior
– Type systems & Type checking algorithms
– APIs and documentation
– Testing
• They mostly ignore the Data perspective of
engineering
– To be is too often sacrificed over To Behave
To Be is to be a Value
that is, a member of a Type
• An interesting question is
– Are you, value v, a member of type T ?
• Examples
– Are you 13 an Integer between 0 and 45 ?
– Are you {…} a Member information with a valid
Password, that is, a String of min 8 characters ?
• Useful only if we can capture interesting
Types in the first place
– Sets of values, Arbitrary Subsets, Supersets
– Weak or no support in conventional prog. languages
Data Deserves a Language Too
What would a language strongly
biased towards data look like?
OR
http://www.finitio.io/try
• Finitio is a language for …
– Enforcing
– Validating
– Documenting
– Coercing
• … Datatypes in
– Files
– APIs
– Exchanges
– Databases
• + an interoperability layer: Information Contracts
– A proposed dual to ADTs’ axiomatic contracts
Meet Finitio & Contribute
• http://www.finitio.io/
– The best starting point
• github.com/blambeau/finitio
– Language specification, e2e tests, doc source
• github.com/blambeau/finitio-rb
– Ruby binding
• github.com/llambeau/finitio.js
– Javascript binding

Finitio - Data deserves a language too

  • 1.
    Data Deserves a LanguageToo Bernard Lambeau Université catholique de Louvain (Belgium) @blambeau csv,conf – Berlin – 15 July 2014
  • 2.
    We’ve got a serious marriageissue between Code and Data
  • 3.
    You can’t disentangle them when designed conjointly e.g.try sending a Java Graph abstraction over the wire to another (non Java) software Component
  • 4.
    You can’t assemble them when designed separately e.g.try solving the Impedance Mismatch in a sound and elegant way
  • 5.
    Coupling issue knownfor ages • Niklaus Wirth, 1976 – The father of Pascal, Modula 2 and a lot more • Main message – Data structures and Algorithms are highly related • Yields another coupling issue – Between software components – Hurts evolution
  • 6.
    A solution usedfor ages • Information Hiding – Parnas, 1971 • Abstract Data Types – Liskov, 1974 Avoid coupling between software components • Encapsulate data • Access it only via behavioral interfaces • e.g. the Stack ADT and its axiomatic contract
  • 7.
    Software: a black-boxcathedral ? ? ?
  • 8.
    A Possible RootCause • Programming languages & practices have strong biases towards Behavior – Type systems & Type checking algorithms – APIs and documentation – Testing • They mostly ignore the Data perspective of engineering – To be is too often sacrificed over To Behave
  • 9.
    To Be isto be a Value that is, a member of a Type • An interesting question is – Are you, value v, a member of type T ? • Examples – Are you 13 an Integer between 0 and 45 ? – Are you {…} a Member information with a valid Password, that is, a String of min 8 characters ? • Useful only if we can capture interesting Types in the first place – Sets of values, Arbitrary Subsets, Supersets – Weak or no support in conventional prog. languages
  • 10.
    Data Deserves aLanguage Too What would a language strongly biased towards data look like? OR
  • 11.
    http://www.finitio.io/try • Finitio isa language for … – Enforcing – Validating – Documenting – Coercing • … Datatypes in – Files – APIs – Exchanges – Databases • + an interoperability layer: Information Contracts – A proposed dual to ADTs’ axiomatic contracts
  • 12.
    Meet Finitio &Contribute • http://www.finitio.io/ – The best starting point • github.com/blambeau/finitio – Language specification, e2e tests, doc source • github.com/blambeau/finitio-rb – Ruby binding • github.com/llambeau/finitio.js – Javascript binding