User loginNavigation |
LtU ForumGo-style defer-recover exception handling is better than try-catch style?The main advantage of defer-recover exception handling over the try-catch is that it doesn't complicate the control flow of the program. This not only makes programs using defer-recover more readable, but also makes the implementation of this feature in a language much simpler than implementing try-catch exception handling. On the other hand, the main disadvantage (in Go) is that, it does not allow handling exceptions in place close to where exceptions may arise, and the normal execution has to be resumed in the caller of the function that handles the exception. Recently I supported Go-style panic/exception handling by defer-recover in my hobby language Dao (it was mentioned here before, but there have been many changes since then). I solved the mentioned problem in Dao by supporting a new type of code block (tentatively called framed block for convenience). Such framed block allows to handle exceptions around the place they arise, and to resume normal execution right after the framed block (namely in the same function where the exception is handled). This is achieved by executing framed blocks in new stack frames, which reuse/share the stack data of their surrounding functions and trigger execution of deferred blocks at exit as normal. You can find more details in a blog I just wrote. Are there many people here finding Go-style exception handling interesting? I wonder if my improvements could make exception handling by defer-recover more interesting, and better than try-catch? Typographical extensions for programming languages: breaking out of the ASCII straitjacketA paper by Paul W. Abrahams circa 1993, abstract:
Sorry I couldn't find a non digital library link, but maybe this would help. I'm surprised no one has looked at this topic again since, at least in academia. Thoughts? Nesting of quasi-quotationI'm confused by the issue of producing programs using quasi-quotation that themselves use quasi-quotation. Lets use <...> for quotation and ~ for splicing. Consider the expression <...<...~e...>...> where e is some term that produces code. Should that evaluate to the program ...<...e...>... with e spliced in, or should that evaluate to the program ...<...~e...>... that contains a splicing sub-expression? Given the first choice, how would you achieve the behavior of the second choice? And given the second choice, how would you quote a program with a splice outside of a quote? How does that all fit together in a coherent and expressive whole? What about indicating at the splice point to which quotation that splice belongs? Or introduce an escape construct \ so that you can express quoting a splice as <...<...\~e...>...>? A little challengeI noticed a fun thing in the Rust manual, a list of languages that influenced rust. So here's the challenge (insiders ineligible): Which features are inspired by which of these languages? By Ehud Lamm at 2013-05-02 21:52 | LtU Forum | login or register to post comments | other blogs | 3170 reads
MLWorks Project now BSD licensedWhat? MLWorks is an "industrial strength" Standard ML compiler and integrated development environment, developed by Harlequin in the 1990s, recovered in 2013 and open sourced. Molecule: using monadic and streaming I/O to compose process networks on the JVMThis is a paper we presented at OOPSLA 2012:
We have been asked several times if the code was open source during the reviews but unfortunately we did not have the permission to share the code at the time. Now that we have it, I'm pleased to announce that the sources of the library and the benchmarks are available on GitHub. There is also a mailing-list for project specific questions. By Sébastien Bocq at 2013-05-01 20:42 | LtU Forum | login or register to post comments | other blogs | 3155 reads
A retro-active programming languageI've been busy developing the SPREAD language. After a lot of tinkering, I'm pretty much done with the semantics. I believe the result can be considered 'kind of weird' but very powerful. I have a hard time classifying the SPREAD language - may be you can help me classify it? The best classification I've come up with is that SPREAD is 'a retro-active programming language'. Bold claim: retro-active programming subsumes reactive functional programming, and much more. Comments are very much appreciated! Automatic Mutual Exclusion (AME)
to be seen in C# and maybe Python. An interactive approach to teaching programming conceptsWhile comprehending the syntax of a programming language can be challenging to novices, the computational mechanisms represented in a program text can be even more difficult to understand. It is very useful for programmers to develop ways of mentally visualizing a program's computational process. I have been experimenting with an approach that develops the user’s ability to visualize computational processes through puzzle solving and macro building. As the user issues the commands to solve a puzzle, these steps are recorded as a program sequence (similar to recording a macro). I would much appreciate your ideas/feedback regarding this approach. "Relational Model Outgrown" CACM May 2013Summary: References: URL: |
Browse archives
Active forum topics |
Recent comments
9 weeks 5 days ago
9 weeks 5 days ago
9 weeks 6 days ago
9 weeks 6 days ago
10 weeks 3 days ago
10 weeks 3 days ago
10 weeks 4 days ago
10 weeks 4 days ago
10 weeks 4 days ago
10 weeks 4 days ago