473,385 Members | 1,342 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Higher-Order Programming in C

Just thought you all might be interested in an article I just finished
about higher-order functions, and their use in Scheme and C:

http://www-128.ibm.com/developerwork...-highfunc.html

This is part of a series of articles I'm writing about functional
programming and how it can be used to even in procedural languages.
This even includes a section on object-oriented programming in C (not
C++) and Scheme.

Jon
----
Learn to program using Linux assembly language
http://www.cafeshops.com/bartlettpublish.8640017
Nov 14 '05 #1
4 1212


Jonathan Bartlett wrote:
Just thought you all might be interested in an article I just finished
about higher-order functions, and their use in Scheme and C:

http://www-128.ibm.com/developerwork...-highfunc.html

This is part of a series of articles I'm writing about functional
programming and how it can be used to even in procedural languages.
This even includes a section on object-oriented programming in C (not
C++) and Scheme.


Mostly, it reads like a Scheme advertisement -- "If
you want Lisp, you know where to find it." The C code
could do with some cleaning up; in particular, the manual
imitation of a closure invokes undefined behavior. It is
flat-out incorrect to invoke a function like

int nextval(void *environment);

via a function pointer described as

typedef void * (*generic_function)(void *, ...);

without first converting the pointer to agree with the
type of the called function. And no, this isn't some kind
of "academic" concern, pertinent only to the DeathStation
line: there are real computers on which this will fail.

--
Er*********@sun.com

Nov 14 '05 #2
Jonathan Bartlett wrote:
Just thought you all might be interested in an article I just finished
about higher-order functions, and their use in Scheme and C:

http://www-128.ibm.com/developerwork...-highfunc.html

This is part of a series of articles I'm writing about functional
programming and how it can be used to even in procedural languages. This
even includes a section on object-oriented programming in C (not C++)
and Scheme.

Jon
----
Learn to program using Linux assembly language
http://www.cafeshops.com/bartlettpublish.8640017


Very interesting message.
Thanks for the tip.

jacob
Nov 14 '05 #3
Jonathan Bartlett <jo*****@eskimo.com> wrote in message news:<42********@news.tulsaconnect.com>...
Just thought you all might be interested in an article I just finished
about higher-order functions, and their use in Scheme and C:

http://www-128.ibm.com/developerwork...-highfunc.html

This is part of a series of articles I'm writing about functional
programming and how it can be used to even in procedural languages.
This even includes a section on object-oriented programming in C (not
C++) and Scheme.


Very interesting. I would write many programs in Scheme if I could
easily link them to outside libraries like I can with C.

I think that there are slightly more safe/pleasant ways to do many of
the things done in this article, but I can't remember them right now.
I'll post them if I remember them.
Nov 14 '05 #4
Very interesting. I would write many programs in Scheme if I could
easily link them to outside libraries like I can with C.


Many Scheme implementations allow this with little difficulty. Chicken
can actually parse some C prototypes directly. Implementing glue code
is pretty simple in most of them.

Jon
Nov 14 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Willem | last post by:
Are there any tools that would support higher level application development with PHP? I need to develop a complex enterprise app, but I don't want my programmers to waste their time on low level...
0
by: Wilford Trelour | last post by:
Dear python-list@python.org, Diploma U N I V E R S I T Y&nbsp;&nbsp;&nbsp; D I P L O M A&nbsp;&nbsp;&nbsp; P L A N &nbsp;
2
by: Thomas Guettler | last post by:
Hi! I use xemacs. Is it possible to show the next higher level in the status bar? Up to now it looks like this: Noconv-----XEmacs: foo.py (Python Font)----L1177-C0--79%--- It would be...
2
by: Jochen Califice | last post by:
Hi NG! A wise man said "You don't have to know anything but where to find it" :) K I've been searching about two hours but didn't find one thing usable. I have a layer at my page. In it...
4
by: Howard Martin | last post by:
I have a page at http://www.no1hastings.com.au/new/index.html designed for 800 x 600 resolution and where nearly all the elements are positioned using CSS. The elements are lined up to the left...
3
by: rcmail14872 | last post by:
I created a simple Data Access Page and it views fine in Internet Explorer 5.5 on my PC. But when I try to view it on my Pocket PC running Pocket PC 2002 operating system, I get the error message...
4
by: Amjad | last post by:
I was looking at the MSCOMM32.OCX help when I found that it supports only up to 256000 bps baud rate. Is there another .NET COM that supports higher baud rates (e.g. 460800 and 921600 bps) Thanks...
5
by: Leon | last post by:
Greetings, Does anybody know of or is working on any python modules that allow for a direct but higher-level interface to OpenGL? For example, quick functions to draw lines, curves, and basic...
4
by: Andreas Borutta | last post by:
Hi, what is the task with which I could not cope? There is a link with an inline-element (strong e.g.) inside. It has a higher font-size than the content of its parent. For the hover effect...
3
by: Kaheru | last post by:
Hi, my IT knowledge not that strong. Hope you guys dun mind I asking a stupid question. I recently been assign with an assignment to performance test a FTP server. I gathered the data using a test...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.