[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Programming Languages, "to C or not to C, that is the Q."



On Wed, 26 Jan 2005 01:18:34 -0200
Henrique de Moraes Holschuh <hmh@debian.org> wrote:

> On Tue, 25 Jan 2005, Ron Johnson wrote:
> > Because this project used an RDBMS that did not use \0-terminated
> > strings, memcpy() had to be used everywhere.  What a royal fscking
> > PITA.
> 
> Wouldn't proper wrapper (sanity) functions to talk to the RDBMS fix
> this instantly, by converting safely to null-terminated fields and
> back?
> 
> > Made me really dislike C, and hate the notion that C is a GP
> > language.
> 
> It *is* a GP language. It got the job done, even if in a non-optimal
> way.
> 
> GP means you have a lot of chances of it being able to do something,
> and a lot of chances of it *not* being the optimal choice for any
> given"something".
> 

In terms of symplicity c usually is not the best choice for achieving
you goals (of course that depends on the goal).

In terms of speed it usually is the optimal choice as appart from doing
things in assembly, it gives just about the most control, in exchange
for the least obscurity. You may need to work rather hard to get things
done though (although there are a lot of libraries that have gotten
things done for you).

BTW, the are cases where c will give you better results then assembly as
the compiler's optimizer can a lot of time do better work then the
person.

> -- 
>   "One disk to rule them all, One disk to find them. One disk to bring
>   them all and in the darkness grind them. In the Land of Redmond
>   where the shadows lie." -- The Silicon Valley Tarot
>   Henrique Holschuh
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact
> listmaster@lists.debian.org
> 
>  
>  +++++++++++++++++++++++++++++++++++++++++++
>  This Mail Was Scanned By Mail-seCure System
>  at the Tel-Aviv University CC.
> 



Reply to: