Well, I'm an old hardware jock; so I tend to think the simplest solution to a simple challenge is to connect a piece of wire from the hot side of the battery to the load (and hope the load is already grounded). That approach can fall short of expectations in several ways, which is why we have more advanced methods for setting binary state.
Bypassing a number of increasingly complex but very simple approaches, we come to some sort of prebuilt application, like Excel, which requires little thought but can do quite a bit, so long as the class of problem is within the range the tool is designed for. I'm proud to say that if someone has already built not only the wheel but the whole car, I'm willing to just get in and drive it.If you feel that you must build your own wheel, then I heartily suggest Perl as your tool for most purposes. You can write a one-liner for simple, simple problems; a short script for not-so-simple problems; a longer script with a few modules for still somewhat simple problems; or a big honking script with any number of modules exhaustively tested by the Perl Community for simple problems that have outgrown their starter pot.
There may be tasks for which other languages are better but I daresay most of these can also be handled well enough in Perl. Hardware resources -- time, memory, storage -- are all so cheap today (which is one reason I don't do hardware anymore) that Perl is a fine choice even if some gain in efficiency is promised by another. And if you're really concerned about performance, your task is not simple, is it?In reply to Re: Language for something simple
by Xiong
in thread Language for something simple
by PeterPeiGuo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |