<div class="gmail_quote">On Mon, Dec 27, 2010 at 4:35 PM, bearophile <span dir="ltr"><<a href="mailto:bearophileHUGS@lycos.com">bearophileHUGS@lycos.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Through Reddit I have found a link to some information about the Clay language, it wants to be (or it will be) a C++-class language, but it's not tied to C syntax. It shares several semantic similarities with D too. It looks like a cute language:<br>

<a href="https://github.com/jckarter/clay/wiki/" target="_blank">https://github.com/jckarter/clay/wiki/</a><br>
<br>
Some small parts from the docs:<br>
<br>
--------------------------<br>
<br>
In Clay this:<br>
<a href="https://github.com/jckarter/clay/wiki/Syntax-desugaring" target="_blank">https://github.com/jckarter/clay/wiki/Syntax-desugaring</a><br>
<br>
static for (a in ...b)<br>
    c;<br>
<br>
is equivalent to:<br>
<br>
{<br>
    ref a = <first element of b>;<br>
    c;<br>
}<br>
{<br>
    ref a = <second element of b>;<br>
    c;<br>
}<br>
/* ... */<br>
<br>
I have an enhancement request about this for D:<br>
<a href="http://d.puremagic.com/issues/show_bug.cgi?id=4085" target="_blank">http://d.puremagic.com/issues/show_bug.cgi?id=4085</a><br>
<br>
--------------------<br>
<br>
The part about Safer pointer type system is very similar to what I did ask for D, and it looks similar to what Ada language does (for Clay this is just a proposal, not implemented yet, but Ada is a rock-solid language):<br>

<a href="https://github.com/jckarter/clay/wiki/Safer-pointer-type-system" target="_blank">https://github.com/jckarter/clay/wiki/Safer-pointer-type-system</a><br>
<br>
--------------------<br>
<br>
This is something that I want for D too, it's important:<br>
<br>
>Jonathan Shapiro (of BitC) makes an excellent argument that, in a systems language, it is often undesirable to depend on the whims of an ill-specified optimizer to convert abstract code into efficient machine code. The BitC specification thus includes the idea of guaranteed optimizations, to allow code to be written in a high-level style with predictably low or nonexistent runtime cost (link). [...] Because Clay seeks to support systems programming with high-level abstraction, certain patterns should be guaranteed to be optimized in a certain way, instead of being left to the whims of LLVM or a C compiler. Additional optimizations should not be prevented, however. [...] It should be possible to specify that one or more of these optimizations is required, and have the compiler raise an error when they cannot be applied for some reason.<<br>

<br>
<a href="https://github.com/jckarter/clay/wiki/Guaranteed-optimizations" target="_blank">https://github.com/jckarter/clay/wiki/Guaranteed-optimizations</a><br>
<br>
Bye,<br>
<font color="#888888">bearophile<br>
</font></blockquote></div><br>+1 for static for and guaranteed optimizations. Can we put it in the wishlist?<br clear="all"><br>-- <br>Atenciosamente / Sincerely,<br>Guilherme ("n2liquid") Vieira<br>