Re: detab utility challenge.
- From: spinoza1111 <spinoza1111@xxxxxxxxx>
- Date: Mon, 10 Aug 2009 19:40:06 -0700 (PDT)
On Aug 11, 10:28 am, Ben Bacarisse <ben.use...@xxxxxxxxx> wrote:
spinoza1111 <spinoza1...@xxxxxxxxx> writes:
<snip>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
<snip bad example>
You know this is off-topic here, yes? To find out what is wrong with
your C# post, post it to a C# group.
You get creepier and nastier every year, Benny Boy. My point, which is
very germane to C because it exposes how bad C is, is that the
specifications Malcolm posted are easily met in a modern platform, and
not met by C...evidence being the pre-existing discussion.
Here are Malcolm's specifications:
The specification is simple, write a utility that converts tabs to spaces in
a text file. It needs to either replace tabs with a set number of spaces or,
more commonly, take a list of tab stops. Calling syntax is up to you but
must be easy for the user to use.
This should be bread and butter work.
The code must depend on the standard library only, be portable to any
conforming implementation, and never crash or show undefined behaviour on
any user input.
My solution uses the .Net libraries. For this reason it is most
probably portable, although I have not tested it in mono or something
like that.
The purpose of .Net and Java is to avoid having "bread and butter"
programs crash on any user input, so about the only thing I needed to
do, which I did, was to check the arguments of this command line
program. Whereas C programs written for "bread and butter"
applications crash frequently because of the need for constant
reinvention of the wheel.
So, Benny Boy, if you want to participate in this thread, learn C
Sharp and use your analytic skills, which I have acknowledged, but
which, as I have said before, are unmatched by collegiality, common
sense, or any ability to see the big picture.
I'm real tired of posters who have to say "that's off-topic" when they
are not MAN enough to say "I don't understand it".
Sure, if Malcolm was going to give a prize, mine would be ineligible
for whatever he had in mind, such as a bunny or a cookie. But in a
strict sense, the problem CANNOT BE SOLVED in C because C produces
inchoate texts which are easily transformed into garbage while they
retain what Shakespeare would call "the name and title of a king", or
a C program. This transformation is NOT POSSIBLE in C Sharp or in
Java, which is why application programmers should either consent to
leave the field of programming, or use these languages.
--
Ben.
.
- Follow-Ups:
- Re: detab utility challenge.
- From: Chris M. Thomasson
- Re: detab utility challenge.
- References:
- detab utility challenge.
- From: Malcolm McLean
- Re: detab utility challenge.
- From: spinoza1111
- Re: detab utility challenge.
- From: spinoza1111
- Re: detab utility challenge.
- From: Ben Bacarisse
- detab utility challenge.
- Prev by Date: Re: detab utility challenge.
- Next by Date: Re: detab utility challenge.
- Previous by thread: Re: detab utility challenge.
- Next by thread: Re: detab utility challenge.
- Index(es):
Relevant Pages
|