Re: How to develop a random number generation device



John Larkin <jjlarkin@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> writes:


[...]


C doesn't encourage subroutines that have multiple entry and multiple
exit points. Pity.

Multiple exit points are no problem - you can easily

return;

from a function wherever you like.

Multiple entry points to a *function* are a bit more awkward - but you
can enter other types of block at multiple points. If you know C you
might enjoy this:

<http://groups.google.com/group/net.lang.c/msg/66008138e07aa94c>

I's occurred to me, more than once, that C was invented to run on a
PDP-11, and that a $400 Dell has 10,000 times the memory and a
thousand times the speed of an 11. So why doesn't somebody invent a
language (and a methodology) that produces/forces reliable code and
requires less debugging, and does rudimentary stuff like data and code
separation, at some expense in runtime resources?

They have, of course - not many people use C to write applications for
desktop machines any more. They use C#, java, all sorts of other
languages and frameworks that do most or all of what you are asking.

However, to take up your analogy, todays microcontroller *is* similar
in power to a PDP-11, so C is now in fact quite a good fit!

--

John Devereux
.



Relevant Pages

  • Re: hog
    ... John Larkin wrote: ... >But gaah! ... Who would want multiple 8051's? ... My company used to sell a product that had 7 8051s in it. ...
    (sci.electronics.design)
  • Re: return in void functions
    ... Yes multiple exit points can make ad-hoc ... Exceptions carry information back up the call stack ... debug time is significantly reduced. ...
    (comp.lang.cpp)
  • Re: return in void functions
    ... >> easier to use and works with multiple returns and exceptions. ... the ones you want to trace. ... but I don't see what the problem with multiple exit points ...
    (comp.lang.cpp)
  • Re: Python style guidelines
    ... >>one point it was recognized that multiple entry points into a ... >>to multiple exit points. ... Parameters can validated, resources ... > and then doesn't find all the subsequent exit points. ...
    (comp.lang.python)
  • Re: "return" in def
    ... removing "returns" where nothing is returned or is it common practice ... nekkid return could be considered just noise. ... but multiple exit points are really practical. ... generators have multiple entry points. ...
    (comp.lang.python)