views:

236

answers:

7

Hello!

So I'm aware of the big ammount of general-purpose scripting languages like Ruby, Python, Perl, maybe even PHP, etc. that actually claim being usable for creating desktop applications too.

I think my question can be answered clearly

  • Are there actually companies using a special scripting language only to create their applications?

  • Are there any real advantages on creating a product in a language like Python only?

  • I'm not talking about the viability of those languages for web-development!

  • Should I stick with C(++) for desktop apps?

best regards, lamas

+2  A: 

Python (combined with PyQt) is a very solid combination for GUI desktop applications (note that while QT is LGPL, PyQt (the Python bindings) is dual licensed: GPL or commercial).

It offers the same (GUI library-wise) as Qt on C++ but with Python's specific strenghts. I'll list some of the more obvious ones:

  • rapid prototyping
  • extremely readable (hence maintainable) code

Should I stick with C(++) for desktop apps?

In general: no, unless you want to / need to (for a specific reason).

ChristopheD
A: 

http://www.pygtk.org/applications.html

Seems like a really long list of GUI applications in Python using just one of the frameworks.

S.Lott
A: 

Some part of MPICH2 is written in Python. I didn't check everything, but many parts of it used for running mpi applications are written it Python. Maybe MPICH2 is not used by everyone, but for sure it is good piece of software.

klew
+4  A: 

The languages you list aren't really scripting languages, as that tends to describe languages designed to work inside of a larger framework (like javascript) that provides its interface to the world. While you can certainly write scripts in those languages, each is a proper programming language (referred to as a dynamic or interpreted language, in contrast to compiled languages like C or C++).

There are many mature gui toolkits for creating desktop apps with interpreted languages. A search for any of those languages with "gui" on SO will yield many results.

The advantage of the languages you list are rapid development and concise code.

The advantage of compiled languages is mainly speed, and deeper ties with the internals of the operating system. But for most desktop apps, the ease of development in an interpreted language outweighs any small performance gains (unless you are writing a cpu intensive app, in which case, write the cpu heavy bits in C, and then call them from the interpreted language, which can handle the gui)

Many interpreted languages offer easy escapes to C or other languages (often with a nice inline syntax).

I would encourage you to take a look at some examples on http://rosettacode.org to see the fundamental differences between how programs come together with the languages you are interested in.

Eric Strom
http://en.wikipedia.org/wiki/Scripting_language Seems to allow Python as a scripting language, since -- like the shell -- it's recognized as a script interpreter via the `#!` comment.
S.Lott
its definitely a fuzzy line, but id say things like javascript / actionscript / bash are mostly on the scripting side, whereas perl / php / python / ruby are mostly on the other side
Eric Strom
What's the "other" side? I don't get the distinction you're making. There's binary. And there's scripting. What's this other category you're hinting at?
S.Lott
Defining a "scripting language" as "having a shebang" is a nice, crisp definition, but not a good one. "Scripting language" carries with it the connotation of being difficult to use for large or general purpose programs. That's not true of Ruby or Python, at the very least.
Wayne Conrad
@Wayne Conrad: "connotation of being difficult to use for large or general purpose programs" Really? Where did that come from? I've never heard it before. I've only been in this business for 30 years, so perhaps it's something new that I haven't seen yet. Do you have a link or a reference? Something I can read that says scripting must be difficult?
S.Lott
+6  A: 

The company I work for uses Perl and Tk with PerlApp to build executable packages to produce or major software application.

Perl beats C and C++ for simplicity of code. You can do things in one line of Perl that take 20 lines of C.

We've used WxPerl for a few smaller projects. We'd like to move fully to WxPerl, but existing code works, so the move has a low priority until Wx can give us something we need that Tk can't.

Python is popular for building GUI apps, too. You may have heard about Chandler. That's a big Python app. There are many others as well.

Ruby is also a suitable choice.

PHP is breaking into the world of command line apps. I am not sure about the power or flexibility of its GUI toolkits.

daotoad
+1  A: 

I have used a number of programs that were developed using scripted languages. Several embedded device vendors ship my group Windows-based configuration and debugging utilities written in TCL. Google's drawing program SketchUp has a lot of Ruby inside it (and users can create add-ons using Ruby). I have seen many Linux applications written in Python. There are many more examples out there, but often times finished applications are bundled up to the point where you can't really tell what's powering it on the inside.

Yes, there can be advantages to working with scripted languages. Some scripted languages make it easier to do specific tasks; for example, text processing is much easier (IMO) in a language like Ruby that has regular expression support and a robust String class than it is in plain old C. Generating a UI using a scripted language may make it easier to support multiple platforms, as all the platform-specific code is taken care of inside the language interpreter or pre-compiled libraries. For example, our suppliers who build TCL-based apps claim they can build the UI for an app using TCL in a fraction of the time it would take them to build it in C++ or VB, and then they can port it to Linux almost effortlessly.

On the other hand there are a few things that scripted languages typically aren't suited for, such as writing drivers or doing anything that requires low-level hardware access.

Most importantly, however, is this: modern languages have become quite powerful to the point where choice of language doesn't make as big of a difference as it used to be. Use the language you are most comfortable with. The learning curve associated with learning a new language will usually have a much larger impact on your project.

bta
+2  A: 

I would recommend you not try to look for a language that is best for GUI apps but instead look for the language that you like the most and then use that to write your app.

Ruby, Python, Perl all have GUI tool kits available to them. Most of them have access to the same often used tool kits like TK, GTK, and Wx. The look and feel of a an app will be dependent more on the GUI tool kit than on the language, and performance wise your likely to see more impact for how you write your app than language choice.

If your comfortable with C++ then you should also look at C# or Java as options. While not scripting languages they have many of the same benefits like memory management and more sane string implementations.

Ven'Tatsu