not to mention its much harder to implement in language, whereas its trivial in the library. Also, it makes instrumentation easier, if one wants to add a callback/logging/breakpoint for a particular cast operation. Seems much harder with language solution.<br>
<br><div class="gmail_quote"><div class="gmail_quote" style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><div class="im" style="color:rgb(80,0,80)">On Fri, Jun 7, 2013 at 6:53 PM, Mrzlga <span dir="ltr"><<a href="mailto:bulletproofchest@gmail.com" target="_blank" style="color:rgb(17,85,204)">bulletproofchest@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Timothy,<br><br>How do you get everyone to use:<br> a.Cast!Signed<br>
a.Cast!Unsigned<br> a.Cast!Const<br> a.Cast!Immutable<br> a.Cast!Shared<br><br>And to stop using:<br> cast(const)<br> cast(immutable)<br> cast(shared)<br> cast(inout) ?<br><br>And have everyone be consistent about it?<br>
<br>Remove the cast() ones from the language?<br></blockquote><div><br></div></div><div>not suggesting deprecating cast(), just suggesting there's no need to extend the language as it can be done in library code, advantageously. It's trivially extensible as I wrote it. However, any language extension has to be re-implemented by each compiler implementation. </div>
<div class="im" style="color:rgb(80,0,80)"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">And what about variations, 'shared const', 'inout shared', etc?<br>
</blockquote><div><br></div></div><div>it's trivial to add to my code a.Cast!"shared const" or a.Cast!SharedConst, etc, as well as more complex ones.<br></div><div class="im" style="color:rgb(80,0,80)"><div>
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">There are some things that should be available to the language, even when no modules are imported. I think dealing with the basic type system is like that.<br>
</blockquote></div></div><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
Not if the syntax sugar provided by the language is no simple than that provided by library solution. I've argued library solution is more consistent with UFCS (see my code). </div></div>