Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!killer!ames!lll-tis!oodis01!uplherc!sp7040!obie!wes From: wes@obie.UUCP (Barnacle Wes) Newsgroups: comp.lang.c Subject: Re: C vs. FORTRAN Summary: Go away! Message-ID: <89@obie.UUCP> Date: 8 Jul 88 06:17:47 GMT References: <3136@phoenix.Princeton.EDU> <225800038@uxe.cso.uiuc.edu> <872@garth.UUCP> Organization: the Well of Souls Lines: 30 In article <872@garth.UUCP>, smryan@garth.UUCP (Steven Ryan) writes: > Actually, the real discussion is why does C have such a crippled argument > list? It is possible to pass a list of argument descriptors. The descriptor > list can be staticcally created and the overhead is just a register load > of a relocated address. > > Why not? Because most of the C users out there are more interested in > speed than security. Is that efficient? You can, easily. Like this: typedef enum {EOL, Char, Int, Char_ptr, Int_ptr } points_to_what; typedef struct { points_to_what what; void *pointer; } arg_item; You create an array of `arg_item's, with the `what' field of the last item being `EOL'. This is, of course, much slower, but more secure. The answer to your question `Why not?' is actually `Because it is not necessary in the general case.' Nobody is holding a pistol to your head forcing you to use C here - if you don't like, go away and don't ruin our discussions! -- {hpda, uwmcsd1}!sp7040!obie!wes "Happiness lies in being priviledged to work hard for long hours in doing whatever you think is worth doing." -- Robert A. Heinlein --