>>16
Don't get me wrong, I like both dynamic and static types, both have advantages and disadvantages. Dynamic types are more flexible, and you don't have to do S&M with the type system (like trying to type
flatten), static types are lovely for the amount of mental masturbation behind them (like trying to type
flatten). Multimethods are a good enough replacement for static types in dynamically typed languages, though you'd still miss nice things like polymorphic constants and return types.
Clay. The idea is (almost) good, but the application is bad. I see three major flaws:
- Lack of a system to group overloaded procedures, like ML modules/functors or Haskell's typeclasses. This means that overloads are just left in the wild, and causes template-induced bloat, because the compiler can't do implicit dictionary passing and has to duplicate the code of the procedure (just like in C++). Scala-like
implicit parameters would be really helpful here.
- Lack of some kind of subtyping, or my
Ord really wants to be a
Eq too.
- Operators are fixed, special syntax for magic overloaded procedures.
The site says it has strong support for metaprogramming, but I don't see any example of it.
Can we please just combine Lisp and Clay? ;_;
I don't think you can force types to Lisp without making it look awkward (see TR), and homoiconicity, types and metaprogramming don't play too well together.
If you want a concise, statically typed language, surrender to Haskell.