10 ms·
The age of dynamic languages will be over when you see a modern static language that supports self-modifying runtime environments as well as Common Lisp or Smal
by lisper11 11y ago
The age of dynamic languages will be over when you see a modern static language that supports self-modifying runtime environments as well as Common Lisp or Smalltalk presently do.
This is an area where the state-of-the-art in static languages (Haskell, Idris, Agda) falls flat, and I suspect that's why (other than ignorance) we see so many comparisons from Haskell advocates between Haskell and the likes of Python, Ruby, or worse that try to paint dynamic languages as offering only brevity through the omission of type signatures as a major advantage over common static languages--an advantage for which Haskell can largely compensate--while completely ignoring the capabilities more sophisticated dynamic languages offer.
- solomatov 11y ago>The age of dynamic languages will be over when you see a modern static language that supports self-modifying runtime environments as well as Common Lisp or Smalltalk presently do. Example of such a language is Java. It's runtime is highly dynamic. Class loaders allow you to create new classes, pre-process bytecode, and many other stuff.
- js8 11y agoI used to think the same thing.. but then I read http://www.haskellforall.com/2012/06/you-could-have-invented-free-monads.html http://www.haskellforall.com/2012/06/you-could-have-invented... and my jaw dropped. This is a formal way to do homoiconicity, and frankly much better than codewalkers and CPS-conversions and similar tricks. I now think that everything you can do with macros in CL, you can do in Haskell too and it will be cleaner. Another good example are lens and traversals, they are generalizations of generic references such that CL can only envy. Someone should really rewrite On Lisp and Paradigms of AI in Haskell.. (and also Design Patterns from GoF) I think it would prove this point.
- incepted 11y agoThe JVM has supported the kind of environment you describe for more than a decade. Fire up IDEA or Eclipse, put a break point in your code and modify it at runtime at your heart content. You can even rerun portions of your code after you've modified it (rewind it), something that even Smalltalk never supported.
- lisper11 11y ago> The JVM has supported the kind of environment you describe for more than a decade. Fire up IDEA or Eclipse, put a break point in your code and modify it at runtime at your heart content. The JVM is a virtual machine targeted by many languages, some of which are dynamic, and Java isn't a "modern" static language from the standpoint of type theory and provability. In Pharo Smalltalk, for example, you can pause running code in the debugger and modify it using syntax the language doesn't actually support, and then, in the same runtime, open a class browser and modify the compiler to support the new syntax before finally accepting your changes in the debugger and resuming execution. You can swap every reference to one object with references to another object using become:, effectively swapping the identities of two objects globally at runtime. Perhaps all of this is possible in Haskell and the like, but it's still to be demonstrated. > You can even rerun portions of your code after you've modified it (rewind it), something that even Smalltalk never supported. Smalltalk and Lisp both support this.
- incepted 11y ago> Smalltalk and Lisp both support this. Interesting, do you have a few pointers?
- lisper11 11y agoFor Smalltalk, look at Pharo. For Lisp: http://malisper.me/2015/07/07/debugging-lisp-part-1-recompilation/ http://malisper.me/2015/07/07/debugging-lisp-part-1-recompil... http://malisper.me/2015/07/14/debugging-lisp-part-2-inspecting/ http://malisper.me/2015/07/14/debugging-lisp-part-2-inspecti... http://malisper.me/2015/07/22/debugging-lisp-part-3-redefining-classes/ http://malisper.me/2015/07/22/debugging-lisp-part-3-redefini... http://malisper.me/2015/08/05/debugging-lisp-part-4-restarts/ http://malisper.me/2015/08/05/debugging-lisp-part-4-restarts... http://malisper.me/2015/08/19/debugging-lisp-part-5-miscellaneous/ http://malisper.me/2015/08/19/debugging-lisp-part-5-miscella...
- incepted 11y ago