1. Use Yoneda Lemma. Its intuitive explanation is:
You work at a particle accelerator. You want to understand some particle. All
you can do are throw other particles at it and see what happens. If you
understand how your mystery particle responds to all possible test particles at
all possible test energies, then you know everything there is to know about your
mystery particle.

2. Use Howard Curry isomorphism. It states something like:
A program is a proof that from a given business problem a certain solution
(proposed by a business domain expert) can really be derived. I.e. it's not the
programmer solving problems. All the solutions exist per se already. The
programmer just connects a problem with a particular solution by writing some
code.

So:
- For every method using global variables create its functional version with
  object types, e.g.:
old: int foo(int x) { return x + this.y;}
new: Integer fooFunctional(Integer x, Integer y) { return x + y;}

- For every function create its fully typed version:
old: Integer fooFunctional(Integer x, Integer y) { return x + y;}
new: FooType fooFunctionalTyped(XType x, YType y) { return x + y;}

where XType and YType may be e.g. only odd or even Integers and FooType is
an union of XType and YType.

- simplify your type system

- profit! :)

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to