3 ms·
so it's hot code reloading on steroids? really neat idea, I'm working on a similar Lisp-style language and will probably adopt this idea (and cite you of course
by behnamoh 2y ago
so it's hot code reloading on steroids? really neat idea, I'm working on a similar Lisp-style language and will probably adopt this idea (and cite you of course). In my language, you can redefine any symbol, even numbers, so (def 10 12) is valid code (so is (def def 42), which breaks `def`!).
I wonder what use cases there are for such extreme flexibility, aside from funs and games!
- anonzzzies 2y agoNone; it's for fun and games. But maybe thats the most enjoyable use case anyway.
- Kimbsy 2y agoI couldn't agree more
- Kimbsy 2y agoPlease feel free to use any/all of it, it's really fun to play around with.
- v9v 2y agoRedefining 'def' is a trick used in Tcl to make "safe" configuration languages exposed to the end user. You define all of your configuration options as functions and then undefine everything else (including "proc" which corresponds to defun) allowing you to evaluate users' config files with this safe interpreter as code. I can't find a good source for this practice of manually undefining functions, but here is a link to relevant built-in functionality: https://www.tcl-lang.org/man/tcl8.6/TclCmd/safe.htm https://www.tcl-lang.org/man/tcl8.6/TclCmd/safe.htm