<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1404.34">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 15.0px; font: 12.0px Helvetica; color: #000000}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 15.0px; font: 12.0px Helvetica; color: #000000; min-height: 14.0px}
p.p3 {margin: 0.0px 0.0px 0.0px 12.0px; line-height: 14.0px; font: 12.0px Helvetica; color: #011892}
p.p4 {margin: 0.0px 0.0px 0.0px 12.0px; line-height: 14.0px; font: 12.0px Helvetica; color: #011892; min-height: 14.0px}
p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Helvetica; color: #000000; min-height: 14.0px}
p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
p.p8 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px 'Helvetica Neue Light'; color: #000000; -webkit-text-stroke: #000000}
p.p9 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #000000; min-height: 14.0px}
p.p10 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #000000}
p.p11 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #929292}
span.s1 {color: #000000}
span.s2 {font: 12.0px Helvetica; color: #000000; -webkit-text-stroke: 0px #000000}
span.s3 {font-kerning: none}
span.s4 {font: 12.0px 'Helvetica Neue Light'; font-kerning: none; color: #3399cc; -webkit-text-stroke: 0px #3399cc}
</style>
</head>
<body>
<p class="p1">On 2016-01-31 13:59:06 +0000, Robert M. Münch said:</p>
<p class="p2"><br></p>
<p class="p3">I like CTFE and the meta programming idea for languages like D.</p>
<p class="p4"><br></p>
<p class="p3">However, I'm wondering why most (everyone?) is trying to do meta-programming using the same language as the one getting compiled. IMO the use-cases a pretty different and doing CTFE, code-generation etc. needs some other approach. If you look at all the strange template syntax, strange hacks etc. it's all far from being obvious.</p>
<p class="p4"><br></p>
<p class="p3">Why not have a CTL (compile-time-language) that has access to some compiler internals, that follows a more functional concept? We are evaluating sequences of things to generate code, include / exclude code etc.</p>
<p class="p4"><br></p>
<p class="p3">From my experience with the different approaches, functional thinking is much better suited and simpler to use for CTFE goals.</p>
<p class="p4"><br></p>
<p class="p3">IMO that would really be a big step ahead. Because you know a hammer, not everything is a nail...</p>
<p class="p5"><br></p>
<p class="p6"><span class="s1">Here is a link http://terralang.org/</span> where these guys mix Lua and their compiled language, to achieve what I was thinking about in the same line:</p>
<p class="p7"><br></p>
<p class="p8"><span class="s2">"</span><span class="s3">In this use-case, Lua serves as a powerful meta-programming language. You can think of it as a replacement for C++ template metaprogramming<a href="http://terralang.org/#footnote3"><span class="s4"><sup>3</sup></span></a> or C preprocessor X-Macros<a href="http://terralang.org/#footnote4"><span class="s4"><sup>4</sup></span></a> with better syntax and nicer properties such as hygiene<a href="http://terralang.org/#footnote5"><span class="s4"><sup>5</sup></span></a>."</span></p>
<p class="p9"><br></p>
<p class="p10">Maybe this better explains, where I think it makes sense to seperate the two levels: language for the buidling-step, and language for the actual solution.</p>
<p class="p9"><br></p>
<p class="p11">--<span class="Apple-converted-space"> </span></p>
<p class="p11">Robert M. Münch</p>
<p class="p11">http://www.saphirion.com</p>
<p class="p11">smarter | better | faster</p>
</body>
</html>