Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Bill Richards Newsgroups: comp.lang.forth Subject: Re: xt as a single point of reference Date: Sun, 4 Aug 2013 11:43:12 +0000 (UTC) Organization: Aioe.org NNTP Server Lines: 59 Message-ID: References: <51f7b128$0$26907$e4fe514c@dreader37.news.xs4all.nl> <2013Jul30.160327@mips.complang.tuwien.ac.at> <51f7edfb$0$610$e4fe514c@dreader34.news.xs4all.nl> <2013Aug1.140834@mips.complang.tuwien.ac.at> <7xbo5g9fky.fsf@ruckus.brouhaha.com> <7xzjsz6yz3.fsf@ruckus.brouhaha.com> <7xr4eav2kd.fsf@ruckus.brouhaha.com> NNTP-Posting-Host: cXkIJ1dMcywin4JA0nmU0A.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.forth:24963 On 2013-08-04, Andrew Haley wrote: > Paul Rubin wrote: >> Andrew Haley writes: > >> I'm thinking that sane languages for large-scale development should >> 1) follow the principle of least surprise, and 2) have extensive >> error detection and diagnostics at compile and run time. C's >> pointer semantics even prevent it from checking for subscript >> errors, thus the decades of buffer overflow bugs we've seen in it. > > Java, in other words! Not even close! Think Ada. Other good choices would be languages that don't use null terminated strings. Counted strings prevent most or all buffer overflows. Let the compiler do the work. PL/M and variants have been used successfully to write operating systems. PL/I style language implementations usually support subscript checking at runtime, etc. >>> C isn't really a general-purpose programming language: its >>> properties are useful in the area for which it was designed, viz. a >>> low-overhead language that can be used instead of assembler for >>> writing the core parts of an operating system. Not true of all platforms but close enough given all the world's Intel x86 as far as you know. I'd rather choose the best tools for the job (and that's never C) than a mediocre tool that can do it all, sortof, more or less (that's C). >> >> This would seem to say it's being misused badly in the real world, >> since large systems are written in it, like the Linux kernel. Very true indeed. > Ah. As Churchill put it, "it has been said that democracy is the > worst form of Government except all those other forms that have been > tried from time to time." I don't agree. Several choices have been tried and did indeed work better. There is a certain dogma that leads to myopia in anything UNIX-related and you'll be shouted down if you propose something better. Because Dennis Ritchie didn't use it, it can't be good. > >>> Think about programming languages as tools. C is a chainsaw. There's no need to be insulting, said the Chainsaw Manufacturers' United... C is a minefield. There's no reason it had to be this way except as a surrogate religion. It was good enough for who it was for. It continues in use in the face of much better alternatives but for the sheer mass of existing systems and their old crusty interfaces and people who refuse to demand better. Probably no language has so much baggage as C, and C is far from the first language still in use. If portability is your goal, C helps, but so does Ada because it's so rigidly standardized. For other use it really would have been smarter to either pick a systems programming language (assembly) for the systems programming parts and a DSL for the rest. Bill