4 ms·
I think Lisp and Scheme have excellent macro systems, which are eminently worth stealing. I don't think OCaml will evolve into them on the type-system level th
by yminsky 12y ago
I think Lisp and Scheme have excellent macro systems, which are eminently worth stealing. I don't think OCaml will evolve into them on the type-system level though...
- hajile 12y agoShen lisp has the world's only turing complete type system (making it even more advanced than Haskell's system).
- emiljbs 12y agoDo you really want a turing complete type system? Being turing complete does not necessarily mean more powerful for real world applications.
- read 12y agoThank you for Shen Lisp, I wasn't aware of it. The downside of the phrase Turing complete is that there isn't a practical limitation that instantly comes to mind when you hear that phrase. You don't hear people say "Oh no, that wouldn't be Turing complete". Complete or not, how does it affect a real application?
- pjc50 12y agoFor a type system, being Turing complete is a disadvantage: you can't prove that your typechecker will always terminate.
- chriswarbo 12y agoThe result is even stronger: we can prove that it will sometimes not terminate! Still that's not too bad, since type checking is always conservative: if a program passes, we know it's correct(ly typed). If it doesn't pass, we don't gain any knowledge: it may be incorrect, or it may be correct in a way which the type checker's limited algorithm cannot determine (ie. a Goedel sentence). I'm very concerned whether my programs terminate/coterminate, since having to kill them part-way-through could cause corruption and other nastiness. Whether the type-checker terminates or not I don't really care about; I can just kill it after a certain timeout and keep fiddling with my code until it passes, just like any other type error. Of course, a timeout removes Turing-completeness, but that timeout is under my control at the commandline, rather than being an inherent property of the algorithm.
- hajile 12y agoThis is only partially true. The type system is only unable to prove termination if you choose to use those constructs which may disallow termination.
- chongli 12y agoI don't know about you but I'd rather not have my type checker hang and force me to interrupt the process all the time.
- lmm 12y agoIt's not the only one by any means. E.g. scala's type system is turing complete - http://michid.wordpress.com/2010/01/29/scala-type-level-encoding-of-the-ski-calculus/ http://michid.wordpress.com/2010/01/29/scala-type-level-enco...
- ufo 12y agoYou should check out some dependently typed languages.
- chongli 12y agoWith the downside of undecidable type inference and checking. Haskell's type system really hits the sweet spot between power and decidability.
- emiljbs 12y agoThe thing about the OP is that Lisp isn't well defined. The only constant is that what Lisp is changes, so it's really not that useful to talk about Lisp as "the final language" because there will always be new Lisps. The only common thing between the Lisps seems to be the s-expressions and metaprogramming.
- wes-exp 12y agoDialects evolve, sure. Although it's worth noting that if one had adopted Common Lisp in the '90s one would have a stable base that is today, 20 years later, still ahead of basically everything on the language level (except for the type system as noted in other comments).