On Jul 29, 2009, at 9:45 PM, Grant Rettke wrote:

On Wed, Jul 29, 2009 at 12:09 PM, Abdulaziz Ghuloum<[email protected]> wrote:
And now for something completely unexpected:

 Ikarus now supports most of PLT's scribble syntax!

Nice!

How are you using it so far?

I just finished implementing it, and would probably revise the implementation before I make serious use of it, but I did implement it anyways because it's cute (the idea, not its implementation!). Basically, it would make many things much more pleasant to the eye. E.g., if you want to write some C code in your Scheme program, it gets ugly fairly quickly since you have to escape all backslashes and double quotes. With the scribble syntax, you just do:

> @string-append{
    #include "foo.h"
    char* foo(int c){
      return bar(c, "hello\n");
    }
  }
"#include \"foo.h\"\nchar* foo(int c){\n return bar(c, \"hello\\n\"); \n}"

Another straightforward use would be for writing regular expressions: @rx{^\w*(.*)} reads better than anything else.

Are you generating documentation using it?

Docstrings using scribble syntax would be cute, but I haven't worked out all the details yet.

Aziz,,,

Reply via email to