From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA19505; Mon, 3 May 2004 18:00:26 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA19893 for ; Mon, 3 May 2004 18:00:25 +0200 (MET DST) Received: from qrnik.knm.org.pl (paf87.warszawa.sdi.tpnet.pl [217.96.225.87]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i43G0OEV030787 for ; Mon, 3 May 2004 18:00:24 +0200 Received: from qrnik ([192.168.0.1] ident=qrczak) by qrnik.knm.org.pl with esmtp (Exim 3.36 #1) id 1BKfrk-0001iu-00 for caml-list@inria.fr; Mon, 03 May 2004 18:00:24 +0200 Subject: Re: [Caml-list] [ANN] The Missing Library From: "Marcin 'Qrczak' Kowalczyk" To: caml-list In-Reply-To: <1083596890.20722.766.camel@pelican.wigram> References: <200404280613.19547.jdh30@cam.ac.uk> <1083141467.9537.845.camel@pelican.wigram> <200404281018.14913.jdh30@cam.ac.uk> <1083151482.9537.904.camel@pelican.wigram> <93ADD9EA-9936-11D8-BD03-000A958FF2FE@wetware.com> <1083173516.9537.1162.camel@pelican.wigram> <1083542538.9152.65.camel@qrnik> <1083570883.20722.536.camel@pelican.wigram> <1083574691.1643.55.camel@qrnik> <1083581924.20722.584.camel@pelican.wigram> <1083588018.1643.156.camel@qrnik> <1083596890.20722.766.camel@pelican.wigram> Content-Type: text/plain; charset=ISO-8859-2 Message-Id: <1083600024.1643.230.camel@qrnik> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.5.7 Date: Mon, 03 May 2004 18:00:24 +0200 Content-Transfer-Encoding: quoted-printable X-Miltered: at nez-perce with ID 40966C98.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 marcin:01 'qrczak':01 kowalczyk:01 qrczak:01 wto:99 immutable:01 undetected:01 initialized:01 ocaml's:01 gmp:01 gmp:01 vyper:01 python:01 inference:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk W li=B6cie z wto, 04-05-2004, godz. 01:08 +1000, skaller napisa=B3: > Well, no run time error: y just happens to > be zero initially :) Ah. My language doesn't let the programmer observe the value of a variable before proper initialization. Variables are immutable by default. I don't like undetected errors which are possible to detect, and I claim using a variable before initialization is most definitely an error. What are values with no "natural" default initialized to? For example functions. In OCaml's syntax: let f x =3D x + 1 let g x =3D x - 1 let h() =3D v 0 let v =3D if h() > 0 then g else f > Felix uses gmp. However it has all the C int types as well. I have one integer type on the language level, which is tagged in the lowest bits or uses GMP if it's bigger. The difference of the representation is fully transparent for the programmer, except in inline C. There are C functions for converting between this hybrid representation and various C types provided. > Oh .. none of them are built in, not even bool. > You *have* to 'inline C' the lot. My bool type is defined in the language, without inline C :-) > You'd be surprised. When I wrote Vyper, I did a lot > of analysis to try to make things static. > For Python, that proved almost impossible. >=20 > With a little care you can probably=20 > do very much better with just a little type inference. You mean that Python's specific features make it hard? I imagine the main problem is that in Python almost everything is mutable, including global function bindings. --=20 __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/ ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners