[sdiy] IN your mind, what is ....
Magnus Danielson
cfmd at bredband.net
Tue Feb 3 22:21:45 CET 2004
From: Rainer Buchty <buchty at cs.tum.edu>
Subject: Re: [sdiy] IN your mind, what is ....
Date: Tue, 3 Feb 2004 11:23:21 +0100 (CET)
Message-ID: <Pine.LNX.4.56.0402031120090.7805 at atbode100.informatik.tu-muenchen.de>
Ohh... I forgot!
> > Want an explanation that makes C++ sound good?
> >
> > "C structs that can contain functions".
>
> Uhm... C structs can contain functions, even without ++. How about
> something like this:
>
> typedef struct mc68cmd_s
> {
> char *mask;
> char *mnem;
> char *para;
> int (*callback)(dispc_t *pc, mc68cmd_s *cmd, int datas[], char *str);
> int flags;
> } mc68cmd_t;
>
> People just dislike pointers nowadays :)
I don't fear pointers. They can be a very powerfull and usefull tool, in the
right hands and with the right armwaveing around them. Not even function
pointers and stuff like void pointers is bad, but the USE must be wise, just
like any other tool. A hammer is a darn good tool in the right hands, but it is
also dangerous both to you and others when used inappropriatly. When I got
started in C I learnt that "A C programmer is a free programmer but under
responcibility." which is a very wise way on looking on any programming task.
When you write some software, make sure to document things so it is clear how
to use it, regardless of it being a full application or just a library
somewhere. The software world went haywire with their abstraction upon
abstraction trail instead of working on working methods, which is still quite
arcane and old. I've seen all these new and fancy tools, but most of them
misses the real point and doesn't help me to aid me in the actual design work.
Cheers,
Magnus
More information about the Synth-diy
mailing list