SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 30 of 30
  1. #26
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think it matters much. In dynamically typed languages, the types will be checked at runtime. In static languages the types will be checked at compiletime. The cost of checking at compile time is that you have to type the types explicitely. The benefit is that you don't have to run your code to check types. I don't think this is a real benefit, because you'll run all code anyway to test for other errors.

  2. #27
    SitePoint Guru
    Join Date
    Feb 2006
    Location
    Pittsburgh, Los Angeles
    Posts
    706
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The benefit is that you don't have to run your code to check types.
    The main benefit at least to me is that staticly typed languages help in making a bug-free application. For example if you were to write a complex algorithm in python and then in ML the ML code has a much higher probability of being correct from my experience. Of course something like Java would be in the middle.

    Also the typing enables IDEs to do a lot of work for you, an IDE for a dymanically typed language can't nearly do as much as it can't resolve the types.

    Anyhow, dymanically typed languages have benefits too, but its beyond me why someone would say that static typing is "wrong" for web applications.

  3. #28
    SitePoint Enthusiast
    Join Date
    Nov 2005
    Location
    Norway
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Snaily
    Almost all the scripting languages were conceived as a domain specific language...
    PHP 4 and PHP 5 are "grown up" languages...which features do they lack that prevent them from being such?


    I really really wish people would stop comparing RoR to PHP and Java...RoR is a framework there are PHP and Java frameworks that will do the same, they just aren't as hyped.
    Old thread, but I forgot to answer, so here goes.

    I'm not comparing RoR to PHP. I'm talking about Ruby, the language. I'm not the stereotyped php-basher and rails-praiser.

    One thing I'd love to see in PHP is consistency. First OOP (which I by the way don't claim is the solution to everything) was a slap-on in PHP 4, then in PHP 5 you add interfaces and abstract classes and whatnot, and it still feels like an afterthought. PHP can't decide for itself what it wants to be. The standard library has no conventions whatsoever. There's confusion between references and values. PHP is dynamically, weakly typed, almost the exact opposite of strong typing. And then they go and add type hinting (which doesn't work with builtins)?

    Reflection also feels like an addon. PHP must rely on hundreds of patterns to ensure that programmers to the Right Thing (tm); without, they're totally lost, it seems. Whenever someone complains about how badly many PHP scripts are designed, a bunch of people explain that if they had just used Pattern XYZ, it would all the fine. If these things were obvious and came naturally when using the language, the problem would go away.

    The list just goes on and on. To summarize, PHP doesn't know what it wants to be, and ends up doing none of the alternatives well. I'm not one for language wars (they're fun, but ultimately you've got to choose the right tool for the right job), but I honestly can't see any job for which PHP is the best tool.

    Ruby, Python and friends are great beginner languages, but not PHP.

  4. #29
    SitePoint Evangelist
    Join Date
    Apr 2005
    Posts
    485
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Illuminous
    Old thread, but I forgot to answer, so here goes.

    I'm not comparing RoR to PHP. I'm talking about Ruby, the language. I'm not the stereotyped php-basher and rails-praiser.

    One thing I'd love to see in PHP is consistency. First OOP (which I by the way don't claim is the solution to everything) was a slap-on in PHP 4, then in PHP 5 you add interfaces and abstract classes and whatnot, and it still feels like an afterthought. PHP can't decide for itself what it wants to be. The standard library has no conventions whatsoever. There's confusion between references and values. PHP is dynamically, weakly typed, almost the exact opposite of strong typing. And then they go and add type hinting (which doesn't work with builtins)?

    Reflection also feels like an addon. PHP must rely on hundreds of patterns to ensure that programmers to the Right Thing (tm); without, they're totally lost, it seems. Whenever someone complains about how badly many PHP scripts are designed, a bunch of people explain that if they had just used Pattern XYZ, it would all the fine. If these things were obvious and came naturally when using the language, the problem would go away.

    The list just goes on and on. To summarize, PHP doesn't know what it wants to be, and ends up doing none of the alternatives well. I'm not one for language wars (they're fun, but ultimately you've got to choose the right tool for the right job), but I honestly can't see any job for which PHP is the best tool.

    Ruby, Python and friends are great beginner languages, but not PHP.
    i agree with almost all of what you say, however, i think we need to add that php can be the path of least resistance - even if it isn't the best all around solution.

    iow, php is pretty easy to grasp and program to do useful things. especially simple things. the mind wrap index is high.

    this is good during the initial start up phase. however, as one gets more in depth, the weaknesses of php begin to rear their ugly head.

    i say - start right, even if it is a bit more challenging to learn up front.

  5. #30
    SitePoint Enthusiast
    Join Date
    Nov 2005
    Location
    Norway
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by skeeterbug
    i agree with almost all of what you say, however, i think we need to add that php can be the path of least resistance - even if it isn't the best all around solution.

    iow, php is pretty easy to grasp and program to do useful things. especially simple things. the mind wrap index is high.

    this is good during the initial start up phase. however, as one gets more in depth, the weaknesses of php begin to rear their ugly head.

    i say - start right, even if it is a bit more challenging to learn up front.
    Still, I think Python and Ruby scale down. To the beginner, the difference between
    Code:
    echo "hello world";
    and
    Code:
    puts "hello world"
    is next to none, even though they're really different.


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
  •