Date: Thu, 29 Apr 2004 18:51:17 +0400 From: Sergey Zaharchenko <doublef@tele-kom.ru> To: Rahul Siddharthan <rsidd@online.fr> Cc: Dag-Erling Sm??rgrav <des@des.no> Subject: Re: Beginning C++ in FreeBSD Message-ID: <20040429145116.GA3964@Shark.localdomain> In-Reply-To: <20040429133904.GA32185@online.fr> References: <20040427160737.GA1325@Shark.localdomain> <xzpr7u918jv.fsf@dwp.des.no> <20040428023920.GA382@Shark.localdomain> <xzpfzao18gd.fsf@dwp.des.no> <20040428163104.GA10537@Shark.localdomain> <xzp7jw01196.fsf@dwp.des.no> <20040429022937.GB351@Shark.localdomain> <xzpy8ofz9jt.fsf@dwp.des.no> <20040429043953.GC5872@Shark.localdomain> <20040429133904.GA32185@online.fr>
next in thread | previous in thread | raw e-mail | index | archive | help
--J/dobhs11T7y2rNN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 29, 2004 at 09:39:04AM -0400, Rahul Siddharthan probably wrote: > Sergey Zaharchenko said on Apr 29, 2004 at 08:39:54: > > It wasn't me who spoke about Turing for the first time. >=20 > No, that was me. But it was you who went off in a red-herring > direction about it. Go back and re-read the context. >=20 Actually, it wasn't the first post which mentioned Turing. Anyway, re-reading: > Which has very little relevance to programming languages. Anything > that can be done in one Turing-complete language can be done in > another Turing-complete language. The trade-off is in development > time ("expressiveness") and running time. Please define `anything'.=20 I want to write a piece of code. I'll try to describe it detailedly further. If it fits your definition of `anything', go ahead and try to write it. If my understanding of `anything' is correct, I believe you won't be able to do it in C, while it's easy to do that in C++. a) It must be written in portable C. b) It will be linked either as a (maybe part of) shared library (we assume the system supports shared libraries for simplicity). c) It has 3 functions: initialize() (like allocating memory and registering run()), run() (anything you like) and deinitialize(). d) The main program (which will use the shared library) will export a linked list (any kind you wish) which initialize() can access to `register' run() and deinitialize() --- vice versa. e) The main program knows nothing about any of these functions. No details should be visible (the main program won't call [de]initialize() or run() for you directly, you're on your own). f) You don't want to hack the main program or the operating system to overcome any difficulties you will have. If you think these rules are so masochistic that no-one will ever think of such a combination --- well, here I am:) --=20 DoubleF Corruption is not the #1 priority of the Police Commissioner. His job is to enforce the law and fight crime. -- P.B.A. President E. J. Kiernan --J/dobhs11T7y2rNN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAkRZkwo7hT/9lVdwRAqvzAJ9p1EgOHEhwjyi9Oijx5o5ojSvtdACdHn5J r2GnFE0djnV9vM29le5YNPw= =eOp/ -----END PGP SIGNATURE----- --J/dobhs11T7y2rNN--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040429145116.GA3964>