3 ms·
I think the Roslyn compiler does something similar to what you're suggesting. http://www.dotnetcurry.com/csharp/1258/dotnet-platform-compiler-roslyn-overview h
by grokys 10y ago
I think the Roslyn compiler does something similar to what you're suggesting.
http://www.dotnetcurry.com/csharp/1258/dotnet-platform-compiler-roslyn-overview http://www.dotnetcurry.com/csharp/1258/dotnet-platform-compi...
> Every time a developer changes a single character in any of the files, a new copy of all the data structures is created, leaving the previous version unchanged. This allows a high level of parallelism and concurrency in the Roslyn engine, as well as in its consumers, thereby preventing any race conditions to occur. Of course, in the interest of performance, these operations are highly optimized and reuse as much of the existing data structures as possible. Again, those being immutable makes this possible!
- stevedonovan 10y agoRight! That's a compiler designed to be used as a service! Most compilers are usually in a terrible hurry to build that executable before people start playing with light sabers or thinking about new programming languages [1]. I first thought about this when working on UnderC, a hopelessly over-ambitious C++ interpreter. Functions could be recompiled, because there was an indirect reference to the actual code. And this is of course exactly how Lisp people used their compiler. (The 'image' reference of course is to Smalltalk) [1] https://commandcenter.blogspot.co.za/2012/06/less-is-exponentially-more.html https://commandcenter.blogspot.co.za/2012/06/less-is-exponen...