DEV Community

Athul Muralidhar
Athul Muralidhar

Posted on • Updated on

The Universal Compiler for Markdown proposal

  • we see an increase in markdown as a standard for documentation all over the internet
  • we already have transpilers, compilers that compile between languages
  • The leap from existing transpilers to a transpiler from markdown to whatever target language is a matter of time.

Some examples of current use in Markdown can have a computer language like syntax, for ex:


echo "deadly command"
rm -rf *
Enter fullscreen mode Exit fullscreen mode

you actually type:
backtick backtick backtick bash
your code
backtick backtick backtick

or python


print("have you tried importing this?")
import this
Enter fullscreen mode Exit fullscreen mode

same with python:
backtick backtic backtick python
your code
backtick backtick backtick

So the backticks can actuly identify the target language that the code snippet points to. In that way we can have a meta program that chooses what compiler / interpreter the code snippet should go to

So with such back-ticks followed by language name, we can make one MD file with multiple languages in it. What do you guys think?

Discussion (2)

faraazahmad profile image
Syed Faraaz Ahmad

I'm unable to understand what you're trying to convey here. Can you please expand on it and give some examples. There might be a good idea hiding in there

athulmuralidhar profile image
Athul Muralidhar Author

Hey, Yes - it was pretty cryptic. I hope this edit makes more sense haha