{"id":828,"date":"2010-01-02T09:47:28","date_gmt":"2010-01-02T17:47:28","guid":{"rendered":"http:\/\/boost-spirit.com\/home\/?p=828"},"modified":"2010-01-03T09:52:07","modified_gmt":"2010-01-03T17:52:07","slug":"build-a-compiler-what-to-build","status":"publish","type":"post","link":"http:\/\/boost-spirit.com\/home\/2010\/01\/02\/build-a-compiler-what-to-build\/","title":{"rendered":"Build a Compiler, What to Build?"},"content":{"rendered":"<p>Thank you all for your warm feedback on the <a href=\"http:\/\/boost-spirit.com\/home\/2009\/12\/02\/build-a-compiler\/\">\u201cBuild a Compiler\u201d<\/a> post. It seems this has become very popular indeed. I guess it\u2019s time to start. Your overwhelming feedback and comments is enough motivation to carry on with the article series.<\/p>\n<p>In general, an imperative OO language seems to be the way to go. It\u2019s not surprising that C++ is very popular. People want a C++ parser! Barring that, due to complexity, a subset or a sanitized\/re-syntaxed C++ (e.g. SPECS) is also a popular request. Go is also quite popular. That language indeed looks good and modern. FP, especially LISP\/Scheme and even Haskell(!) is also quite popular. And hey: Javascript! and Python! Life would not be complete without these fun languages:-).<br \/>\n<!--more--><br \/>\nHere\u2019s a tally of languages suggested for the project sorted by popularity:<\/p>\n<p>I\u2019ll need some time to think about all these. In the meantime, it\u2019s still not too late to chime in with your comments. This particular post will be dynamic. I will add on it over time based on my thoughts and your feedback.<\/p>\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td width=\"104\">C++<\/td>\n<td width=\"64\">4<\/td>\n<\/tr>\n<tr>\n<td>Lisp\/Scheme<\/td>\n<td>4<\/td>\n<\/tr>\n<tr>\n<td>C<\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<td>Go<\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<td>Haskell<\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<td>C++ SPECS<\/td>\n<td>2<\/td>\n<\/tr>\n<tr>\n<td>Javascript<\/td>\n<td>2<\/td>\n<\/tr>\n<tr>\n<td>Python<\/td>\n<td>2<\/td>\n<\/tr>\n<tr>\n<td>ALGOL-like<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>C++ Subset<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>Chapel<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>Clojure<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>EBNF<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>GIMPLE<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>Forth<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>Java<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>Kaleidoscope<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>Lua<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>OCC<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>Pascal<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>Perl<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>R<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>SML<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>Scala<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>TinyC<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>VB<\/td>\n<td>1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h6>Requirements:<\/h6>\n<p>Here are the requirements thus far:<\/p>\n<ol>\n<li>It will be a statically typed, imperative language of the ALGOL\/Pascal\/C++ family.<\/li>\n<li>It shall be embeddable in your application.<\/li>\n<li>Seamless integration with C++ will be provided with full round-trip calls to and from C++.<\/li>\n<li>There will be zero runtime overhead and zero requirements\/dependencies apart from the C++ standard lib and the LLVM back-end.<\/li>\n<li>It shall target LLVM with its JITC support.<\/li>\n<li>It shall be a practical tool, not a toy for instructional purposes only.<\/li>\n<\/ol>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li><a href=\"#\" class=\"sharing-anchor sd-button share-more\"><span>Share<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><div class=\"sharing-hidden\"><div class=\"inner\" style=\"display: none;\"><ul><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-828\" class=\"share-facebook sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/2010\/01\/02\/build-a-compiler-what-to-build\/?share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\" ><span>Facebook<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-828\" class=\"share-twitter sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/2010\/01\/02\/build-a-compiler-what-to-build\/?share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\" ><span>Twitter<\/span><\/a><\/li><li class=\"share-end\"><\/li><li class=\"share-pinterest\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-pinterest-828\" class=\"share-pinterest sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/2010\/01\/02\/build-a-compiler-what-to-build\/?share=pinterest\" target=\"_blank\" title=\"Click to share on Pinterest\" ><span>Pinterest<\/span><\/a><\/li><li class=\"share-linkedin\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-linkedin-828\" class=\"share-linkedin sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/2010\/01\/02\/build-a-compiler-what-to-build\/?share=linkedin\" target=\"_blank\" title=\"Click to share on LinkedIn\" ><span>LinkedIn<\/span><\/a><\/li><li class=\"share-end\"><\/li><li class=\"share-reddit\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-reddit sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/2010\/01\/02\/build-a-compiler-what-to-build\/?share=reddit\" target=\"_blank\" title=\"Click to share on Reddit\" ><span>Reddit<\/span><\/a><\/li><li class=\"share-tumblr\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-tumblr sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/2010\/01\/02\/build-a-compiler-what-to-build\/?share=tumblr\" target=\"_blank\" title=\"Click to share on Tumblr\" ><span>Tumblr<\/span><\/a><\/li><li class=\"share-end\"><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Thank you all for your warm feedback on the \u201cBuild a Compiler\u201d post. It seems this has become very popular indeed. I guess it\u2019s time to start. Your overwhelming feedback and comments is enough motivation to carry on with the article series. In general, an imperative OO language seems to be the way to go. [&hellip;]<\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li><a href=\"#\" class=\"sharing-anchor sd-button share-more\"><span>Share<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><div class=\"sharing-hidden\"><div class=\"inner\" style=\"display: none;\"><ul><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-828\" class=\"share-facebook sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/2010\/01\/02\/build-a-compiler-what-to-build\/?share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\" ><span>Facebook<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-828\" class=\"share-twitter sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/2010\/01\/02\/build-a-compiler-what-to-build\/?share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\" ><span>Twitter<\/span><\/a><\/li><li class=\"share-end\"><\/li><li class=\"share-pinterest\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-pinterest-828\" class=\"share-pinterest sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/2010\/01\/02\/build-a-compiler-what-to-build\/?share=pinterest\" target=\"_blank\" title=\"Click to share on Pinterest\" ><span>Pinterest<\/span><\/a><\/li><li class=\"share-linkedin\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-linkedin-828\" class=\"share-linkedin sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/2010\/01\/02\/build-a-compiler-what-to-build\/?share=linkedin\" target=\"_blank\" title=\"Click to share on LinkedIn\" ><span>LinkedIn<\/span><\/a><\/li><li class=\"share-end\"><\/li><li class=\"share-reddit\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-reddit sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/2010\/01\/02\/build-a-compiler-what-to-build\/?share=reddit\" target=\"_blank\" title=\"Click to share on Reddit\" ><span>Reddit<\/span><\/a><\/li><li class=\"share-tumblr\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-tumblr sd-button share-icon\" href=\"http:\/\/boost-spirit.com\/home\/2010\/01\/02\/build-a-compiler-what-to-build\/?share=tumblr\" target=\"_blank\" title=\"Click to share on Tumblr\" ><span>Tumblr<\/span><\/a><\/li><li class=\"share-end\"><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div><\/div><\/div>","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_s2mail":"","spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[15],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pIHdZ-dm","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/posts\/828"}],"collection":[{"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/comments?post=828"}],"version-history":[{"count":3,"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/posts\/828\/revisions"}],"predecessor-version":[{"id":832,"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/posts\/828\/revisions\/832"}],"wp:attachment":[{"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/media?parent=828"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/categories?post=828"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/boost-spirit.com\/home\/wp-json\/wp\/v2\/tags?post=828"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}