r/programming • • Jun 27 '20

HTML++: Write HTML documents using C++ templates

https://github.com/csb6/html-plus-plus
62 Upvotes

15 comments sorted by

26

u/Hipolipolopigus Jun 27 '20

If nothing else, I don't hate the syntax.

17

u/st_huck Jun 28 '20

It looks very reasonable even for actual use but then I imagined how compiler errors would look like

16

u/How2share4secret Jun 28 '20

Every day we stray farther from God...

4

u/JohnnyElBravo Jun 28 '20

This is esoterical, right?
I'd like to propose the following mashups:

Downstream: an assembler to C code-generator

Ourobouros: A Python to C compiler

Merge: An (Objective-C and Java) to javascript transpiler.

Cross stream: A .Net vm written in Java and a JVM written in C#

1

u/[deleted] Jun 29 '20

The first one is just a decompiler like Ida or Ghidra

The second one is Cython

4

u/marco89nish Jun 28 '20

Kotlin wore it better

1

u/D_0b Jun 28 '20

far from it. with all the + and { }

1

u/marco89nish Jun 28 '20

I think the pluses are not necessary with newer versions of Kotlin and {} is lot more common way to make a scope than <>. Not sure about latest C++ compiler but you used to get 10 page error for smallest error in templates, so I'd take Kotlin's type-safe DSLs over it any day od the week.

2

u/Compsky Jun 28 '20

Honestly might be very useful for one of my projects. Would be nice to replace macros with templates.

1

u/[deleted] Jun 28 '20

God why

1

u/ednark Jun 28 '20

And we have just reinvented php.... congrats

-27

u/GayAnalMan2 Jun 27 '20

please, write in Rust ?