4 ms·
Can someone give me some pointers to reading material on this. I'm aware of hot code reloading for interpreted languages, google just gives links to web page l
by benj111 8y ago
Can someone give me some pointers to reading material on this.
I'm aware of hot code reloading for interpreted languages, google just gives links to web page loading. I'm also aware of it at the OS level. I don't really understand why you'd want this in a compiled language.
- scriptkiddy 8y ago> Can someone give me some pointers to reading material on this. Wish I could help you with this, but I have been out of the loop with Nim recently. > I don't really understand why you'd want this in a compiled language. Quick iteration in development. Not needing to manually recompile every time you make a small change.
- lloda 8y agoor recompute the data you're working with.
- lispm 8y ago> I don't really understand why you'd want this in a compiled language. Why not?
- kazinator 8y ago> why you'd want this in a compiled language. Shared-library-based plugins, kernel modules, ...
- detaro 8y agoIf you understand why people have it in interpreted languages, why do those reasons not apply to compiled languages?
- benj111 8y agoBecause for an interpreted language you can use it for interactive development. I had thought different reasons would apply to a compiled language but judging by the other replies obviously not!
- lispm 8y agoOne can use compilers for interactive development, too. That's not a feature of being 'interpreted'.
- benj111 8y agoInterpreters tend to have repls, which tends to influence how development happens. I'm not stating an absolute law though. I think you may be misinterpreting my original question. It was asked out of ignorance, it wasn't a challenge. I was hypothesising some kind of self modifying code, or realtime adaptive optimising or something. I was attempting to show you my current level of knowledge so you could ELI7 instead of 5 :)
- akavel 8y agoIt's mostly just that the feature is always useful (that's why it's present so often in interpreted langauges), but muuuuuch harder to do for non-interpreted languages. Notably, a subsequent goal for the Nim feature is indeed to add a full-blown REPL to Nim too, I believe. Also, worth to note that some non-interpreted languages do also have REPLs, e.g.: Haskell, OCaml, C++ (! — see CLING).
- benj111 8y agoI'm aware of plenty of exceptions myself. Forth, and I've even come across an ASM REPL. Theres exceptions the other way, Awk is interpreted but doesn't as far as I'm aware have a REPL, Sed doesn't either. But then both of those have varying implementations, so there could be exceptions to the exceptions.
- p_l 8y agoThe very term REPL comes from a language that's been used compiled to native code since 1960s (Lisp) In fact, "compiled" programs on many platforms require an interpreter to set them up by dynamic code loading (including modifications if needed). In ELF header, it's called "program interpreter", which gives a path to a program that understands this particular file and can assembly a running image in memory