Re: A modern way to solve the "callback problem" from a subroutine?



GaryScott wrote:
(snip)

We had to wait so long, because adding pointers was a bad idea to
begin with. It was primarily the need to interoperate with bad
programming practices in other languages that prompted their addition.

There are a number of cases where pointers really are the
best solution. It seems that they have been overused in C and
some other languages, but that doesn't make them bad.

In PL/I, they are part of the list processing facility.
They work well for linked lists, trees, and other data
structures built up dynamically. They work especially
well as structure pointers, where one can point at a
data structure and then work with the different parts
of that structure (including other pointers).

-- glen

.



Relevant Pages

  • Re: Revenge is a dish best served cold (arrays and 8 queens)
    ... can be solved with any "basic" data structure, whether an array, list, ... Other languages can get by with only a single ... engine whose torque rotation curve is not a good match for the load accounting to hills so a solution was devised which matches the regimen of engine for the requirements of the car's trip. ... It is a necessity for pratical use of car with internal combustion engines. ...
    (comp.lang.prolog)
  • Re: Sentence Structure in Other Languages
    ... > modifies rather than before it as in English. ... > sentence structures from other languages? ... I don't see how a data structure there can be better than another ... I expect (I don't see the day of a general algorithm ...
    (sci.lang)
  • Re: Revenge is a dish best served cold (arrays and 8 queens)
    ... <<It remains to be seen which problem cannot be solved in Prolog ... can be solved with any "basic" data structure, whether an array, list, ... Other languages can get by with only a single ... by 1 single gear - "first gear." ...
    (comp.lang.prolog)
  • Re: What to do with (time (length L)) proportional to (length L)
    ... >>> Hmmmm, what data structure are you thinking of that is commonly ... >>> provided by other languages that is missing from Lisp? ...
    (comp.lang.lisp)