Using scripting languages for KDE4 main modules

Aaron J. Seigo aseigo at kde.org
Sat Oct 7 17:31:53 BST 2006


On Saturday 07 October 2006 8:58, Boudewijn Rempt wrote:
> On Saturday 07 October 2006 16:42, Aaron J. Seigo wrote:
> >  - a LOT of people know it from such applications as the web
>
> I see this assertion a lot, and I really don't know whether it's right.
> There are many web-people who have a little javascript -- but are they the
> people who want to write a script to automate something in KMail? I don't

i would suggest that the examples of firefox's extensions and apple's 
dashboard proves the point quite nicely. if that isn't enough proof for you 
in addition to the logic behind it then i'd suggest you simply don't want to 
be convinced =) now, i understand that when some of us were making the case 
for js in application scripting there weren't such obvious and visible 
success stories out there, but now there are.

> the majority of Quanta users know more Javascript than any other language 
> except for php, but KWord users? Is javascript at all used outside webpages 
> and OS X's desktop widgets?

this is a mildly silly question isn't it? i mean, you're essentially asking if 
there's any use case besides the web, MacOS's desktop, firefox and 
thunderbird, etc... in other words, besides all those great examples, are 
there any others? if you honestly sum it up, you'll see that there are few, 
if any, languages that have as wide use and success as javascript for these 
sorts of tasks. and the reasons are pretty obvious for it imho (i listed them 
in my last email)

you'll also find it in various desktop apps here and there (google can help). 
we have both kjsembed and qsa to draw upon. it starts to seem a bit obvious, 
to be honest.

so ... what is the benefit of having a preferred language for app automation? 
and what are the limitations it brings?

well, it allows users to learn one language and apply it in multiple places. 
it would really suck if a user would need to learn one language to script 
koffice, another to script the workspace, another to script kmail, etc. all 
because application developers (that's us) couldn't see past our own personal 
preferences for things instead of doing what is best for those who use all of 
our applications together.

does this mean that one couldn't provide python for application scripting if 
js was the chosen default? of course one can. but the default js should also 
be supported. in other words, if one supports scripting js (or whatever is 
the default) must be supported and any other languages you wish to support 
can be provided in addition to that.

for application development, of course, it's a completely different story 
altogether and i agree that javascript is not the best language to pick from 
and that we should, if we can, support a plethora of languages. that said, 
i'd prefer to see us support one or two WELL than five in a half-assed 
manner. i'd also suggest that java is a pretty important language to support. 
i'd be overwhelmingly proud of this project if we managed to have even better 
java, python and ruby app support than we did in kde3. i'd settle for one 
python app in an official kde module though ;)


p.s. and before someone jumps out with the bleeding obvious: yes, there will 
be corner cases where javascript is completely, wholly and absolutely 
inappropriate due to the problem domain of the application (e.g. for instance 
a scientific/math domain where there is already a standard language for 
working within that domain). but let's not derail on corner cases and rather 
concentrate on the core uses.


-- 
Aaron J. Seigo
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20061007/0d683558/attachment.sig>


More information about the kde-core-devel mailing list