STRONG dynamic typing favors tools..?

Discussion in 'Ruby' started by John Papas, Jan 7, 2008.

  1. John Papas

    John Papas Guest

    One of the things I like about languages like Java is that since it is
    statically typed I get tools that assist me when I write code, for
    example if I misspell a function name.

    What I really hate about dynamic languages is that, for example in
    JavaScript if I misspell something there is no tool to find it and no
    (deterministic) test locate this bug. I could actually deploy and find
    the mispelled name only when I get its use case.

    Does the fact that Ruby is STRONG dynaically typed, assist tool
    developers? Can I have tools with minimal analysis capabilities?
    John Papas, Jan 7, 2008
    #1
    1. Advertising

  2. John Papas wrote:
    > One of the things I like about languages like Java is that since it is
    > statically typed I get tools that assist me when I write code, for
    > example if I misspell a function name.
    >
    > What I really hate about dynamic languages is that, for example in
    > JavaScript if I misspell something there is no tool to find it and no
    > (deterministic) test locate this bug. I could actually deploy and find
    > the mispelled name only when I get its use case.
    >
    > Does the fact that Ruby is STRONG dynaically typed, assist tool
    > developers? Can I have tools with minimal analysis capabilities?


    NetBeans warns you about many of the "usual" cases of misspelling and
    coding errors in Ruby. (Be aware that all types of checks are not
    enabled out of the box. Look at the tutorials to get a feeling of what's
    available.) There seems to be other editors around with intelligent code
    parsing as well.


    Best regards,

    Jari Williamsson
    Jari Williamsson, Jan 7, 2008
    #2
    1. Advertising

  3. Huw Collingbourne, Jan 7, 2008
    #3
  4. John Papas

    ara howard Guest

    On Jan 7, 2008, at 10:03 AM, Shot (Piotr Szotkowski) wrote:

    >> What I really hate about dynamic languages is that, for example in
    >> JavaScript if I misspell something there is no tool to find it and
    >> no (deterministic) test locate this bug.


    it's a bit tangental, but you really shouldn't be spelling anything if
    you are comfortable with your editor - at least not more than once.
    for instance, in vim, after i say something like

    foobar = 42

    i would just type

    fo <ctrl-N> and the foobar var is auto completed in much the same
    way as the shell auto completes.

    it's extremely rare that i would actually spell out any var longer
    than two chars. using this technique i find that i rarely, perhaps
    once per month, make a spelling error that causes me an issue.

    regards.
    ara howard, Jan 7, 2008
    #4
  5. Shot (Piotr Szotkowski) wrote:
    > John Papas:
    >
    >> What I really hate about dynamic languages is that, for example in
    >> JavaScript if I misspell something there is no tool to find it and
    >> no (deterministic) test locate this bug.

    >
    > The idea behind unit testing is that they catch such things for you.
    > Better yet, Test- (or Behaviour-) Driven Development means your code
    > does what it’s asked to do, so it doesn’t really matter if there are
    > any misspellings inside or not.


    Ah, but then there's "heckle". Heckle inserts random bugs in your code,
    and if your tests don't catch them, then the tests aren't sufficient. :)
    M. Edward (Ed) Borasky, Jan 8, 2008
    #5
  6. John Papas wrote:
    > One of the things I like about languages like Java is that since it is
    > statically typed I get tools that assist me when I write code, for
    > example if I misspell a function name.


    This doesn't actually have anything to do with Java being statically
    typed.

    > What I really hate about dynamic languages is that, for example in
    > JavaScript if I misspell something there is no tool to find it [...]


    Again, this doesn't actually have anything to do with the dynamic
    nature of those languages.

    In fact, pretty much all of the features that are now associated with
    IDEs for static languages, were invented in Smalltalk IDEs: code
    completion, class browsers, automated refactoring tools, automated
    unit testing.

    The *only* reason for the differences between IDEs for static and
    dynamic languages is money: the Eclipse Java Development Tools are
    developed by dozens of highly paid full-time engineers with million
    dollar research budgets by IBM, Oracle, BEA etc.

    The Eclipse Ruby Development Tools were developed by a couple of
    hobbyists in their spare time, without getting paid, with no research
    budget at all, and even without knowing Eclipse programming.

    > Does the fact that Ruby is STRONG dynaically typed, assist tool
    > developers? Can I have tools with minimal analysis capabilities?


    Pretty much all current Ruby IDEs (RDT, DLTK, 3rd Rail, NetBeans, Ruby
    in Steel) have code completion, type inference, automated refactoring
    tools and a lot of the things you would expect from a modern IDE. But,
    again, this doesn't have anything to do with Ruby being "strongly
    typed", it has to do with Ruby being high on the hype curve and
    companies like Sun, CodeGear, Sapphire Steel and Aptana investing
    money in Ruby IDEs.

    jwm
    Jörg W Mittag, Jan 8, 2008
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Unlhbg==?=

    Strong typing for user controls

    =?Utf-8?B?Unlhbg==?=, Jan 13, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    2,321
    =?Utf-8?B?Unlhbg==?=
    Jan 16, 2006
  2. Digital Puer
    Replies:
    27
    Views:
    5,076
    James Rogers
    Sep 13, 2003
  3. Gabriel Zachmann

    strong/weak typing and pointers

    Gabriel Zachmann, Oct 28, 2004, in forum: Python
    Replies:
    102
    Views:
    1,779
    Carl Banks
    Nov 13, 2004
  4. namekuseijin

    Re: "Strong typing vs. strong testing"

    namekuseijin, Sep 27, 2010, in forum: C Programming
    Replies:
    214
    Views:
    3,325
    Nick Keighley
    Oct 17, 2010
  5. namekuseijin

    Re: "Strong typing vs. strong testing"

    namekuseijin, Sep 27, 2010, in forum: Python
    Replies:
    229
    Views:
    3,428
    Gregory Ewing
    Oct 29, 2010
Loading...

Share This Page