Coffeehouse Post

Single Post Permalink

View Thread: is managed code faster than native?
  • User profile image

    , Bass wrote

    Also the thing about obscure languages, it shows how you can do dynamic languages right. Erlang's primary weakness is that it decided to copy the syntax of Prolog. That makes it very unapproachable for beginners.

    You have language like Ruby which isn't that obscure at all and have syntax that read almost like poetry. I mean, it's all over the place these days, especially for new development. It has a much better syntax than Erlang and it's also very strongly typed. Ditto for Python. Very well designed languages, with unfortunately, very slow runtimes. That makes them useless for some things, which is incredibly unfortunate.

    Then you have JS which is less pretty, but people have made it pretty via CoffeeScript. But JS is very fast, much faster than any dynamic language ever was.

    At some point you will have the niceness of Ruby and Python, the robustness of Erlang, and the speed of JavaScript merge. That will be the language of the future.

    You say that, but then you accuse statically typed languages of being equivilent to the dreadful languages of C++ and Java, missing out the elegance and simplicity of Haskell.

    I'm not arguing against dynamic languages because I think that PHP is dreadful (it really, really is, by the way) or because I think that C++ and Java are the language that God himself would use (he really, really wouldn't). I'm arguing it because I feel that building unit-tests into the language via formalized contracts is the only way to get people to write them at all, and unit tests are the difference between good and bad code.

    Forcing crappy developers to write unit tests, and getting the compiler to immediately abort and tell them when they do stuff wrong is critical to maintaining a healthy codebase. And making it easy for developers to see where semantics have changed slightly when refactoring their code to make refactoring easy rather than painful is cruicial to building systems that are effective.

    Static types are a way of saying that writing unit tests is part of writing code. Too many people think that unit tests are optional or are something that we need a full time "tester" to write. Contracts and types let you find typos immediately, make code more immediately obvious when reading and easier to algebraically prove correctness for.

    That's why I like static languages, and that's why I feel that going from C# to Spec# is a positive thing, and going to PHP from C#/ASP.NET is a backwards thing.