in reply to Perl in the Enterprise
Perl is a horrible language for control systems. "Do what I mean" works great when a wrong guess about "what you mean" costs only a small amount of your time. It's dangerous and irresponsible, however, when a wrong guess about "what you mean" can actually kill someone.
Control systems are the exact opposite of what perl was designed to do: solve simple, ad hoc problems quickly.
Control systems require solving precisely specified problems, with fully known inputs and outputs, formally and correctly, so that it's not just unlikely but all but impossible that anything can go wrong. A well-built control system has tonnes of cross-checks, double checks, engineering, and the designers debate carefully the impact of every single line of code to prove that it is the exact right choice for the application.
Perl just isn't built for that kind of work. It's great at abstracting away the irrelevant details; but for control systems, there aren't any irrelevant details. In a good control system, you want to trust as little as possible to coder discipline. Perl fundamentally assumes you know what you're doing, and if you don't, that run time is an okay time to find out about it. For control systems, that's just not true. When the submarine is about to be crushed under the weight of the water, printing an error message about an exceptional condition is not an acceptable form of error handling. You have to know what the system will do in advance, have an answer planned, and prove that answer works correctly. Perl isn't built for that kind of overhead.
There are little, if any, cross checks in the language: no compile time typechecks, no compile time assertion checking, no static analysis tools, and few, if any code generation tools. There are no run-time performance guarantees. The language is large (200+ built in functions(), with three contexts each, often with multiple meanings and uses for each function), it has a complicated set of parsing rules that allow for code to have different meanings depending upon what has already been defined, and the language intrisicly supports self-modifying code.
It is not well-suited for control systems: anyone who says so is out to get someone else killed.
Perl is good at what it's good at; (it's excellent at replacing shell scripts), but to try to scale it beyond small scale projects, let alone to mission critical applications, is sheer madness. Perl doesn't even try to stop you from making mistakes; which is fine if you're a lone guy coding a simple system. Past a certain point, though, the motto: "Trust me! I know what I'm doing" doesn't scale well.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Perl in the Enterprise
by perrin (Chancellor) on May 18, 2006 at 01:14 UTC | |
by Fletch (Bishop) on May 18, 2006 at 13:49 UTC | |
by apotheon (Deacon) on May 20, 2006 at 17:16 UTC | |
by Anonymous Monk on May 18, 2006 at 16:40 UTC | |
by perrin (Chancellor) on May 18, 2006 at 17:51 UTC | |
by jdporter (Paladin) on May 18, 2006 at 20:27 UTC | |
by perrin (Chancellor) on May 18, 2006 at 21:28 UTC | |
| |
Re^2: Perl in the Enterprise
by Unanimous Monk (Sexton) on May 18, 2006 at 05:07 UTC | |
by Anonymous Monk on May 18, 2006 at 17:59 UTC | |
by Anonymous Monk on May 18, 2006 at 18:07 UTC | |
by apotheon (Deacon) on May 20, 2006 at 07:05 UTC | |
by Unanimous Monk (Sexton) on May 23, 2006 at 17:39 UTC | |
Re^2: Perl in the Enterprise
by chromatic (Archbishop) on May 18, 2006 at 05:22 UTC | |
by Anonymous Monk on May 18, 2006 at 17:05 UTC | |
by chromatic (Archbishop) on May 18, 2006 at 18:31 UTC | |
| |
Re^2: Perl in the Enterprise
by zentara (Cardinal) on May 18, 2006 at 11:57 UTC | |
by Anonymous Monk on May 18, 2006 at 18:18 UTC |