<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 9, 2017 at 3:06 PM, David Blaikie via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote"><span class=""><div dir="ltr">On Mon, Jan 9, 2017 at 2:59 PM Sanjoy Das via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br class="m_1741477346931537050gmail_msg">
<br class="m_1741477346931537050gmail_msg">
Sorry I fat fingered an earlier send in the previous email.  I was<br class="m_1741477346931537050gmail_msg">
trying to say:<br class="m_1741477346931537050gmail_msg">
<br class="m_1741477346931537050gmail_msg">
On Mon, Jan 9, 2017 at 2:52 PM, Sanjoy Das<br class="m_1741477346931537050gmail_msg">
<<a href="mailto:sanjoy@playingwithpointers.com" class="m_1741477346931537050gmail_msg" target="_blank">sanjoy@playingwithpointers.<wbr>com</a>> wrote:<br class="m_1741477346931537050gmail_msg">
>> +1 Exactly this.<br class="m_1741477346931537050gmail_msg">
>> I don't think C programmer will not understand using. The "=" makes it much<br class="m_1741477346931537050gmail_msg">
>> simpler to read, even if it is the first time you see it, which is not the<br class="m_1741477346931537050gmail_msg">
>> case of typedef.<br class="m_1741477346931537050gmail_msg">
>><br class="m_1741477346931537050gmail_msg">
>> typedef MyType::NestedType (*fptr)(const MyOhterType&);<br class="m_1741477346931537050gmail_msg">
>> or<br class="m_1741477346931537050gmail_msg">
>> using fptr = MyType::NestedType (*)(const MyOhterType&);<br class="m_1741477346931537050gmail_msg">
><br class="m_1741477346931537050gmail_msg">
<br class="m_1741477346931537050gmail_msg">
I would prefer to please keep using typedefs at least for function<br class="m_1741477346931537050gmail_msg">
pointers.  I find either of<br class="m_1741477346931537050gmail_msg">
<br class="m_1741477346931537050gmail_msg">
typedef MyType::NestedType (*fptr)(const MyOhterType&);<br class="m_1741477346931537050gmail_msg">
<br class="m_1741477346931537050gmail_msg">
or<br class="m_1741477346931537050gmail_msg">
<br class="m_1741477346931537050gmail_msg">
typedef int fptr(const int&);<br class="m_1741477346931537050gmail_msg">
<br class="m_1741477346931537050gmail_msg">
void f(fptr* ptr) {<br class="m_1741477346931537050gmail_msg">
  ...<br class="m_1741477346931537050gmail_msg">
}<br class="m_1741477346931537050gmail_msg">
<br class="m_1741477346931537050gmail_msg">
easier to read than the "using" declaration (especially the second<br class="m_1741477346931537050gmail_msg">
form, with the explicit `fptr* ptr`).<br class="m_1741477346931537050gmail_msg"></blockquote><div><br></div></span><div>Not sure I follow. You're saying this:<br><br>  typedef int func_type(const int&);<br><br>is easier for you to read than this:<br><br>  using func_type = int(const int&);<br></div></div></div></blockquote><div><br></div><div>I'd say so, one looks like the functions i right. The other looks strange ;)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div><br>?</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="m_1741477346931537050gmail_msg">
-- Sanjoy<br class="m_1741477346931537050gmail_msg">
______________________________<wbr>_________________<br class="m_1741477346931537050gmail_msg">
LLVM Developers mailing list<br class="m_1741477346931537050gmail_msg">
<a href="mailto:llvm-dev@lists.llvm.org" class="m_1741477346931537050gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a><br class="m_1741477346931537050gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" class="m_1741477346931537050gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br class="m_1741477346931537050gmail_msg">
</blockquote></span></div></div>
<br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div></div>