Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sounds like a lot of fun! I'm a Clojure user feeling queasy about leaving s-expressions, but am very interested in the type safety. Signing up now...


I founded and help maintain a very large Clojure codebase and to be honest, I am sick to death of not having a real type system to help me.

Sure, we can test the crap out of our code watching for npe's. We can lint like crazy. We can write large integration tests to better understand the larger picture better. But ultimately nothing is as pervasive as the compiler relentlessly asking you to be clear.

What's more, the benefits of a language like OCaml (where Tagged unions, GADTs, direct modeling of errors via an Either composition, etc. rule the day) on your code leads you to a really good place when the codebase is sufficiently large.

Giving up s-expressions and monads is indeed a sad thing. I'd miss it.


You don't need to leave monads in OCaml (in fact, I'd be very sad to not be using them regularly). Typically the Lwt, Option, and Error monad. (Also speaking as a former Clojurer).


Could you expand on "former Clojurer"? :)


I used to write a fair bit of Clojure, in 2009-2011, but have moved to mostly OCaml these days.


Is there a reason you didn't consider F#?

I'm contemplating similar chnages to my tool chain.


> I founded and help maintain a very large Clojure codebase and to be honest, I am sick to death of not having a real type system to help me.

What sort of size is the breaking point in your opinion?

I've recently made the move from f# to Clojure and I'm significantly more productive but I'm worried that when I get to larger projects (10-100kloc) I will come unstuck.


It'd be much more fruitful to talk about this directly rather than via a forum where I am rate limited. :(

If you reach out to me via email you'll probably find me. You can find that email by searching for my username on the C2 wiki. Posting it here would be troublesome.


What about core.typed?


What about it?


I believe it qualifies as a "real type system", doesn't it?


Not really? We have a lot of options for opt-in run time verification, and then we can find new and interesting ways to break static verifiers with macros.

I don't mean to imply that core.tyoed is fictitious but I wouldn't consider it a substitute for real, pervasive static typing.


Read Real World OCaml and you'll find plenty use of S-Expressions for serialization and configuration due to Core libs by Jane Street :).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: