<div dir="ltr"><div class="markdown-here-wrapper" style=""><p style="margin:0px 0px 1.2em!important">I didn’t mean to emphasize any specific syntax. I’m fine with either <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">@const</code>, <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">@constexpr</code>, <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">@pure</code> or <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">=&gt;</code>.<br>Anyway, I see no reason why generic functions shouldn’t be supported in any of the suggested models.</p>
<p style="margin:0px 0px 1.2em!important">2017-02-17 19:08 GMT+03:00 Abe Schneider &lt;<a href="mailto:abe.schneider@gmail.com" target="_blank">abe.schneider@gmail.com</a>&gt;:</p>
<p style="margin:0px 0px 1.2em!important"></p><div class="markdown-here-exclude"><p></p><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">+1. I think this is a great idea. As I was following this thread, I<br>
was wondering if someone might suggest the C++ constexpr syntax.<br>
<br>
Would this support generics? E.g. could you do:<br>
<br>
    @constepxr<br>
    func foo&lt;S&gt;(a:S, b:S) {<br>
       return a+b<br>
    }<br>
<br>
and have that be done at compile time? While this could potentially<br>
add a huge amount of complication on the backend, I could this as<br>
being useful (also related to my previous postings as to having a way<br>
of determining generic types at compile time).<span class="im HOEnZb"><br></span></blockquote><p></p></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