Markus Dehnhardt wrote: > Dear cooters, > > I am new to coot, but I have already discovered how powerful > extensions and key bindings can be. My question is quite simple: if > I want to generate my own extension or keybinding, which scripting > language is better suited? I am not very familiar with either but > willing to experiment. > > There were similar questions already on this mailing list but there > are a couple of things that are not clear to me: > > Some of the documentation is for python some for scheme: "the > scripting interface" is python and the "reference manual" is > scheme. Are all functions awailable for both? Or does one have any > advantage over the other?
Sigh... Well, you are not the first person to be confused by this. The state of the scripting documentation has been reported as problematic for a while. I don't know what do to about it that does not involved a lot of work. Yes, the User Manual is mostly written with schemey examples. The reference manual I have not looked at for years :-/, the scripting interface page is also automatically generated and provides an interface from a C-programmers point of view - which is very like that for Python. I use often this quite often. The "scripting interface for functions written in scheme/python" should equivalent access to functions that do the same thing. The syntax of the function calls can be readily converted between scheme and python. There are notes available on how to do this. The functions that we saw today, for example, could have equally well have been written in python. > What is other users preference: python or scheme, and why? For those who are not influenced by me, python I'd say. And they chose python because it is more readily picked up for those with an imperative or object-oriented mind-set. Like the dolphins, I'd choose scheme for exactly the same reasons. > How often do people, other than developers, create extensions? Hard to say, but my feeling is "not often enough". And that is, I suppose, is due to the poor state of the scripting/extension documentation. That and the fact that it takes an investment of time to learn the scripting language, the Coot extensions API and the GUI toolkit. > And finally to the scheme scripters: how did you learn scheme? The Little Schemer and Ken Dybvig's "The Scheme Programming Language". To answer your question: python or scheme? Yes! We provide the best 2 languages so that you have the choice. How to choose? Read "The Little Schemer" - if you think it is delightful and stimulating, use sheme. If you think it is hateful, irrelevant and full of irritating silly parentheses, use python. HTH, Paul.