So far I’m not using it in any practical way because I’m not able to load all of the libraries my code depends on! I want to use it for reasons similar to @n4323’s. I’m not using OCaml for statistical inference right now, but that is a good example. R’s repl is used a lot, I think, and some of the commercial statistical packages allow you to run analyses by making choices from drop-down menus, etc. I know one scientist who works that way exclusively.
I am writing population genetics models–abstract models of evolving populations of organisms. I want to know, what happens if I try the model with these parameters? What kind of output will I get? In general, the behavior of a population genetic model will be unlike what happens in a real evolving population if you set the population size to be small, so when you’re experimenting to see what the model does, population size should often be relatively large. With small population size, bytecode is fine, but with large population size, the difference between bytecode and native code is significant. Trying to experiment with an edit/compile/run-from-commandline process is very inconvenient. Among other things, you don’t end up with an output data structure that’s immediate available for inspection in a toplevel unless you do extra work, which seems kind of silly anyway. Why write a large number of floats to a file just so you can immediately read them into the toplevel? Once I have figured out what I want to do with a model, I sometimes decide to build it into a standalone executable, but I don’t want to do that when I’m trying to understand the implications of models I’ve constructed.
About @c-cube’s chicken-egg point, I’d go a little bit farther. It’s not just that existing OCaml users would use a native code toplevel if it worked well, but that this could be part of the appeal for new users. “You get type inference and fast native code in a well-tested functional language, and you get that even when you’re working in a repl, so you can easily do ad hoc experimentation with computationally intensive code.” So maybe there are people who would be more likely to have learned OCaml if there were a native toplevel that worked well and was publicized.
Based on packages I’ve noticed in the opam repository, it’s possible that the range of applications that have been the focus of the OCaml community tend to be ones that don’t benefit as much from from a repl. System tools, for example, probably should be conceived as standalone executable code from the start. That would be another reason that a native toplevel hasn’t seemed crucial to existing OCaml users. If so, then the fact that a native toplevel has seemed relatively unimportant to existing OCaml users might not be an indication of what would be important to potential new users. On the other hand, what’s in opam might not be representative of all of the things that people do with OCaml. (Your point, @gasche, that higher-order logic applications might benefit from a native toplevel makes sense to me, but I don’t do that kind of work.)