Re: Deprecate posix_times

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: Deprecate posix_times
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-121560@lists.php.net to get a copy of this message
Hi, I would like to echo the sentiment expressed by Tim earlier in another subthread: >If a function cannot be safely or correctly used at all, then it shouldn't exist, >especially if there are working alternatives [1]. > >Expecting users to find a warning in the docs to learn that they should "never" use a >function is not good developer experience. I am aware that the function is defined by the POSIX standard but 1) Not all POSIX functions are currently exposed by the POSIX extension, sysconf being one of the missing ones (with IMO no good reason to add it) 2) I am not aware of the historical reasons that lead to the addition of a duplicated, less capable function to the POSIX standard (I'm super duper sure there's some reason related to an implementation detail of some 30+ year-old platform :), but PHP isn't a POSIX-compliant OS, it is not PHP's task to expose the entirety of the POSIX standard functions: PHP's task is to provide a simple to use language that also exposes some *useful* functions from the POSIX standard, and posix_times does not fit the definition, in my opinion. Regards, Daniil Gentili.

« previous php.internals (#121560) next »