Hacker News new | past | comments | ask | show | jobs | submit login

Gosu[1]has a very similar feature--I think it might have even had it for longer than F#! Too bad almost nobody uses it: it's a nice language that makes a perfect complement or replacement for Java.

[1]: http://gosu-lang.org/

Gosu was actually the first language I ever used at a real job (well, an internship), which is not a common distinction :P. That also means that my current OCaml internship actually uses a more common language! I bet none of the other interns here can claim having professionally used a language markedly less popular than OCaml.




Interesting, assume you are referring to Gosu's open type system; in practice how does work?

I'm skeptical that Gosu's equivalent comes anywhere close to: http://vimeo.com/user18356272/review/66548723/a0d91288e1

It's fucking ridiculous, look at what is happening there and ask yourself, does a similar feature exist in my primary development language?

As a Scala user I cannot answer yes.


I think it offers the same functionality: you can create new types from any source you want. This includes everything from automatically parsing and loading database model files in your path to adding structural subtying as a library feature. It also integrates with the tooling, although I only ever used it from Emacs and so didn't see that myself.

The API for actually using the open type system was quite awkward and undocumented back when I used it, but it's probably improved by now.

My main language is probably Haskell or maybe OCaml. We don't have anything quite like that, but we can get quite far just with Template Haskell or Camlp4. E.g. I'm sure I could implement the regular expression example with a Template Haskell quasiquoter. Maybe not quite as slick, but certainly serviceable. I also don't know about tooling support because I'm still using Emacs for everything :P.


nice video, that was a good watch.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: