From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,1042f393323e22da X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,1042f393323e22da X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,1042f393323e22da X-Google-Attributes: gid1014db,public From: eachus@spectre.mitre.org (Robert I. Eachus) Subject: Re: Any research putting c above ada? Date: 1997/05/07 Message-ID: #1/1 X-Deja-AN: 239989902 References: <5ih6i9$oct$1@waldorf.csc.calpoly.edu> <3359e813.340466234@news.pacificnet.net> <5iri6b$jn0@bcrkh13.bnr.ca> <5k60au$gig@bcrkh13.bnr.ca> <5k8b0p$25f2@uni.library.ucla.edu> <5klamg$24da@uni.library.ucla.edu> <978312A1F7E892FA.65E9443A2651231A.2F79B86BA594FA84@library-proxy.airnews.net> Organization: The Mitre Corp., Bedford, MA. Newsgroups: comp.lang.c++,comp.lang.c,comp.lang.ada Date: 1997-05-07T00:00:00+00:00 List-Id: I wrote: >>Or, if you know what you are doing you can, with little trouble, >>solve an NP-complete problem. For example, Ada compilers are >>required to solve bin packing problems. In article <978312A1F7E892FA.65E9443A2651231A.2F79B86BA594FA84@library-proxy.airnews.net> clines@delete_this.airmail.net (Kevin Cline) asks: > That's interesting. Why? The algorithm is easy to implement, and in most of the cases that users are interested in the results will be quick. The issue comes up with records structures. You have some components which need to be stored at a byte, word, or double word boundary, and others that you want to cram in gaps (by putting a size restriction on the type). Now in the usual case where all the restrictions and most of the object sizes are powers of two, there is no problem. But what if you have one component which takes three bytes? We decided that the compiler is required to deal with it. This means that you can encode an arbitrary bin packing problem in these representation specifications, and read the result out of the listing if you clever. But so what. It is much easier to write a (compiler) implementation which solves the expected cases quickly, some weird cases slowly, and pathological cases sometime in the next millenium, than for us to enumerate which cases must be handled correctly and which ones can be done with heuristics. Besides, in the embedded world it may occaisionally be the case that you are willing to trade three day compiles for optimal packing of data into a 16K PROM. (You can always loosen the size clause when debugging.) > That's fine for a compiler, but there are lots of real > applications where a reasonable solution is needed in reasonable > time. Agreed, and what is reasonable (for all instances of reasonable in the above sentence) is very much the heart of software engineering. > Actually, things are great in the software field. I can buy > amazingly powerful and easy to use applications to run on an > amazingly powerful computer that sits on my desk at home, all for > only a couple weeks salary. Things have never been better. So > what if lots of new S/W development efforts fail. 80% of all new > restaurants close within a year. No one complains about a crisis > in American cooking. There are still plenty of restaurants open. And I can buy (or get as freeware or shareware) amazingly powerful and easy to use applications to run on an amazingly powerful computer that sits on my desk at home. My Amiga can even run MS-DOS (and Windows 3.1 on top) in emulation mode if I need to run any of the poorly written expensive junk that floats all over the Wintel world. However, I draw the line at spending a week's salary for any software. BTW, I'm thinking of upgrading. There was a $300 board just announced which will put a 120 MHz 603e PowerPC chip in my Amiga 1200 as a co-processor running Windows NT. My real problem is whether to run NT or Unix on the PPC side. ;-) Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is... -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...