From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,8be18979db11f51c X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,fb631c9316319fef X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 2001-03-01 05:59:08 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!210.147.7.1!newsfeed.mesh.ad.jp!sjc-peer.news.verio.net!news.verio.net!iad-read.news.verio.net.POSTED!koehler From: koehler@encompasserve.org (Bob Koehler) Newsgroups: comp.os.vms,comp.sys.dec Subject: Re: Drop C/C++ better sooner than later Message-ID: References: <87n1baae6s.fsf@prep.synonet.com> <97bm3a$7tv@gap.cco.caltech.edu> <3A99AED0.5DF07890@infopuls.com> <97cd06$hcn$1@pyrite.mv.net> <97egck$vc6$3@info.cs.uofs.edu> <3A9AEFCD.AFC8431@infopuls.com> <97etsu$j41$1@pyrite.mv.net> <3A9B023A.CBD414A5@infopuls.com> <97hvro$hj4@freepress.concentric.net><9hjmlkwyghte@eisner.encompasserve.org> Organization: Encompasserve Date: 1 Mar 2001 08:50:50 -0500 NNTP-Posting-Host: 216.44.122.34 X-Complaints-To: abuse@verio.net X-Trace: iad-read.news.verio.net 983454653 216.44.122.34 (Thu, 01 Mar 2001 13:50:53 GMT) NNTP-Posting-Date: Thu, 01 Mar 2001 13:50:53 GMT Xref: supernews.google.com comp.os.vms:20681 comp.sys.dec:2963 In article <3A9D58D3.92B3B87A@videotron.ca>, JF Mezei writes: > Bob Koehler wrote: >> Really? Then why is it I've got tons of Java with massive use of >> dynamically allocated memory structures working quite well in a language >> which does not have pointers? > > Is Java a compiled language, or a run-time environment ? Doesn't Java execute > in its own virtual machine with lots of support from the Java engine ? Does > this qualify as a true compiled language ? Java is compiled to portable bytecode, and implies a run-time environment. The environment depends on context (the environment for an Applet is more restircted than the environment for an application). > Also, if there is no concept of pointers in Java, do they allow you to cheat > and specify pointers to be passed when you call system services etc ? No. You have to pass arrays. Frequently I find myself creating arrays of 1 element just so I can pass data back through a method argument when passing only via the return value is insufficient. None of the built in classes in the Java environments would require a pointer construct. Calls to other environments via the JNI are most easily handled by C/C++ (just because the JNI generates C/C++ code) where conversion between pointers and arrays is natural. To a VMS system service, for example, there's no difference between a C pointer and a C array address since both pass the address of the data. IIRC some JNI helper functions use pointers, but again you may be able to actually use C array syntax. ---------------------------------------------------------------------- Bob Koehler | Computer Sciences Corporation NASA GSFC Flight Software | Federal Sector, Civil Group | please remove ".aspm" when replying