Re: Simplicity has a future



Tomás said:

Richard Heathfield posted:

foo *foo_create(int bar)
{
foo *new = malloc(sizeof *new);
if(new != NULL)
{
new->bar = bar;
}
return new;
}

specifically to remind me, should I ever try to use a C++ compiler on
the code, that I'm making a big mistake.


A facility as simple as "find and replace" solves the keyword problem.

Yes, but the problem with simple solutions is that they are sometimes too
simple. For example, s/new/newobject/g is a simple fix, but quite likely to
result in tears.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
.



Relevant Pages

  • Re: Simplicity has a future
    ... specifically to remind me, should I ever try to use a C++ compiler on ... A facility as simple as "find and replace" solves the keyword problem. ...
    (comp.lang.c)
  • Re: Simplicity has a future
    ... Ben Pfaff wrote: ... specifically to remind me, should I ever try to use a C++ compiler on ... Web site - http://home.flash-gordon.me.uk/ ...
    (comp.lang.c)
  • Re: Order of operations
    ... side effects and require to documentthose odd behaviours. ... to remind you. ... The compiler can only guess that a side effect may occur. ... to solving the halting problem. ...
    (comp.lang.perl.misc)
  • Re: Simplicity has a future
    ... Ben Pfaff wrote: ... specifically to remind me, should I ever try to use a C++ compiler on ... But C++ programmers aren't stupid enough to need comments. ...
    (comp.lang.c)
  • Re: Simplicity has a future
    ... specifically to remind me, should I ever try to use a C++ compiler on ... and at the same time it screws up all the comments that use ... "new" as an English word. ...
    (comp.lang.c)