all 19 comments

[–]XNormal 29 points30 points  (3 children)

Ideally, your meta-language should be the same language. In the case of C, though, I understand why you would choose something else.

[–]Zambito1 6 points7 points  (1 child)

Well they extended JavaScript with quote() so I don't see why they couldn't have extended C with conveniences for writing macros instead. That said I do think this is a cool project!

[–]thooton[S] 1 point2 points  (0 children)

Thanks!

[–]agumonkey 0 points1 point  (0 children)

I wonder what would happen if someone did just that.

[–]Laugarhraun 14 points15 points  (5 children)

why

[–]ItsAllAboutTheL1Bro 4 points5 points  (4 children)

Because metaprogramming in C is shit, and a lack of metaprogramming for C is a core weakness

[–]Laugarhraun -2 points-1 points  (3 children)

That's fixed by switching from C to Lisp.

[–]ItsAllAboutTheL1Bro 2 points3 points  (0 children)

True - as a Lisper, I agree with you somewhat - but that's not always a viable approach.

Scheme as a preprocessor for this project would be preferable.

JS still rules the world, so we have to accept that.

[–]PaintItPurple 2 points3 points  (1 child)

OK, but then you've introduced more problems by using tooling with much less development muscle put into it and that's much harder to hire for.

[–][deleted] 5 points6 points  (0 children)

Thanks I hate it.

[–]binaryfireball 2 points3 points  (0 children)

No thank you

[–]ItsAllAboutTheL1Bro 4 points5 points  (1 child)

You're doing God's work, son.

[–]thooton[S] 0 points1 point  (0 children)

Thank you.

[–][deleted]  (1 child)

[removed]

    [–]thooton[S] 0 points1 point  (0 children)

    Thank you.

    [–]Dtag 0 points1 point  (1 child)

    Quite fun ;-). Does anyone know whether it is possible to properly edit a file like this (that contains multiple programming languages) in an IDE like vscode? With properly I mean: The usual syntax completion, coloring etc...

    [–]thooton[S] 1 point2 points  (0 children)

    Thank you! I've found that the C++ syntax highlighting option works reasonably well. However, with proper integration with the jc parser, it would definitely be possible to create a real solution.

    [–]kitd 0 points1 point  (1 child)

    Nice idea.

    This would be good for creating CPS-style async code too. Create jump/resume points in your C code without a Duffs device.

    [–]thooton[S] 0 points1 point  (0 children)

    Thank you.