From 340141bb76d30da45882c0a38c3817512bd9dbc4 Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Mon, 21 Sep 2020 13:38:45 +0200 Subject: [PATCH] Update README.md Added an example. --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ab5f82720..ff1fff758 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,17 @@ C3 tries to be an alternative in the the C/C++ niche: fast and close to the meta - Avoid "big ideas" & the "more is better" fallacy. - Introduce some higher level conveniences where the value is great. +### Example code + +```c++ +module hello_world; +import std::io; + +func void main() +{ + io::printf("Hello, world!\n"); +} +``` ### In what ways do C3 differ from C? @@ -114,4 +125,4 @@ the r/ProgrammingLanguages Discord: https://discord.gg/cfu4wdk - If you wish to contribute with ideas, please file issues on the c3docs: https://github.com/c3lang/c3docs instead of the compiler. - Discuss the language on discord to help iron out syntax. - Stdlib work will soon start, do you want to help out building the C3 std lib? -- Do you want do do real compiler work? Everyone is welcome to contribute. \ No newline at end of file +- Do you want do do real compiler work? Everyone is welcome to contribute.