Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


What's PHP Excel at? - Page 3
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

What's PHP Excel at?

13»

Comments

  • nemnem Member, Host Rep

    @jsg said:

    @nem said:
    And then there's Python. I love Python even though I'd never write in it more than is necessary. Such a semantically beautiful language :heart:

    Yes, I used Python for over a decade for scripting jobs but have switched away because it has become a fat monstrosity.

    Have I told you about PHP...

  • raindog308raindog308 Administrator, Veteran

    CConner said: Go is hardly a good alternative to PHP or JS for larger projects.

    Eh? Why? I'd much rather do a large project in Golang than either PHP or JS. Indeed, Go excels at large projects in ways that PHP never will.

  • jsgjsg Member, Resident Benchmarker

    @raindog308 said:

    CConner said: Go is hardly a good alternative to PHP or JS for larger projects.

    Eh? Why? I'd much rather do a large project in Golang than either PHP or JS. Indeed, Go excels at large projects in ways that PHP never will.

    ... because?

  • raindog308raindog308 Administrator, Veteran

    jsg said: ... because?

    It's statically typed, for one thing.

    The alternative is endlessly complex testing units. Sure, you still need testing with Golang, but you get fewer surprises at runtime than at compile time...as is the case with most statically-typed languages vs. scripting.

    Golang also benefits from (a) being designed by actual computer scientists, (b) being designed by people who've written tons of software and have designed programming languages before, and (c) the general reimplementation benefit. It's also much more standardized by design which leads to less ambiguity...ALL programming languages are to some extent "more than one way to do it" but Golang has more "here is how you do it, because it's the right way to do it" opinionatedness.

    Admittedly, I'm a Golang fanboy.

    Thanked by 2Jun jsg
  • jsgjsg Member, Resident Benchmarker
    edited December 2019

    @raindog308

    I'm not sure whether it makes sense to throw a compiled language into a discussipon about a scripting language.

    I'm surprised to learn that you are a Golang fan because I had a closer look at it some time ago and found it lacking. About the only good thing I can say about Golang is its excellent CSP implementation, which is so good that it even compensates for the computer scientist you seem to value highly who actually disappointed with Golang. But then, Pike has basically always been a guy in the second row (and for a reason it seems).

    Finally and IMO extremely important: Golang is a language developed by Google - and obviously corresponding to their needs. That however, that is, handling very high loads (as in "req/s") Golang does indeed well and it's even easy (which is another big plus). If however you are not Google and are not mostly focused on many, many (usually small) requests per second,, if you need a language that is generally useful, fast, running on most hardware and OSs, and with verification tools, good error handling, and good tooling available, Golang isn't the best language to choose, which is why I decided against it.
    Btw. quite some benchmarks suggest that Golang is not even among the top 3 in terms of speed in server focused benchmarks with lots of requests per second.

    Back to scripting languages. Fwiw I meanwhile use lua for my scripting. Really small, really fast (dimensionally faster than PHP, Python, Ruby etc), there are statically typed dialects if needed and it's easy enough for most Pythonistas I guess.

  • nemnem Member, Host Rep

    Why not go with a language you speak best? Programming languages are no better than spoken. Our brains are wired to form grammar/syntax better than other languages based upon early exposure. A programming language is little different from a written language; it's a wiring of the brain. Focus less on the outcomes and more on the constructs to achieve a purpose.

    Golang is a language developed by Google - and obviously corresponding to their needs.

    Ad hominem argument again.

    Thanked by 2vimalware SteveMC
  • jsgjsg Member, Resident Benchmarker

    @nem said:

    Golang is a language developed by Google - and obviously corresponding to their needs.

    Ad hominem argument again.

    Uhm? Stating a well known fact not related let alone addressed to any specific person is an ad hominem? A rather exotic perspective it seems. I'll add another "ad hominem" for you: 2 + 2 = 4.

  • nemnem Member, Host Rep

    Ad hominem is arguing the basis of those that implement the language rather than the language itself. What you're trying to bring forth is felicitous, to prove a point that's as sound as sound itself; quickly fleeting...

  • jsgjsg Member, Resident Benchmarker

    @nem said:
    Ad hominem is arguing the basis of those that implement the language rather than the language itself. What you're trying to bring forth is felicitous, to prove a point that's as sound as sound itself; quickly fleeting...

    Nice and funny theory. In the real world though the leading persons designing and implementing a language are important and do have a very major influence.

    Plus my remark about Pike was merely a side note.

    As you make a living based on some PHP code I can understand that you don't like me and/or my views but kindly try to contribute to the topic of this thread.

  • nemnem Member, Host Rep

    To the same extent I asked for your contribution to Rack911’s audit beyond incessant cynicism. Every language has its value structure as does its industry. Put up or shut up.

    Thanked by 1vimalware
  • jsgjsg Member, Resident Benchmarker

    @nem said:
    To the same extent I asked for your contribution to Rack911’s audit beyond incessant cynicism. Every language has its value structure as does its industry. Put up or shut up.

    And you dare to accuse anyone of ad hominems?

    Re the rack911 "audit" thread you did not address me at all.

    Put up or shut up.

    (a) are you insane or what makes you think you can dictate the rules?
    (b) think again about what you said, because so far you yourself offer neither put up nor shut up.

  • raindog308raindog308 Administrator, Veteran

    nem said: Ad hominem argument again.

    No, but:

    raindog308 said: Golang also benefits from (a) being designed by actual computer scientists, (b) being designed by people who've written tons of software and have designed programming languages before

    ...is closer to ad hominem.

    jsg said: Fwiw I meanwhile use lua for my scripting.

    Give my choice, I choose perl. It seems to be the best intersection of Unix thinking, OOP if you need it, and speed. Admittedly, the vast majority of the perl I've done has been things that are only lightly maintained by others (I write a lot of tools for others) and perl has a "write only" reputation, though I'd argue my own perl is as readable as anyone's python.

    I like python too, but it's too verbose.

    Keep in mind I came to perl from long previous experience with sed/awk/regex/etc. so to some extent I "think in Unix" and hence perl feels really nice. Perl definitely has some warts...I wish the whole 5 vs 6 thing didn't exist and I think where it sets the "batteries included" mark is inappropriately low. Then again, all the python or golang (or php for that matter) often starts with a list of packages to add, so...

    I have used Lua as well but tend to encounter it more as an extension language (i.e., where tcl or that sort of extension language to the main code used to live). Actually, now that I think about it, the last time I used lua was in that exact role - when I used to hack on Angband a bit :-)

  • nemnem Member, Host Rep
    edited December 2019

    @jsg said:

    (a) are you insane or what makes you think you can dictate the rules?
    (b) think again about what you said, because so far you yourself offer neither put up nor shut up.

    Still waiting on a response. I prefer not to call someone out unless it’s a prolonged contentious issue.

    To (b) each language has its own utility. It’s asinine to shit over English because it’s prolific if you speak English and French. Languages, spoken or programmed, achieve this notoriety because of accessibility aside from ignominious reasons.

  • jsgjsg Member, Resident Benchmarker

    @raindog308 said:
    Give my choice, I choose perl. It seems to be the best intersection of Unix thinking, OOP if you need it, and speed. Admittedly, the vast majority of the perl I've done has been things that are only lightly maintained by others (I write a lot of tools for others) and perl has a "write only" reputation, though I'd argue my own perl is as readable as anyone's python.

    Makes sense with your background.

    I have used Lua as well but tend to encounter it more as an extension language (i.e., where tcl or that sort of extension language to the main code used to live). Actually, now that I think about it, the last time I used lua was in that exact role - when I used to hack on Angband a bit :-)

    That was my start with Lua too. It's a nice extension language (although meanwhile I use Pawn for that). But it's capable of much more and frankly I like IUP (a lua based small cross platform GUI) in part because I dislike graphics stuff (incl. GUI stuff); it's just no my cup of tea but lua/IUP makes it bearable. Although to be perfectly honest, for most of my scripting I use an exotic safety focused variant of Lua.

    @nem said:
    Still waiting on a response. I prefer not to call someone out unless it’s a prolonged contentious issue.

    A response to which question you asked there?

    To (b) each language has its own utility. It’s asinine to shit over English because it’s prolific if you speak English and French. Languages, spoken or programmed, achieve this notoriety because of accessibility aside from ignominious reasons.

    Yes, probably each programming language does have its own utility to some. But that's not the issue here.
    Btw. I'm not so sure that it really makes sense to say that human languages are basically the same as programming languages and certainly comparisons rarely make sense.

  • There's a lot of stuff written in PHP and if you're coding for the web you will be extending that stuff so PHP is excellent for that.

  • Reminds me of the talks we had, when I was still young, at school, Turbo Pascal vs C/C++ :)

  • I think I got my answer. PHP is Excel at hosting a lot of low traffic apps. Otherwise it's node js.

    That's the reason why most websites using PHP. Most of the content can be cached anyway.

    But for busy apps that do a lot of update and insert into database, nodejs blow php out of the water.

  • raindog308raindog308 Administrator, Veteran

    What PHP really excels at is recursive acronyms.

    TAKE THAT, Javascript! No matter what you say, PHP is a much cooler name that Javascript, which sounds like it's based on Java even though it isn't.

    PHP was far from the first recursive acronym but it may be the first major programming to use this, er, technology?

    Thanked by 1BharatB
  • BharatBBharatB Member, Patron Provider

    I'd like to add,

    I've worked both on PHP / NodeJS and RoR to some extent, I think the entire thread got derailed at shaming PHP instead of suggesting a proper alternative.

    Just to answer the question OP asked,

    1) Should I jump the ship?

    I'd say it's up to your scope, I personally don't think PHP will die anytime sooner, the community has caught up and is working towards the betterment of the language also thanks to Taylor's Laravel & Lumen.

    2) Where does php excel at?

    The answer to that question would be that it would excel at anything that doesn't deal with continuous requests, without a backend queue processing mechanism in place.

    Thanked by 2SteveMC yoursunny
  • raindog308 said: which sounds like it's based on Java even though it isn't.

    Yes! Now, from a typography point of a view, like node.js, it sounds ... hum... it sounds !

    By the way, totally off-topic, I had a programming teacher, who went hysterical when VBScript came out, and he kept telling it was the future, and so on :)

  • NeoonNeoon Community Contributor, Veteran

    PHP is nice, easy to do stuff with it.
    Its fine for web applications, and some tiny tools, but I would not use it for everything.

Sign In or Register to comment.