http://d.puremagic.com/issues/show_bug.cgi?id=7947


bearophile_h...@eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_h...@eml.cc


--- Comment #2 from bearophile_h...@eml.cc 2012-04-20 04:39:34 PDT ---
(In reply to comment #1)

> And, long years, typeof(template) returns void.
> Therefore, typeof(x => x) == void is current implementation design.
> 
> I don't know why typeof(template) returns void, but changing the behavior will
> break some existing meta-programming codes.

I think it's acceptable to break such meta-programming code. I think
pragma(msg, typeof(tem)); should show something useful when tem is a template
function (like the name of the template if it has a name, or a lambda template
plus line number if it has no name).

There are people working on an algorithm to automatically synthesize good names
for anonymous functions, but probably it's overkill in D "Naming Anonymous
JavaScript Functions":

http://blog.getfirebug.com/2011/04/28/naming-anonymous-javascript-functions/

http://code.google.com/p/querypoint-debugging/downloads/detail?name=NamingJSFunctions.pdf

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to