PHP vs Perl

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ScriptWorkz
    Confirmed User
    • Jul 2007
    • 274

    #51
    Originally posted by brandonstills
    I like the way you think and respond ScriptWorkz. I'm not intending this as a bash, I'm just pointing out what I don't like and wanting to find a better solution. So many people would take it as an insult to their favorite programming language and get defensive (as can be seen above). This could have easily escalated into a flame but I think both of us are only interested in exploring the options and learning from each other.

    I'm not hating PHP, it's just that after you use other languages and get used to some of what they offer, it's a pain to go back to PHP. Many PHP programmers that learn Ruby feel this way. They don't want to go back because it feels like having to use a horse once you've driven a car.

    I've recently been studying compiler design and comparing a lot of different languages. I want to write my own language as an exercise.

    Actually, what I would really love to see is for something like Microsoft's dynamic language runtime or Sun's Da Vinci Machine project that can be written in any language and deployed to a server. Too many environments force you to use a language. They are going to compile to bytecode anyways, why not let you write your own bytecode in whatever language you want? The main problem is having a common open-source platform to deploy to.

    I've also thought it might be cool to implement a virtual machine inside of PHP so you can run bytecode compiled in other languages. Obviously not ideal for performance, but for backend admin tasks you aren't submitting hundreds of forms per second.
    No point in bashing / flaming in an argument that doesn't have any definite right answer.
    Besides, not really that often there is a thread like this here.

    There won't be any standardised system that lets us deploy anywhere with any language any time soon, but i guess one can dream.

    I just mainly didn't want to see php get a bum rap in this thread, some people have different opinions on what a language should be and as you said everyone that works w/ code can be a little touchy about their personal favorite. As for me, i like the stricter syntax in php that you complain about, that structure allows me to ensure that things behave the way i meant them too.

    Comment

    • mrkris
      Confirmed User
      • May 2005
      • 2737

      #52
      Originally posted by brandonstills
      I'm not hating PHP, it's just that after you use other languages and get used to some of what they offer, it's a pain to go back to PHP. Many PHP programmers that learn Ruby feel this way. They don't want to go back because it feels like having to use a horse once you've driven a car.
      Ding ding! I find it a pain to go back to PHP for this very reason. I love PHP for what it is, but doing stuff in a language that is as object oriented as Python/Ruby, makes other languages look like childs play.

      PHP-MySQL-Rails | ICQ: 342500546

      Comment

      • ScriptWorkz
        Confirmed User
        • Jul 2007
        • 274

        #53
        Originally posted by mrkris
        Ding ding! I find it a pain to go back to PHP for this very reason. I love PHP for what it is, but doing stuff in a language that is as object oriented as Python/Ruby, makes other languages look like childs play.
        See i learnt ruby after php but with my mindset, i prefer to work w/ php, i don't like having too much control of the way things work taken from me, and i have my own standardised code library i use stuff from in most of my projects, so i already have a bunch of nice classes, functions, etc... that take alot of the heavy lifting out of the things i do all the time.

        Comment

        • Tempest
          Too lazy to set a custom title
          • May 2004
          • 10217

          #54
          Originally posted by brandonstills
          Functions are second-rate citizens in PHP. They can't be stored in variables and can't be passed as parameters.
          Look into call_user_func();

          Comment

          • Tempest
            Too lazy to set a custom title
            • May 2004
            • 10217

            #55
            Originally posted by baddog
            Okay, yeah . . . the base is probably there, getting it to work is something else. One module needs another which needs three more, etc, etc
            Yeah it can be a pain but it also depends on your host... Usually the only module(s) I need installed are the DBI/DBD:mysql ones.. The biggest problem these days is hosts that don't know what they're doing any more.. Was doing a script for someone and his host (isprime) got it wrong about 3 times before they finally got the proper modules installed.

            Comment

            • brandonstills
              Confirmed User
              • Dec 2007
              • 1964

              #56
              Originally posted by Tempest
              Look into call_user_func();
              I've used PHP reflection before. It's not the same. Thanks though.

              Brandon Stills
              Industry and programming veteran
              [email protected] | skype: brandonstills | ICQ #495-171-318

              Comment

              • Mutt
                Too lazy to set a custom title
                • Sep 2002
                • 34431

                #57
                wow this thread smells of geek - don't stab anybody with your slide rules if anybody loses their cool!

                i keed i keed

                i love programmers
                I moved my sites to Vacares Hosting. I've saved money, my hair is thicker, lost some weight too! Thanks Sly!

                Comment

                • ScriptWorkz
                  Confirmed User
                  • Jul 2007
                  • 274

                  #58
                  Originally posted by brandonstills
                  I've used PHP reflection before. It's not the same. Thanks though.
                  call_user_func doesn't really have anything to do specifically with reflection, it's just a way to call variable functions (atleast that's the reason i'm assuming he mentioned it), http://us.php.net/call-user-func

                  Comment

                  • nation-x
                    Confirmed User
                    • Mar 2004
                    • 5370

                    #59
                    If you work on CMS solutions alot and have time to learn Python then I highly recommend Django

                    Comment

                    • Klen
                      • Aug 2006
                      • 32235

                      #60
                      I cant belive nobody mentioned TCL yet

                      Comment

                      • ScriptWorkz
                        Confirmed User
                        • Jul 2007
                        • 274

                        #61
                        Originally posted by KlenTelaris
                        I cant belive nobody mentioned TCL yet
                        I can believe it, i dunno how many of the people in this thread have ever heard of TCL let alone used it. I myself have only played w/ it briefly, i think at the time i was screwing w/ a framework called wxWindows.

                        Comment

                        • fhgmaster
                          Confirmed User
                          • Sep 2006
                          • 187

                          #62
                          If you want to write code that people can simply upload to a server, stick with PHP.

                          Frameworks like RoR, Django or other programming languages might be more fun or speed up your development, but you'll spend the time saved explaining your users/customers why they can't use your program with their hoster.

                          Comment

                          Working...