Path: csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: =?UTF-8?Q?Arne_Vajh=c3=b8j?= Newsgroups: comp.lang.java.programmer Subject: Re: is the java compiler written in c Date: Sun, 30 Aug 2015 22:11:35 -0400 Organization: Aioe.org NNTP Server Lines: 26 Message-ID: References: <893a1a37-881c-4e59-a069-38386dd1b0fd@googlegroups.com> <7b5d28de-2f30-4db7-aec7-03bd9ce81d00@googlegroups.com> NNTP-Posting-Host: NIM2IeSPVd0kE3mU1mieXw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:32443 On 8/26/2015 12:44 PM, Gene Wirchenko wrote: > On Sat, 22 Aug 2015 11:53:01 +0000 (UTC), Martin Gregorie > wrote: >> On Fri, 21 Aug 2015 22:42:11 -0400, Arne Vajhøj wrote: >>> To write an OS you need to get real close to the hardware and allow a >>> lot of funky stuff. >>> >> Hardware emulation too. I started to write a 6809 emulator in Java, but >> moved the project to C when I discovered what a pain it was going to be >> to emulate the registers (8 or 16 bit unsigned arithmetic but with the >> option to treat the LHS bit as the sign) It was *much* easier to simply >> declare the registers as 'unsigned short' or 'unsigned byte' than it was >> to fight with Java's insistence on signed arithmetic. > > I remember hassling in Java for a few hours with building 32-bit > IP addresses from four octets because of Java's insistence on signed. > In C, with its unsigned, it would have been a minute or so. ubyte/ushort/uint/ulong sure would be nice. If they had made byte unsigned and added sbyte 20 years ago then it would have been even better, but too late now. Arne