English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] [ANN] The Missing Library
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-05-03 (16:00)
From: Marcin 'Qrczak' Kowalczyk <qrczak@k...>
Subject: Re: [Caml-list] [ANN] The Missing Library
W li¶cie z wto, 04-05-2004, godz. 01:08 +1000, skaller napisa³:

> 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

What are values with no "natural" default initialized to? For example
functions. In OCaml's syntax:

let f x = x + 1
let g x = x - 1
let h() = v 0
let v = 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.
> With a little care you can probably 
> 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.

   __("<         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