Comment

Comment by zonidjan

Array destructuring: already existed, list() pseudo-function

Array spreading: already existed, array_merge

Variadic functions: are probably better implemented as a function accepting an array, especially now that there's a proper array syntax instead of a pseudo-function. Also already existed, func_get_args.

Argument unpacking: already existed, call_user_func_array

Arrow functions: are not any shorter, and are less clear, than anonymous functions.

Literally the only item on your list that was any good for the language is the null coalescing operator. The rest are just re-implementing something that PHP already had, in yet another incompatible (and often unclear) way.

Hell, good luck coming across '??' and trying to find any documentation on what it does. Searching Google for 'php ??' returns results for 'php', searching php.net for '??' returns seemingly random functions, going to php.net/?? gives you the homepage.

parent zonidjan 6 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton