string is rarely useful as a function argument

Timon Gehr timon.gehr at gmx.ch
Sat Dec 31 10:13:44 PST 2011


On 12/31/2011 06:32 PM, Chad J wrote:
> On 12/30/2011 05:27 PM, Timon Gehr wrote:
>> On 12/30/2011 10:36 PM, deadalnix wrote:
>>>
>>> The #1 quality of a programmer is to act like he/she is a morron.
>>> Because sometime we all are morrons.
>>
>> The #1 quality of a programmer is to write correct code. If he/she acts
>> as if he/she is a moron, he/she will write code that acts like a moron.
>> Simple as that.
>
> Tsk tsk.  Missing the point.

Not at all. And I don't take anyone seriously who feels the need to 'Tsk 
tsk' btw.

>
> I believe what deadalnix is trying to say is this:
> Programmers should try to write correct code, but should never trust
> themselves to write correct code.
>

No, programmers should write correct code and then test it thoroughly. 
'Trying to' is the wrong way to go about anything. And there is no need 
to distrust oneself.

Anyway, I have a _very hard time_ translating 'acting like a moron' to 
'writing correct code'.

> ...
>
> Programs worth writing are complex enough that there is no way any of us
> can write them perfectly correct code on first draft.  There is always
> going to be some polishing, and maybe even /a lot/ of polishing, and
> perhaps some complete tear downs and rebuilds from time to time.  "Build
> one to throw away; you will anyways."  If you tell me that you can
> always write correct code the first time and you never need to go back
> and fix anything when you do testing (you do test right?) then I will
> have a hard time taking you seriously.

Testing is the main part of my development. Furthermore, I use 
assertions all over the place.

>
> That said, it is extremely pleasant to have a language that catches you
> when you inevitably fall.

That is why I also like Haskell.


More information about the Digitalmars-d mailing list