Related articles |
---|
[40 earlier articles] |
Re: Pointers to "why C behaves like that ?" ajo@andrew.cmu.edu (Arthur J. O'Dwyer) (2002-11-26) |
Re: Pointers to "why C behaves like that ?" thp@cs.ucr.edu (2002-11-26) |
Re: Pointers to "why C behaves like that ?" thp@cs.ucr.edu (2002-11-26) |
Re: Pointers to "why C behaves like that ?" Nicola.Musatti@ObjectWay.it (Nicola Musatti) (2002-11-26) |
Re: Pointers to "why C behaves like that ?" nmm1@cus.cam.ac.uk (Nick Maclaren) (2002-11-26) |
Re: Pointers to "why C behaves like that ?" peter_flass@yahoo.com (Peter Flass) (2002-11-26) |
Re: Pointers to "why C behaves like that ?" fjh@students.cs.mu.OZ.AU (Fergus Henderson) (2002-11-26) |
Re: Pointers to "why C behaves like that ?" daniel_yokomiso@softhome.net (Daniel Yokomiso) (2002-11-26) |
Re: Pointers to "why C behaves like that ?" thp@cs.ucr.edu (2002-11-26) |
Re: Pointers to "why C behaves like that ?" vugluskr@unicorn.math.spbu.ru (Roman Shaposhnick) (2002-11-26) |
Re: Pointers to "why C behaves like that ?" vugluskr@unicorn.math.spbu.ru (Roman Shaposhnick) (2002-11-26) |
Re: Pointers to "why C behaves like that ?" vugluskr@unicorn.math.spbu.ru (Roman Shaposhnick) (2002-11-26) |
Re: Pointers to "why C behaves like that ?" whopkins@alpha2.csd.uwm.edu (Mark) (2002-12-01) |
[21 later articles] |
From: | "Fergus Henderson" <fjh@students.cs.mu.OZ.AU> |
Newsgroups: | comp.compilers |
Date: | 26 Nov 2002 22:12:33 -0500 |
Organization: | Computer Science, University of Melbourne |
References: | 02-11-095 02-11-103 02-11-128 |
Keywords: | design, types |
Posted-Date: | 26 Nov 2002 22:12:33 EST |
"jacob navia" <jacob@jacob.remcomp.fr> writes:
>When you support several types of integers and floating point data like in C
>this kind of inference becomes extremely complex.
Most popular languages which support type inference also support
several numeric types. For example, Haskell 98 supports Int
(machine-specific bounded precision), Integer (unbounded precision),
Float, Double, Rational, Complex Float, Complex Double. Current
Haskell implementations also support Int8, Int16, Int32, Int64 and
their unsigned variants Word8, Word16, Word32, and Word64. The
Glasgow Haskell compiler complicates things even further by adding
unboxed variants of the primitive numeric types: Int#, Float# and
Double#, IIRC.
The most pertinent issue on which these languages differ from C is
that C has much more complex handling of implicit conversions, whereas
these languages tend to avoid implicit conversions (with some
exceptions such as the way Haskell treats numeric literals as being
implicitly overloaded for all the appropriate numeric types).
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.