[Issue 9065] Please consider adding these std.traits

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Nov 24 12:13:35 PST 2012


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


Jonathan M Davis <jmdavisProg at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdavisProg at gmx.com


--- Comment #6 from Jonathan M Davis <jmdavisProg at gmx.com> 2012-11-24 12:13:34 PST ---
is(T == function) actually tests whether T is the type of a function, not
whether it's a function pointer. This stackoverflow question discusses the
differences between is(T == function), isFunctionPointer!T, isDelegate!T, and
isSomeFunction!T:

http://stackoverflow.com/questions/11067972/functions-versus-function-pointers-whats-the-difference

A related issue is issue# 4427

We may want to add more of these to std.traits, but we should probably think
carefully about exactly what we should add, especially because is expressions
do most (all?) of it already, and often fairly cleanly. It's just that they're
complicated enough in general and not understood well enough, that many people
don't have a clue what they can do. It still may be worth adding stuff like
isVariable to std.traits though.

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


More information about the Digitalmars-d-bugs mailing list