Article View: comp.lang.java
Article #306Re: Will Java kill C++?
From: Colin Johnson
Date: Wed, 17 Apr 1996 23:39
Date: Wed, 17 Apr 1996 23:39
52 lines
2902 bytes
2902 bytes
Jan@Bytesmiths.com (Jan Steinman) wrote:
>In article <31711755.328F@charm.net>, Bob Arning <arning@charm.net> wrote:
>
>> Jan Steinman wrote:
>...
>> > Ready, set, go (standard disclaimer, typed in off the top of my head):
>> >
>> > | pi n |
>> > pi := 0.
>> > n := "number of hex digits of precision desired"
>> > 1 to: n do: [:i | pi := pi +
>> > ((1 / (16 raisedTo: i) *
>> > ((4 / ((8 * i) + 1)) +
>> > (2 / ((8 * i) + 4)) +
>> > (1 / ((8 * i) + 5)) +
>> > (1 / ((8 * i) + 6))))].
>> > pi
>> >
>> > Okay, has your C compiler finished yet? :-)
>...
>> Your standard disclaimer notwithstanding, it would be a more impressive
>> example if it actually worked. Where does the missing right paren go?
>
>Oops! I separated it into one factor and four terms, but I guess I wasn't
>counting right. Without the Smalltalk paren-matcher, I'd have to guess it
>goes before the square bracket. Sorry!
>
> : Jan Steinman <mailto:Jan@Bytesmiths.com>
> : Bytesmiths, the Smalltalk specialists <http://www.bytesmiths.com>
> : "This is witty signature 1 of 47,288."
Of course, guys, the wonderful thing about Smalltalk is that if Jan's code
had been typed into a workspace and executed, the error (a simple typo)
would have been detected immediately. What about the poor C++ coder? Fix
it, then compile -again-! :-)
Regards,
Col
==========================================================================
Col Johnson... "colin@pangaea.com.au"
Catherine Johnson.. "catherine@pangaea.com.au"
Phone: +61 18-203792 or, within Oz, 018-203792
Fax: +61 2 816-3402 02-816-3402
Pangaea: http://www.pangaea.com.au/
Colin: http://www.pangaea.com.au/col.html
Catherine: http://www.pangaea.com.au/cath.html
"Cum catapultae proscriptae erunt tum soli proscripti catapultas habebunt"
==========================================================================
Technical Details
Message-ID:
<4l3vf0$57k@gidora.kralizec.net.au>Path:
arc1-ca.pugleaf.net!gidora.kralizec.net.au!rootReferences:
<3134D499.653E@ix.netcom.com> <313613B2.136E@ksopk.sprint.com> <4i7qhl$ik6@cronkite.seas.gwu.edu> <4iuhi7$fmf@sundog.tiac.net> <4iumap$mn5@hustle.rahul.net> <31582A45.3742@vmark.com> <3163C031.4FB1@esec.ch> <3164888D.2B01@concentric.net> <4kbfn8$1bu@news1.is.net> <316971B0.FEF@amd.com> <Jan-1104960033370001@news.magmacom.com> <31711755.328F@charm.net> <Jan-1504962032120001@news.magmacom.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!gidora.kralizec.net.au!root From: Colin Johnson <colin@pangaea.com.au> Newsgroups: comp.lang.java,comp.lang.c++,comp.lang.smalltalk Subject: Re: Will Java kill C++? Date: 17 Apr 1996 23:39:12 GMT Organization: Pangaea Enterprises Pty Ltd Message-ID: <4l3vf0$57k@gidora.kralizec.net.au> References: <3134D499.653E@ix.netcom.com> <313613B2.136E@ksopk.sprint.com> <4i7qhl$ik6@cronkite.seas.gwu.edu> <4iuhi7$fmf@sundog.tiac.net> <4iumap$mn5@hustle.rahul.net> <31582A45.3742@vmark.com> <3163C031.4FB1@esec.ch> <3164888D.2B01@concentric.net> <4kbfn8$1bu@news1.is.net> <316971B0.FEF@amd.com> <Jan-1104960033370001@news.magmacom.com> <31711755.328F@charm.net> <Jan-1504962032120001@news.magmacom.com> NNTP-Posting-Host: godzilla.zeta.org.au Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 1.2N (Windows; I; 16bit)