4 ms·
There's one language I know that gives nearly all of those things, which is Ur (of the ur/web framework fame). Modules, type classes, eager evaluation, HKTs. It
by thinkpad20 11y ago
There's one language I know that gives nearly all of those things, which is Ur (of the ur/web framework fame). Modules, type classes, eager evaluation, HKTs. It even adds features that aren't in either language such as first-class records and row polymorphism, type-level programming, macros and probably more. It's apparently very high performance, and even has a nice C FFI. The major downside is that it's only meant to be used for writing web servers, and for whatever reason, despite the huge number of features it supports, there seems to be little demand (or effort) to broaden its usage beyond this role. It also suffers from poor documentation, both from a language manual perspective as well as the compiler itself, which quite frankly has some of the sparsest comments I've ever seen in a code base of its size (when I was perusing before, there were practically zero comments across tens of thousands of lines of code). So yeah, probably not headed for the mainstream in its current state. Also I don't think there's much in regards to parallism in the language, although this might be able to be put in a library ¯\_(ツ)_/¯
- catnaroek 11y agoI've played with Ur/Web before, and I'm very impressed with its type system, but unfortunately I don't have much use for it, because, as you mentioned, it can only be used to make Web applications, which I don't find terribly interesting. I even remember telling Adam Chlipala on Freenode at some point in time, that it would be very nice if Ur could be used for more general-purpose programming.
- thinkpad20 11y agoYes, I asked him a similar question a while back when I was investigating the language. I recall the response was something along the lines of that he wrote the language primarily for research into type-safe web APIs, and the language's features were a means to that end rather than an end in themselves. This is unfortunate because as a language it's one of the most exciting that I know of, but like you I have little interest in web apps. In fact with its current compiler (AFAIK) it can only be run as a web server, which means it's not even possible to write a program which just writes Hello World to stdout and exits. This was frustrating enough to me that I soon gave up on the language. :(