Reminds me of elisp, which looks for a top-level call to (interactive) in order to know if the function can be invoked "interactively" (i.e. via M-x or command-execute).
I checked out Gambit-C but my question is, where is the community? It looks like it's just some guys research project, then some other researcher made Termite on top of it. It's community is either non-existent or in hiding, it would seem...
That's a good question, and I have no idea--I just came across it because of Termite (which looks quite nice, by the way; those concurrency primitives [which are Erlang's, really] ought to be in Arc, but I digress). My point was really that it is technologically feasible to do so.
ah okay. You are saying it's possible to put this in Arc because it's in Gambit. Okay, sure. Gambit seems to be a much more performant implementation of scheme that Arc is striving to be. I think there is a lot to be said about serializing closures. Persistence is the nasty nasty dark secret of Computer Science. Our only tool that semi works is Relational Databases, but they aren't good for everything.
In Arc (and most other functional languages), you generally solve your problem by specifying how to transform some input into some output. It should be no suprise to anyone here that this is a great fit for the most visible aspects of Web programming.
In OOP you instead solve your problem by trying to neatly partition it into lots of little bits of state and specifying how each little bit reacts to changes. As the comment explains, OOP programs are often clumsier than functional ones because OOP enshrines scaffolding in the form of the class hierarchy and method/message dispatch model.
So when is OOP a good idea?
I tend to think that it boils down to the size and organization of your team, the number of independent "architects" in your system and how they are managed.
In a small team this should not be an issue and you're probably better off with a functional approach and perhaps rolling your own messaging scheme like the one in the article if you think you need one.
However in a large team you not only have to deal with whatever problem you're working on, you also have to deal with the secondary problems of how the developers interact with each other. The OOP scaffolding pg makes fun of is one way to make managing a larger team easier since it helps the developers play nicely, stick to their little part of the system and stay out of each others way. It's not the only way, but it is relatively popular in part because it allows some management decisions to be directly expressed in the class hierarchy and programming language.
Right now Arc doesn't look like a language for big teams, but perhaps with a good module system that could change.
I do think you leave out an important class (no pun intended) of problems for which OOP is helpful. Simulation, windowing systems... these are modeled elegantly by using classes and objects. In other words, OOP seems to me to be a good fit when the problem you are trying to solve deals with objects. The problem lies in trying to coerce other problems into noun-land.
5. Object-oriented abstractions map neatly onto the domains of certain specific kinds of programs, like simulations and CAD systems.
Also for things like instance creation and method dispatch, OO languages can easily be both faster and more concise than functional languages. In a performance-sensitive setting like a desktop gui or a window system this can easily decide the issue.
But while simulation and OOP do have an important historic relationship, I don't believe you actually gain any special modeling expressiveness by making your objects adhere to a "class" framework. What's worse, the hardcoded assumptions OO languages make about classes and methods can confuse the assumptions in a simulation (e.g. because you can implement an "IS-A" relationship with inheritance doesn't mean you should).
If you want objects in a functional setting, you can just create the appropriate "factory" functions and have those functions return "objects" (i.e. functions with state in closures) which dispatch "methods" however you want them to, just like Jim Rankin did in the article at the top of the thread.
I've skimmed the SICP link, and that does look like a good method. But I don't think they're mutually exclusive. As Jonathan Rees points out (http://paulgraham.com/reesoo.html), the definition of OOP varies; having just inheritance (coughjavacough) does make that problematic. Ruby's mixins and duck typing allow "is-a" without inheritance, thus alleviating some of the complaints.
I think that describing certain things, e.g. a windowing system, in terms of classes and objects does result in a useful description. "My window contains a button and a text field" maps nicely to an OO model. The implementation can (perhaps should) be user-level and/or functional with closures, but that modeling system can be powerful.
And of course, some of this is "taste;" I can't think very well in a visual paradigm, but I love a symbolic one. OOP may be orthogonal to your mental processes, in which case don't use it.
I also didn't allow for initial arguments (yet). And you need to say "(vars 'varname)" to get values in method bodies instead of just "varname." I could probably fix both those things together.
But, generally speaking, the goal was to provide a macro for creating SICP style "objects."
I can sympathize with you somewhat. I like lisp but I'm not a deep lisper. Personally I'd would like it more if it could play nice with Python modules. But that sort of thing is not where the real Arc "action" is at the moment.
Arc takes lisp in a new direction. The right thing to be doing now is not to get buried in details like foreign function interfaces but instead to see where pg's ideas lead. From what I can tell he's doing the same sort of thing Roger Hui and Arthur Whitney did when they took APL in the direction of J and Kx respectively - they let go of a few old things in order to make new ideas fit in better.
The theme of this party is succinctness. Let's all see how well that works out. How low can you go?
LispNYC ( a lisp user group in New York ) has, in the last year or so, seen the debut of at least 3 lisps: otter by perry metzger, clojure by rich hickey, and nyclisp by me. Nyclisp is by far the least mature, but I'm trying to clean it up a bit for a release.
I don't see why. Using built-in database is optional. picoLisp can read/write files so there's nothing stopping you from serializing the structures to file (like Python's picle) or adding a module to query a database.
Although I think that for many cases where you would use serialization to a file or store small amounts of data in sqlite, using built-in object database integrated with the language would be a better solution.
My point wasn't that picoLisp was in any way stopping you from using a separate database, it was that if you go the route of using the built-in abstractions listed on that page you won't find any out-of-the-box interoperability with any existing SQL database. You'll have to roll your own.
That's too bad because I think using the picoLisp database as a cache backed by a SQL database makes a lot of sense.
Even since this started to work, I still prefer some_dict.has_key("username") because then if an ordinary string accidently found its way into some_dict I'd get a runtime error instead of a silent logic bug.