Re: Pointers to "why C behaves like that ?"

"Fergus Henderson" <fjh@students.cs.mu.OZ.AU>
3 Dec 2002 00:39:19 -0500

          From comp.compilers

Related articles
[55 earlier articles]
Re: Pointers to "why C behaves like that ?" peter_flass@yahoo.com (Peter Flass) (2002-12-01)
Re: Pointers to "why C behaves like that ?" fjh@students.cs.mu.OZ.AU (Fergus Henderson) (2002-12-01)
Re: Pointers to "why C behaves like that ?" thp@cs.ucr.edu (2002-12-01)
Re: Pointers to "why C behaves like that ?" dot@dotat.at (Tony Finch) (2002-12-01)
Re: Pointers to "why C behaves like that ?" dot@dotat.at (Tony Finch) (2002-12-01)
Re: Pointers to "why C behaves like that ?" sander@haldjas.folklore.ee (Sander Vesik) (2002-12-01)
Re: Pointers to "why C behaves like that ?" fjh@students.cs.mu.OZ.AU (Fergus Henderson) (2002-12-03)
Re: Pointers to "why C behaves like that ?" nmm1@cus.cam.ac.uk (Nick Maclaren) (2002-12-03)
Re: Pointers to "why C behaves like that ?" joachim_d@gmx.de (Joachim Durchholz) (2002-12-03)
Re: Pointers to "why C behaves like that ?" vugluskr@unicorn.math.spbu.ru (Roman Shaposhnick) (2002-12-07)
Re: Pointers to "why C behaves like that ?" vugluskr@unicorn.math.spbu.ru (Roman Shaposhnick) (2002-12-07)
Re: Pointers to "why C behaves like that ?" lex@cc.gatech.edu (Lex Spoon) (2002-12-11)
Re: Pointers to "why C behaves like that ?" joachim_d@gmx.de (Joachim Durchholz) (2002-12-11)
[6 later articles]
| List of all articles for this month |

From: "Fergus Henderson" <fjh@students.cs.mu.OZ.AU>
Newsgroups: comp.compilers
Date: 3 Dec 2002 00:39:19 -0500
Organization: Computer Science, University of Melbourne
References: 02-11-095 02-11-103 02-11-128 02-11-150 02-12-026
Keywords: types, practice
Posted-Date: 03 Dec 2002 00:39:19 EST

"Sander Vesik" <sander@haldjas.folklore.ee> writes:
  >Joachim Durchholz <joachim_d@gmx.de> wrote:
  >> jacob navia wrote:
  >>>
  >>> fn(a)
  >>> {
  >>> b = a;
  >>> }
  >>>
  >>> How can you know what "a" is?
  >>
  >> "a" is of type ANY, or Object, or Equ, or whatever happens to be the
  >> most general type that allows comparisons for equality. Type inference
  >> will not produce a more specific definition of "a" or "b" at this
  >> point. Actually that's OK - there's no need to actually nail the type
  >> down at this point.
  >
  >Depends. Do you want to be able to do separate compilation and be able
  >to get a shared library out of the code or no?


Sometimes yes, sometimes no. But either way, there's still no need
to actually nail the type down at this point.


  >Assuming that everybody will have code for your library around and
  >always does full program compilation is extremely unscalable.


Whole-program compilation isn't necessary. The other approach is to just
generate polymorphic code for `fn' that will handle any suitable type.


--
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.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.