Page 5 of 5 FirstFirst ... 345
Results 41 to 46 of 46

Thread: Google programming languages

  1. #41
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I think PHP is already "far fewer lines", but just not relative to anything

    There are two major complaints about PHP that are true: 1) the versions change a lot and end up causing problems; 2) the naming conventions are sometimes very odd. (For example file() seems like it should be the default but that does weird stuff with line breaks, while file_get_contents() is actually useful.)

    I don't really think either of those is particularly easy to solve, even with some sort of phpQuery, or whatever.

    Some sort of system-normalizer wouldn't be a bad idea, something that deals with for example magic_quotes and so forth. I don't know how much overall that would accomplish (how much could be accomplished due to security and variation), but as an idea, it's valid.

    Something that really surprises me about jQuery is how smoothly it fits into Javascript, and I really don't understand how that works at all. I can't imagine something parallel for PHP really.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  2. #42
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    I understand what you're saying, John, and I agree. Just to use your example as my own, however, at this point in time, using PHP4 at all should be flatly discouraged.

    Cross-platform compatibility is an issue with PHP, but not nearly as much as in javascript because your script isn't going to unexpectedly switch platforms. I generally like to keep my code compatible with PHP5+, and it's not too hard to do so. Keeping code portable between Apache versions/configurations is harder. And when you write PHP on a Linux server and then run it on Windows, obscure things might happen that will just completely baffle you.

    Yes, it would be good to wrap everything up so that code would work anywhere, but it's not as pressing an issue.

    -----------------
    As for the "fewer lines of code" issue, absolutely. That's where frameworks come in. The problem is that object-oriented PHP is much more daunting than object-oriented javascript. With javascript, you really don't even need to tell anyone that that's what they're doing. jQuery is very approachable: Zend framework is definitely not.


    ...we'll see if this still makes sense to me in the morning. sorry, guys. night

    [edit]
    Daniel, good points. Something that bothers me about PHP is that different functions take similar parameters in different orders - like strpos( $haystack,$needle ) and in_array( $needle,$haystack ). Another example is all of those string functions which aren't UTF-safe. Those sorts of things would benefit from something like phpQuery (as you put it), but there's a trade-off in performance that I'm not sure would be worth it.
    Last edited by traq; 09-13-2012 at 05:12 AM.

  3. #43
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Cross-platform compatibility is an issue with PHP, but not nearly as much as in javascript because your script isn't going to unexpectedly switch platforms.
    That's a crucial point-- in most PHP scripts, you don't need any cross-platform compatibility-- it'll be running on one server and generating the same text output for everything.
    Moving servers can be a pain but with some experience everything works out easily enough (and those few things that are hard are actually very difficult to imagine fixing with something like jQuery).

    The real reason for something like that is for distributing PHP, where you get something similar to the problem of Javascript. It's not quite as big a problem, but trying to write, for example, a forum that works on all servers is at this point a bit of a mess.

    jQuery is very approachable: Zend framework is definitely not.
    Hm. I need to try Zend at some point. I don't have any immediate need for it. But I guess I should have some idea what it is and how it works.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #44
    Join Date
    May 2012
    Location
    Hitchhiking the Galaxy
    Posts
    1,013
    Thanks
    46
    Thanked 139 Times in 139 Posts
    Blog Entries
    1

    Default

    Quote Originally Posted by traq View Post
    C++ is the "sacred" language (if you want to call it that). Java used to have almost as many haters as PHP does. and Python is still a fairly "new".

    Daniel: I didn't think I'd really care about array( ) vs. [ ] , either. But then I tried it.
    Back to one of traq's original posts, python was created 4 years before php.
    "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
    Anime Views Forums
    Bernie

  5. #45
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    didn't mean to imply that it was younger than php, though I didn't know it was that much older. Maybe the python community just complains more about not being taken seriously than the php community does.

  6. #46
    Join Date
    May 2012
    Location
    Hitchhiking the Galaxy
    Posts
    1,013
    Thanks
    46
    Thanked 139 Times in 139 Posts
    Blog Entries
    1

    Default

    Actually, that sounds surprisingly accurate, according to IRC stats, python is the most talked about out of the three.
    "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
    Anime Views Forums
    Bernie

Similar Threads

  1. Date in other languages
    By Rohan72 in forum PHP
    Replies: 2
    Last Post: 12-28-2007, 10:34 AM
  2. What languages do you speak?
    By techno_race in forum The lounge
    Replies: 25
    Last Post: 07-06-2007, 11:56 PM
  3. Other Programming Languages
    By Shotgun Ninja in forum The lounge
    Replies: 9
    Last Post: 02-21-2007, 07:37 PM
  4. How many scripting languages do you know?
    By Freeman in forum The lounge
    Replies: 16
    Last Post: 02-20-2007, 07:57 PM
  5. XML with other languages dificulties!!
    By pavmoxo in forum PHP
    Replies: 0
    Last Post: 10-24-2006, 10:07 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •