Announcement

Collapse
No announcement yet.

PHP 8.0 Likely To Have A New JIT Engine

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Also, if we could stop talking about "compiled languages" and "interpreted languages" like the distinction exists, that'd be great. Implementations are compiled or interpreted, not the language. I realize the hypocrisy there having just started my last post with "interpreted languages" in the first sentence, so I'll just say that I meant to say interpreted implementations. I can't edit the post, so a quick follow-up post is the closest thing I can do.

    (although if anyone knows of a language that can only be interpreted or only compiled, that would be a very interesting thing to see! But I doubt it's possible. A compiler could just compile an interpreter plus the code and have the interpreter be the entry point of the program. Maybe that wouldn't count?)

    Comment


    • #12
      Originally posted by reepca View Post
      Also, if we could stop talking about "compiled languages" and "interpreted languages" like the distinction exists, that'd be great. Implementations are compiled or interpreted, not the language.
      I thought the distinction existed because "interpreted languages" had features or a syntax more suited to being "interpreted", like say for bash scripts that you can generate commands at runtime by placing command names or arguments inside variables and then assembling them like
      $var1 $var2 $var3

      Otherwise why people is still using PHP instead of an "interpreted C++"

      Comment


      • #13
        Originally posted by starshipeleven View Post
        I thought the distinction existed because "interpreted languages" had features or a syntax more suited to being "interpreted", like say for bash scripts that you can generate commands at runtime by placing command names or arguments inside variables and then assembling them like
        $var1 $var2 $var3

        Otherwise why people is still using PHP instead of an "interpreted C++"
        That language feature are available at runtime is something that I am confident some will classify as being interpreted and others will not. To me, being compiled will always mean that it executes native code. SBCL is a Common Lisp implementation and compiler (generates very efficient code, considering the constraints put on it), and it would be quite simple to write a Lisp program that does what you describe.

        I don't know why people use PHP, because I don't know much about PHP. I'm afraid the memes have kept me away. That and that it's associated with web programming, which is not something I enjoy at all. So far, at least. But if they use it for its runtime language features, they could just as easily be using Common Lisp at least and it would likely be faster.

        Comment


        • #14
          Originally posted by reepca View Post
          That language feature are available at runtime is something that I am confident some will classify as being interpreted and others will not. To me, being compiled will always mean that it executes native code.
          We are talking about languages here. You can compile whatever language into native code if your compiler can do it, so using "executes as native code" as a way to differentiate languages auto-fails.

          I'm saying what is the most obvious difference LANGUAGE-SIDE from what are usually called "interpreted" and what are called "compiled". Because for most languages being "interpreted" or "compiled" is an arbitrary decision made by those making the compiler, and they made this arbitrary decision because they had a specific use-case in mind for their language and its features.

          That trick I said above for example is forbidden in most compiled languages, mostly for safety reasons (if you managed to inject stuff in those vars you'd get it executed, which is usually VERY FUCKING BAD for programs running as native code).

          But for scripting languages it is acceptable, because scripting/interpreted languages are meant to reduce massively the time of development (at the cost of safety and performance).

          SBCL is a Common Lisp implementation and compiler (generates very efficient code, considering the constraints put on it), and it would be quite simple to write a Lisp program that does what you describe.
          I've only heard people talking about Lisp, never a SINGLE one that is actually using it to do anything. I had to wikipedia that as I never knew this subdialect. And I work with webapplications (from the sysadmin side, but anyway).

          But if they use it for its runtime language features, they could just as easily be using Common Lisp at least and it would likely be faster.
          As I said above, performance isn't everything. Also development speed (and minimum developer experience required to produce something working) is important. How is this SBCL for developers? Is it easy to learn and relatively easy to use?

          Comment


          • #15
            Originally posted by starshipeleven View Post
            We are talking about languages here. You can compile whatever language into native code if your compiler can do it, so using "executes as native code" as a way to differentiate languages auto-fails.

            I'm saying what is the most obvious difference LANGUAGE-SIDE from what are usually called "interpreted" and what are called "compiled". Because for most languages being "interpreted" or "compiled" is an arbitrary decision made by those making the compiler, and they made this arbitrary decision because they had a specific use-case in mind for their language and its features.
            I think people tend to use "interpreted" and "compiled" as sloppy terminology for the constellations of features enabled by very dynamic or static language design. (eg. You can't compile Python to native code, because the compiler doesn't have enough information to produce a machine code representation more useful than appending a zip of .pyc files onto python.exe the way py2exe does.)

            Conversely, you can't call eval() or exec() in C without embedding a C interpreter within your compiled program to provide them.

            Originally posted by starshipeleven View Post
            I've only heard people talking about Lisp, never a SINGLE one that is actually using it to do anything. I had to wikipedia that as I never knew this subdialect. And I work with webapplications (from the sysadmin side, but anyway).

            As I said above, performance isn't everything. Also development speed (and minimum developer experience required to produce something working) is important. How is this SBCL for developers? Is it easy to learn and relatively easy to use?
            I'd say the #1 problem with Common Lisp dialects like SBCL is how alien they seems to curious developers used to the popular languages of today.

            1. The original Lisp predates all modern programming languages (just as EMACS and Vim predate modern keybindings) so it uses "strange" keywords like "defun" and "cons".

            2. The syntax is purely based on nesting parenthesized lists and uses prefix notation exclusively.

            For example, instead of "1 + 2 + 3", you'd write "(+ 1 2 3)"

            3. While Common Lisp is a multi-paradigm language, it feels like a functional language that grew other forms of use while more popular multi-paradigm languages like Pyrthon are imperative languages which grew other forms.

            What I do know is that Lisp apparently has unparalleled support for metaprogramming and it was used for Yahoo! Stores for a while before they rewrote it to get access to a larger developer market.

            Comment

            Working...
            X