From: Johan Holmberg Date: 2004-10-14T23:50:06+09:00 Subject: Re: Kernighan & Richie ---> prototypes ? On Thu, 14 Oct 2004, Yukihiro Matsumoto wrote: > > | What is holding back a conversion of the K&R code > | to use prototypes ? > > My preference. I like prototypes. But I dislike the new style > argument list, especially when the list becomes large with type > names. > > matz. > Oops. I had kind of hoped for another answer. If the current source code was functionally equivalent to using prototypes everywhere I wouldn't have minded. But if I'm not mistaken you actually loose a lot of type-checking now. I just ran PC-LINT on the Ruby source and got many messages like: ... call to function 'SOME_FUNCTION_NAME()' not made \ in the presence of a prototype All in all for 511 different functions. I thought that the K&R style of function declaration/definition was long ago obsolete. Looking in by bookshelf I see books such as "Writing Solid Code", "The Practice of Programming" and "The Art of Unix Programming" all mentioning the advantages of the ANSI style. But I realize that it is your source ;). I just had to make my argument. This has been one of the main things I have wondered about while reading the source (the other thing being the almost total lack of comments about what functions do). /Johan Holmberg