Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer,comp.sys.raspberry-pi Subject: Re: Java ME or SE? Date: Mon, 10 Nov 2014 20:11:18 -0500 Organization: A noiseless patient Spider Lines: 55 Message-ID: References: <2dj16ahot0c6v296vlnllh7roj9avqebt5@4ax.com> <54614184$0$2838$e4fe514c@news2.news.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 11 Nov 2014 01:11:10 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="bd4e1cba8d8592bec5d5ed9e4537fbfd"; logging-data="7524"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19det/zdsQ1p2gfWY8Lwa1r" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 In-Reply-To: Cancel-Lock: sha1:PJ3A0cSfSA8D0mUzKlgHZGNyd1A= Xref: csiph.com comp.lang.java.programmer:30336 On 11/10/2014 7:37 PM, Martin Gregorie wrote: > On Mon, 10 Nov 2014 23:51:48 +0100, Kees Theunissen wrote: > >> Martin Gregorie wrote: >>> A modern C compiler can compile any C program that was written in the >>> past, including those using the original K&R syntax. Well, no: It won't *always* compile. #include /* nowadays */ #include /* nowadays, sort of */ #include /* ... and the not-quite-compatible consequents thereof */ #include ... char *p = sprintf(...); /* worked in some old C's, not today */ enum permissiveness { allow, forbid, restrict }; enum roller_skate_type { side_by_side, inline }; processTransaction(tptr, void) Transaction *tptr; /* the transaction to process */ int void; /* flag: true to void the transaction */ { ... } extern char *malloc(); ... float matrix = (float*) malloc(rows * cols * sizeof(float)); /* This one's moderately subtle, but potentially fatal because * although it may well compile, thus not providing a reliable * counter-example to your assertion, it can misbehave badly. */ unsigned short this = 42; int that = -42; int those = this * that; /* Another "It compiles" example, where "It compiles" is of * little comfort. Modern C gives -1764 as the result, while * some old C's gave 4294965532 or 63772. Again, a case where * "It compiles" simply isn't good enough: "It compiles," but * to something not intended by the author. */ Java's a lot cleaner than C in this respect (given its shorter history, it ought to be), but still not quite perfect. Consider a pre-1.4 source using `assert' as an identifier, or a pre-1.2 source with a method named `strictfp'. Change is the only constant. -- esosman@comcast-dot-net.invalid "Don't be afraid of work. Make work afraid of you." -- TLM