X-FeedAbuse: http://nntpfeed.proxad.net/abuse.pl feeded by 88.191.16.109 Path: csiph.com!eeepc.pasdenom.info!news.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!nospam.fr.eu.org!usenet-fr.net!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!feeder1.cambriumusenet.nl!feed.tweaknews.nl!209.197.12.242.MISMATCH!nx01.iad01.newshosting.com!newshosting.com!69.16.185.11.MISMATCH!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.posted.palinacquisition!news.posted.palinacquisition.POSTED!not-for-mail NNTP-Posting-Date: Mon, 07 Feb 2011 02:21:54 -0600 Date: Mon, 07 Feb 2011 16:21:49 +0800 From: Peter Duniho User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: Java vs C++ References: <4d4d585c$0$81476$e4fe514c@news.xs4all.nl> <4d4d60dc$0$23763$14726298@news.sunsite.dk> <4d4d8322$0$41117$e4fe514c@news.xs4all.nl> <4d4f042b$0$23753$14726298@news.sunsite.dk> <4d4f4a54$0$23753$14726298@news.sunsite.dk> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <6a6dndmK8PM_NtLQnZ2dnUVZ_rOdnZ2d@posted.palinacquisition> Lines: 27 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 219.74.123.211 X-Trace: sv3-OwCfntcQhB04mf+OgVsJ3r38jN0y94XD1tckUFwZ9KiiTCWVvo7gZ50nFBbY5KY1fHkqY8/Wc6yBiRt!9TZoh+bS+UuVTwRKU6Y71+tIIrfxTXnFTTXmukrIdXxh2jROpmXpWEjQGH3tx/9v7WtVCe7Ol43m!PEBLVPNM6pfPAJI9q1rt8jmw2Rbj44ioIbu+eLLqfexC X-Complaints-To: abuse@iinet.com X-DMCA-Complaints-To: abuse@iinet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 3074 Xref: csiph.com comp.lang.java.programmer:25566 On 2/7/11 3:54 PM, Peter Duniho wrote: > [...] > A long time ago, I worked on a project that used a form of interpreted > byte code in which the linker did exactly that. In that situation, the > reason we were using the byte code in the first place was for > compression, to help the program fit in memory (it was a relatively > large program, running on Mac and Windows computers without virtual > memory). So the "quoting" feature was important enough to make it worth > doing. > > In fact, that feature did not rely on C++ templates at all. We were > coding in plain C, and it detected any code that was essentially > copy/paste or nearly so. I guess I should also mention that the interpreter itself supported the quoting feature, so it was a lot simpler to rewrite any code that needed to be shared: just remove the actual code and replace with the "quote" instruction referring to the quoted code. There also was no multi-threading for the code back in those days. It'd be a bit more complicated for a linker to accomplish a similar feature, but it's not like it's an intractable problem. I think turning the quote into a function call would solve most issues, if not everything, and of course if you quote an entire function, that's even easier. Pete