Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124042 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id A3E0D1ADA7E for ; Sat, 29 Jun 2024 15:27:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719674921; bh=9ErTCKxUXNwKr3zvgHrJY/ar80d36BhIC6nX9Ieik68=; h=References:In-Reply-To:From:Date:Subject:To:From; b=Nz1ZJu5QmWfQcvWL3rZfyZ4pvfJFExjaMEBFxZ8qJDluYcWCZKSy6qi4OSyvztvGW EPQPeIwX0ruAa0H5k9bf0T2ymw+W9eBshFLc7Z2gL4zOuYvwF77GV6nbQ+GqACIRIf ZDAccnRU+IMPahT/+vfi+JQj9CAGzcq4tkZ5mVKN2LCMt57AbJB5xFm66MdEMPQ69V 5E4eWuOOu90hlpvBNGS/jmIKgWfUYEJJv/P3b3onzUYlBJrKCUfybmwKOjNEja7yHP PWG/J+QHr8dDSEorJa0PN7mcNyBU05Ilwq7E2aGFSvqdHJDbM7/Px+ty0xJahzxr7f evxoJWiskJ8Jg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2F28B181776 for ; Sat, 29 Jun 2024 15:28:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-oi1-f175.google.com (mail-oi1-f175.google.com [209.85.167.175]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 29 Jun 2024 15:28:37 +0000 (UTC) Received: by mail-oi1-f175.google.com with SMTP id 5614622812f47-3d55e963db5so868530b6e.2 for ; Sat, 29 Jun 2024 08:27:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719674837; x=1720279637; darn=lists.php.net; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=9ErTCKxUXNwKr3zvgHrJY/ar80d36BhIC6nX9Ieik68=; b=dbArUHoDVSKYRbJjiGdE2M8WLeUFLrZGafCISHpMC5UDVz8G6IqFyMXlx4vxn9CDaB RqlBoEHCRxnXRI9EosmcioJm8xgBPtU8hxpzAnTVsvyn+bD8tXpne0qn9+6N0uwZBOZo RI0Kw4nNPpiv7puNzYizLKlhZl4Z0zIM2JsmAO/QcyumjHL6lJttCOIRxj84jajtqWoc 9Dr7UD/RNyFLS59ARoOXR1HuNqnkrYReH2W9L9k8azMsMpq2bWAW7MlEyBXYhXOGu3Mt D94RTcl8QTTMIrG7YC1BL/CMhKP1hlUJiEM7s7Bf0SlcikyuUjqB9dPIvQZZyVJ42Z4e 0hdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719674837; x=1720279637; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9ErTCKxUXNwKr3zvgHrJY/ar80d36BhIC6nX9Ieik68=; b=Vqw59PAqUamT7UkdoBoJOSVm6yF6KZ74afjdHKJjCKcCIkyWQ3pK8VrfCNhAnsg8ZC VIa1uXKfmvUcGJjoTMsaMmicR/fdF2WapunQ4/Ay8wPwyF1IJKvItJIRn2YtG+38pJ8m dh5qxT7sAnTccxyJdcF2//nvqJ2dZ7ztP/58l88WGLZs6KGCnA5aVbi8IFJ9h55vhdFB dIx0e7NLcajhOgBLplBs0dlfFbKFr1pvd42fmLYVz1eqdwQzruDIbqUo+82gAwFTKzg1 o87FX+RFDPTi202UR2mQkIieukvMvPOfXPuPO4YUmD/V6aytHeX/C0IpVPYKQl/ug9+e DLDg== X-Gm-Message-State: AOJu0YzLwImCsWF1LshULOwZboEtmL7mxHcdUKQwyTh8GDaMFSM5+O9z WhaW1T4ROcYJJb3OFrBQIH4C18ZwmHpUWwoFTwRmHp6xuEanLxuIZceX/6O5SFG7eIFhzreepWq BkapR4vcUz9tA4tcsvET7emP20J/8zg== X-Google-Smtp-Source: AGHT+IHkVcdIhzrQoqZGFWtwwrv22+J+E8hmTut9AYwYWzQQth8rM3UfnQ/ifPtV/cQy1nUMBZIJLQiKC5TfwzOyPkE= X-Received: by 2002:a05:6808:114b:b0:3d5:43c8:1a5d with SMTP id 5614622812f47-3d6b4de269dmr1495973b6e.58.1719674837434; Sat, 29 Jun 2024 08:27:17 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: <0acedb8e-34be-4348-907b-4075cf7641fd@app.fastmail.com> <9c20b078-f82a-47fe-af23-2f3cdd233079@app.fastmail.com> <50529C6A-42BB-4D49-B720-FE1847577484@rwec.co.uk> <97EA49E2-43A9-42D2-B493-A6B66CC54914@edison.tech> In-Reply-To: Date: Sat, 29 Jun 2024 11:27:05 -0400 Message-ID: Subject: Re: [PHP-DEV] [Initial Feedback] PHP User Modules - An Adaptation of ES6 from JavaScript To: PHP internals Content-Type: multipart/alternative; boundary="000000000000d08e67061c08ff3d" From: tendoaki@gmail.com (Michael Morris) --000000000000d08e67061c08ff3d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Jun 29, 2024 at 7:15=E2=80=AFAM Rob Landers wro= te: > > 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. > > --000000000000d08e67061c08ff3d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sat, Jun 29, 2024 at 7:15=E2=80=AF= AM Rob Landers <rob@bottled.codes> wrote:
=

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

JavaScript uses prototypical inheri= tance, 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".=C2= =A0=C2=A0

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

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

--000000000000d08e67061c08ff3d--