Large-scale JavaScript

From a panel discussion at Lang.NEXT on cloud and web programming this afternoon.

Erik Meijer: Are you saying you cannot write large programs in JavaScript?

Anders Hejlsberg: No, you can write large programs in JavaScript. You just can’t maintain them.

Update: The video of the panel discussion has been posted here.

Update update: Looks like the links to Lang.NEXT and the videos are dead.

Math languages vs. application languages

Last Friday I posted on @SciPyTip a summary of why I like SciPy, the scientific programming library for Python.

I’d rather do math in a general-purpose language than try to do general-purpose programming in a math language.

Mathematical software is never purely mathematical. The math has to connect to something, and that’s where most of the programming effort may go.

If you’re responsible for the math and for the larger system it’s embedded in, you have three options.

  1. Write the math in an application programming language.
  2. Do application programming in a mathematical language.
  3. Use different languages for the math and the larger system.

My preferred option is #1. My second choice is #3. My last choice, by far, is #2.

Application languages are typically better for math than mathematical languages are for applications. Application languages also have a larger user base, and hence better documentation and tools.

Mixing two languages works well in a team that has someone specialized in the math language, someone specialized in the application language, and someone fluent in plumbing the two languages together. If you have be all three people, you might wonder whether you could do everything in one language.

Related posts