Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #30336
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer, comp.sys.raspberry-pi |
| Subject | Re: Java ME or SE? |
| Date | 2014-11-10 20:11 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <m3rnnd$7b4$1@dont-email.me> (permalink) |
| References | (1 earlier) <j2jt5al8qhfjans2n77p4tof3gsl7ufpva@4ax.com> <2dj16ahot0c6v296vlnllh7roj9avqebt5@4ax.com> <m3r9u0$p27$1@dont-email.me> <54614184$0$2838$e4fe514c@news2.news.xs4all.nl> <m3rlng$tf6$2@dont-email.me> |
Cross-posted to 2 groups.
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 <strings.h> /* <string.h> nowadays */
#include <malloc.h> /* <stdarg.h> nowadays, sort of */
#include <varargs.h>
/* ... and the not-quite-compatible consequents thereof */
#include <stdio.h>
...
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
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Java ME or SE? Gordon Levi <gordon@address.invalid> - 2014-11-09 00:58 +1100
Re: Java ME or SE? Knute Johnson <eternal@knutejohnson.com> - 2014-11-08 09:27 -0800
Re: Java ME or SE? Doug McIntyre <merlyn@dork.geeks.org> - 2014-11-08 16:17 -0600
Re: Java ME or SE? Arne Vajhøj <arne@vajhoej.dk> - 2014-11-08 17:38 -0500
Re: Java ME or SE? Gordon Levi <gordon@address.invalid> - 2014-11-09 15:51 +1100
Re: Java ME or SE? Arne Vajhøj <arne@vajhoej.dk> - 2014-11-08 17:42 -0500
Re: Java ME or SE? Roedy Green <see_website@mindprod.com.invalid> - 2014-11-08 18:11 -0800
Re: Java ME or SE? Martin Gregorie <martin@address-in-sig.invalid> - 2014-11-09 11:51 +0000
Re: Java ME or SE? Gordon Henderson <gordon+usenet@drogon.net> - 2014-11-09 12:36 +0000
Re: Java ME or SE? alister <alister.nospam.ware@ntlworld.com> - 2014-11-09 13:28 +0000
Re: Java ME or SE? stephen@mpeforth.com (Stephen Pelc) - 2014-11-10 10:00 +0000
Re: Java ME or SE? Gordon Levi <gordon@address.invalid> - 2014-11-11 01:41 +1100
Re: Java ME or SE? cl@isbd.net - 2014-11-10 16:48 +0000
[OT] Re: Java ME or SE? Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-11-10 13:57 -0500
Re: Java ME or SE? Martin Gregorie <martin@address-in-sig.invalid> - 2014-11-10 21:15 +0000
Re: Java ME or SE? Kees Theunissen <theuniss@rijnh.nl> - 2014-11-10 23:51 +0100
Re: Java ME or SE? Martin Gregorie <martin@address-in-sig.invalid> - 2014-11-11 00:37 +0000
Re: Java ME or SE? Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-11-10 20:11 -0500
Re: Java ME or SE? Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-11-10 20:45 -0500
Re: Java ME or SE? Morten Reistad <first@last.name> - 2014-11-11 07:00 +0100
Re: Java ME or SE? alister <alister.nospam.ware@ntlworld.com> - 2014-11-11 09:46 +0000
csiph-web