Re: [PHP-DEV] nameof feature

2015-06-03 Thread Alexandr Marchenko
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

RE: [PHP-DEV] nameof feature

2015-05-12 Thread Rowan Collins
On 12 May 2015 17:08:16 BST, Alexandr Marchenko wrote: >Idea of nameof (at least in my understanding) is to reduce string usage >and replace them with “strongly” typed “pointers” which can give us >feedback while script is processed (like when you misstyped method name >php will give you fatal er

RE: [PHP-DEV] nameof feature

2015-05-12 Thread Alexandr Marchenko
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

Re: [PHP-DEV] nameof feature

2015-05-12 Thread Bishop Bettini
Hi! On Tue, May 12, 2015 at 9:29 AM, Alexandr Marchenko < marchenko.alexa...@gmail.com> wrote: > > 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