For the early adopters and experimenters amongst you, you might like Felix http://felix-lang.org/share/src/web/tutorial.fdoc It is a whole program optimized, strongly typed, polymorphic, ML like language that can interact effortlessly with C and C++ code and has coroutines baked in. Its own demo webserver is based on coroutines. It uses a mix of lazy and eager evaluation for performance and compiles down to C++. Exec…
> compiles down to C++. Execution speed is comparable to C++, mostly better. Uh, what. Can you clarify?
Real World OCaml
81–83 of 83 posts
Re: Real World OCaml
#82Earlier quoted context omitted.
> compiles down to C++. Execution speed is comparable to C++, mostly better. Uh, what. Can you clarify?
This seems counter-intuitive to people who don't write compilers, but a language that compiles to C++ can perform "better than C++" because it can emit code that no human would bother writing, usually taking advantage of information available in the source language that couldn't be safely determined by the C++ compiler alone. Whole program optimization, for example, allows you to do a lot of aggressive reorganization…
It's just annoying when people will do anything to get on the "faster than C++" wagon.
Re: Real World OCaml
#83Earlier quoted context omitted.
Rust was originally implemented in OCaml, though. You're correct theyre not exactly in the same category, but there is influence there.
OCaml is a popular tool for implementing languages, IIRC the javascript referecence standard was implemented in ocaml as well.