Here is example of how it works in C# 6:
http://video.ch9.ms/ch9/4419/cea3b3e4-715a-4279-b161-5962e4464419/VSToolboxCsharpVS2015withMadsTorgersen.mp4
time from 19:40 to 22:00
They demonstrate nameof on simple variable but it can be applied to anything,
especially I’am thinking about callable
Hello Bishop,
For your first example I do not know what will be the best way but assume
something like:
God::create(God::chicken);
In cases when you are giving strings to PHP (like in example with
$_REQUEST[‘animal’]) all should work as is
Idea of nameof (at least in my understand
I do like Acme::class syntax, when you start using it you cannot stop.
Guys from C# implemented similar but more powerful feature: nameof(Acme),
nameof(Acme.AnyMethod)
https://msdn.microsoft.com/en-us/magazine/dn802602.aspx
Imagine how much confidence it will give you while renaming you