Manuel Simoni's language Wat[1] defines a way to define a type in the
following way:
(def (type-tag type-creator type-accessor) (make-type))
Where the `make-type` function returns a triplet described by the
names above. The interesting part about this is that it separates
creation from access allowing one to limit access to one aspect or
both using ad hoc encapsulation mechanisms. This very much in the
spirit of Scheme in that it provides a very clean and powerful core
for programmers to experiment. Additionally, it is a very clever
extension to Scheme that seems fairly obvious in hindsight.
Mr. Simoni talks more about this capability in his blog post at
http://axisofeval.blogspot.com/2012/08/schemes-missing-ingredient.html
Thoughts?