in reply to Re^6: What would you change?
in thread What would you change?

The more I think about this vs. Haskell/Scala, the more I come to the conclusion that compile-time checking can actually work in a dynamic language. We just have to be smart about what we're checking. I mean, Haskell has compile-time checking all over the place and it's dynamic.

I think the point here is that the more side-effect free you can be, the more comprehensive your checking can be. I'm not sure where this meander is going, though.


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^8: What would you change?
by BrowserUk (Patriarch) on May 20, 2008 at 00:39 UTC
    I mean, Haskell has compile-time checking all over the place and it's dynamic.

    Hm. Perhaps we are at crossed threads after all. The concept of Haskell being a dynamic language goes right over my head. Indeed, if that article is anything to go by, I'd say that it was damn nearly impossible for Haskell to:

    • extend the program, by adding new code;
    • extend objects and definitions;
    • modify the type system;

    all during program execution.

    I would say that it runs exactly contrary to the entire motivation of Haskell.

    It's interesting to conceive of what it would take, and the processing power it would require, for Haskell to eval generated statements at runtime and cross-reference (and inference) the types generated, with whatever remains of the type annotations that where present in the source code of the original program.

    AFAIK, the whole basis of term rewriting is that once type compatibility has been verified, the expansion and/or reductions of terms can be directly substituted for the terms they rewrite, and so large chunks of the definitions in the original source code don't make it into the object code in a recognisible form whatsoever. It would therefore be impossible to extend the compile-time type system at runtime.

    I realise that a Haskell program can be written to parse, compile and run (or interpret) a different type system (language; ala. pugs), but a Haskell program that could eval code at runtime and then extends its own type system on the fly, is a whole different ball of wax.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      I was always under the impression that any language that implements lambda is a dynamic language. I am more than willing to be mistaken.

      My criteria for good software:
      1. Does it work?
      2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

        Hm. I just went looking for some reference to support that impression, and only found stuff that frankly, totally contradicts it.

        Typical of what I located is this, which on a cursory reading doesn't support it. And even more so on the basis of the reaction to it here, I have to conclude that either you have a misimpression, or you are using the term "dynamic language" in a completely different way to that which we are all used to.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.