sdf45's comments

sdf45 | 10 years ago | on: How to Write Unmaintainable Code (1999)

While the advice in the article is funny, on a deeper level the author seems to argue that program text is a rather basic representation that often obstructs insight into the semantics of the program.

The quest for other program representations is still open. The state of the art uses text as "storage" format plus an IDE that does some semantic analysis to help the developer navigate. Many of the ideas mentined in the article (navigation, coloring, auto-format) have been integrated into IDEs and editors.

With almost 20 years of research between the article then and now, what semantic techniques are you dreaming of in your development environment? What are you missing? What feature would greatly improve your productivity (but is possibly too costly to implement by yourself)?

sdf45 | 10 years ago | on: CloudFlare starts discussion about LuaJIT project governance

I don't know much about Lua and LuaJIT, so let me ask a naive question:

If you would start out with a JavaScript JIT (like V8) what things would you have to add (i.e. things that are not required to JIT JavaScript) besides the obvious modifications in the parser?

One point I can think of is support for efficient compilation of co-routines.

sdf45 | 10 years ago | on: Let’s sunset C/C++

First of all a graph library does not communicate with the outside world.

My point was that even for the ubiquitous task of implementing a graph structure, unsafe is necessary.

So while Rust may provide a clean separation between unsafe and safe code (enforced by the type system), the original problem remains: How do we ensure correctness of the unsafe parts of the code.

sdf45 | 10 years ago | on: Let’s sunset C/C++

While tooling may help, I think that a completely new approach is necessary.

The correctness invariants of complex C++ programs (such as browsers and JITs) cannot be 'discovered' by static analysis - they must be, at least in part, supplied by the programmer.

C and C++ were not designed to allow programmers to specify such invariants (and have them automatically checked). I am not convinced that introducing them can be done in a clean way.

sdf45 | 10 years ago | on: Let’s sunset C/C++

Please show me how to implement a graph library without using unsafe in Rust.

sdf45 | 10 years ago | on: Let’s sunset C/C++

As of yet, a browser (in particular the JavaScript JIT) cannot be implemented in a safe language.

It is not even clear how a safe language that would permit this would look like.

Thinking that banning C/C++ magically solves all problems is naive.

page 1