"Rod Pemberton" <do_not_h...@notemailnotz.cnm> writes:Well, C doesn't really have arrays ;-).
> C has structs and arrays. That's what's needed.
> "Closures" seems to be the one "magic" feature that everyone seems to thinkThey're not magic. You can do similar things with OOP or structs
> is missing from their favorite language. What's so special about closures?
containing function pointers and data, but closures avoid a lot of
syntactic clutter and bureaucracy compared to that. Example in Python:
def derivative(f, h): # approximate numerical derivative
print square(3) # prints 9
You could write something like "derivative" in C with function pointers,
> C has been used to implement nearly all, if not all, of the languages onIt's just the usual situation of using a simpler tool to implement a
> Wikipedia's "closure" page that have closures or closure like structures. I
> know I've been over _this_ previously on c.l.f. ...
more advanced one. Jet engines are made using screwdrivers, not the
other way around. C is the screwdriver in that picture.
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.