Benno wrote:

On Tue Nov 22, 2005 at 18:55:24 +1100, O Plameras wrote:
Benno wrote:

<snip>
The problem with this statement is you generalize your point as if it is
written in stone for most people to put into their heads, which is wrong. Many newbies out there are smarter than you think and given the right encouragement
they will be able to learn about Linux in particular and Open Source in
general quicker than you and me have.

Everything is a generalisation. (See that was a joke for the humour impaired).

I said peopel should learn C, what is the problem? Those that learn it really well, will learn all the pitfalls, and will start to yearn
for higher level abstraction to the problems they encounter. And then
they will learn a higher level langauge.

Some people find it difficult to conceptualize pointers and pointer arithmetic which includes yourself I suppose because you kept on saying these are difficult to learn. You keep on telling yourself it is extremely difficult; and it is extremely
hard.

Hey, I'm the one that found the pointer arithmetic bug in your code.

It is a problem with not checking with the manual, not a pointer problem. The reality is the program works because it does what it was expected to do, i.e., print the required string.

You cannot show a situation where that code will not print the correct string, because the
original poster has a '\0' at the end of the string.

If it crashes then a fairly knowledgeable programmer just run 'gdb' after compiling with a
'-g'. It is not big deal.

But if the codes themselves are badly written, then it is a big problem.

I don't
have a problem with pointers. I use them every day, they aren't scary.
Being a good programmer in any language means understanding pointers.

*But*  there are better ways to refer to abstract data types
than through pointers. Really.

The reality of it all is anyone can learn C in one day and master it in one week.

That is total crap. Having gone through a C programming course, and taught
one at university I know that to be plainly untrue.


So , why you write such a complicated looking code, when it is a lot simpler

By this I mean, after one week anyone will be able to read anyone's C code
provided it is written correctly.

Not a chance. Don't believe you. And besides you are making generalisations,
which are bad.


No wonder you write such a bad C code, as you have proposed in your example.

C is extremely good because many OSes and Compilers are written in C including Linux itself
and many tools in Linux.
I would say C is good despite that ;). I never said C is bad, I said
it was difficult to program in well.



It is your mental attitude that makes you believe it is difficult.

My mental attitude? *Right*. We just saw evidence on the mailing
list of people screwing up little things that would either not
be either syntacticly or semanticaly correct in more strongly typed
languages. It seems that getting this right in a different langauge is
easier, because given a mistake you might actually know about it in
advance of running it. (I'm waiting for Eric to have a go at weakly
type scripting languages here ;).

Open Source is notoriously lacking in documentations. Unless you know C you are lost and
you hardly  can't proceed if you are doing a project.
That is simply untrue. There are many projects written purely in python,
perl,ocaml,haskell,java.



Try writing a PHP module in these languages.

Right I give in, you can't write a php module in any of those languages. Now
I'm not exactly a PHP expert, but i am guessing you can program a PHP module,
in say, PHP?


That's one reason I write in C. There are things I want to do in PHP that's not covered in
current PHP modules. If I do not know C I'm stuck.

And even if I need C to write a PHP module, or a device driver, or a kernel,
or a compiler, the open source landscape is way bigger than that, and you don't
need to know C to be a part of it.

<snip my previous solution>
<snip>
I do not know if you heard about the seven blind men who went to visit an elephant
in order to describe what an elephant is.

I have heard something along those lines before, they all started touching
it up and got different ideas as to what it would be. Or maybe that
was some other story. Anyway, I think the point of it was that they couldn't see the forest for the trees? Or maybe that the trees looked like
dinosaurs. That would be cooler.

In any case I couldn't agree more, learning how to program doesn't mean you
have to be an elephant.

Benno

--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to