Re: [Initial Feedback] PHP User Modules - An Adaptation of ES6 from JavaScript

From: Date: Sat, 29 Jun 2024 15:27:05 +0000
Subject: Re: [Initial Feedback] PHP User Modules - An Adaptation of ES6 from JavaScript
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Sat, Jun 29, 2024 at 7:15 AM Rob Landers <[email protected]> wrote:

>
> With a bit of finangling, you can actually port JavaScript line-for-line
> to PHP, but not the other way around.
>

JavaScript uses prototypical inheritance, and any program that leverages
that aspect of it will be IMPOSSIBLE to port to PHP line for line without a
massive rewrite and restructure that amounts to a hell of a lot more than
"a bit of finangling".

As someone proficient in both languages I find that claim hilarious.

Now granted, there's a lot of JavaScript out there written by programmers
coming from a classical inheritance background (i.e. PHP, C#, Java) who
therefore never leverage prototypical inheritance at all, and those
programs are trivial to port between the languages, but that isn't all
there is to JavaScript.

>
>


Thread (128 messages)

« previous php.internals (#124042) next »