On Fri, Dec 22, 2006 at 02:43:08AM -0500, Sean Conner wrote:

>   Um ... <raises hand> ... I'd like somethimg a bit more consistent.
> 
>   A typical programic idiom I use (when programming in C) is:
> 
>       if (argc == 1)
>               do_some_process(stdin);
>       else
>       {
>               for (i = 1 ; i < argc ; i++)
>               {
>                       input = fopen(argv[i],"r");
>                       do_some_process(input);
>                       fclose(input);
>               }
>       }
> 
>   So imagine my surprise when:
> 
>       if (scalar(@ARGV) == 1)
>       {       # the one bit of consistancy I can do without actually
>               &do_some_process(STDIN);
>       }
>       else
>       {
>               for ($i = 1 ; $i < scalar(@ARGV) ; $i++)
>               {
>                       open INPUT,$ARGV[i];
>                       &do_some_process(INPUT);
>                       close INPUT;
>               }
>       }

Now, this is just silly.  This reminds me of someone complaining that Perl
sucks because Perl code is difficult to read by C programmers.  Perl is
hateful, but not for these reasons.  You are just trying to write C here.

\Anton.
-- 
We're going for 'working' here. 'clean' is for people with skills...
-- Flemming Jacobsen

Reply via email to