POV-Ray : Newsgroups : povray.off-topic : Games programmers : Re: Games programmers Server Time
7 Sep 2024 11:26:09 EDT (-0400)
  Re: Games programmers  
From: Orchid XP v8
Date: 13 Sep 2008 08:57:13
Message: <48cbb8a9@news.povray.org>
>> As far as I'm aware, C hasn't changed in 20 years, never mind 10.
> 
>   Compilers, tools and operating systems have. Besides, C itself has changed
> as well (the latest standard is from 1999).

My main problem with C is it's design. It isn't *designed* to be "safe" 
or "easy", it's designed to be efficient. The result is a language which 
offers really minimal assistance to programmers. Crawling through a 
program with a debugger hardly compares to having a problem detected at 
compile-time before the program even runs.

I'm sure compilers and debuggers have got better over time. But that 
doesn't change the fundamental design of the language. It's unsafe by 
design, and that causes me endless difficulties.

>   Or are you telling me this isn't happening with haskell either? If I'm
> not mistaken, haskell didn't even have a debugger until recently.

(And FWIW, the debugger really isn't that good.)

>> Really? I had assumed that after you read past the end of the file, it's 
>> behaviour is simply undefined. I wasn't expecting the C standard to 
>> actually bother to define the result of an operation you're not supposed 
>> to perform.
> 
>   How are you supposed to detect the end of file if you are not supposed
> to ever reach the end of the file? That's kind of contradictory.

It's different in every language of course, but what typically happens 
is that you have a function that says "is this EOF yet?", and if it is, 
you stop reading. And if you don't stop, that's a program bug, and 
should be signalled as one.

Apparently in C it's arranged differently.

>>>> I've never seen a C debugger.
>>>   Thus you base all your prejudices on non-knowledge.
> 
>> Yes - because having a debugger would make function names easier to 
>> remember and pointer syntax less baffling and printf() would work 
>> right... oh, wait...
> 
>   Now you are twisting the argument, and arguing for the sake of arguing.
> The above context had nothing to do with printf or function names.

My point is that having a debugger doesn't magically solve all the problems.

>>>   Luckily haskell doesn't have any arbitrarily selected features in it
>>> which you need to memorize (such as for example some function names).
> 
>> Well at least you can easily look up Haskell function names.
> 
>   Yes, that's something not possible with C.

It wasn't when I was trying to learn it, no. Today, we have the Internet.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.