What language for plugins?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

What language for plugins?

nelson -
Hi all,
  i know that i can code my plugins for Squeak in C. there are other possibility? Can I choose for example Python? What are the requirements? I have read only about C...

thanks a lot,
  nelson


Reply | Threaded
Open this post in threaded view
|

Re: What language for plugins?

Göran Krampe
Hi!

"nelson -" <[hidden email]> wrote:
> Hi all,
>   i know that i can code my plugins for Squeak in C. there are other
> possibility? Can I choose for example Python? What are the requirements? I
> have read only about C...
>
> thanks a lot,
>   nelson

Well, in theory you can of course easily use anything that can be linked
from C. So typically, if language X can produce a dll or lib that can be
linked into using C conventions then you are pretty much set up. But...
the question in this case is - what do you want *to do*?

Plugins are typically used when:

1. Performance is critical (C being faster for low level stuff when you
know what to do with your bits and bytes)
2. There is a library written in C (or similar) you want to hook into.
3. You want to make calls into the OS, which typically also means
interfacing with C libraries - so it is actually the same reason as #2
above.

Now... why would you then want to use Python? And why do you want to
make a plugin? If you explain that then we can answer ypu better. :)

regards, Göran

Reply | Threaded
Open this post in threaded view
|

Re: What language for plugins?

nelson -
hi

Well, in theory you can of course easily use anything that can be linked
from C. So typically, if language X can produce a dll or lib that can be
linked into using C conventions then you are pretty much set up. But...
the question in this case is - what do you want *to do*?

Plugins are typically used when:

1. Performance is critical (C being faster for low level stuff when you
know what to do with your bits and bytes)
2. There is a library written in C (or similar) you want to hook into.
3. You want to make calls into the OS, which typically also means
interfacing with C libraries - so it is actually the same reason as #2
above.


The answer is 2! I have a library written in python and I want to use it from Squeak.
 

Now... why would you then want to use Python? And why do you want to
make a plugin? If you explain that then we can answer ypu better. :)


I want to use Python because my code is in python.
 

regards, Göran


thanks,
  nelson