Forum Moderators: bakedjake
Hope I have confused you. :)
regards,
Mark
Each language has its own field. If you wanted to practice lambda calculus you'd choose LISP, for example.
C++ is great for GUI programming, and hard to do correctly. Python is easy to learn and the best choice for rapid development, and bad to save memory. Tk is a toolkit, not a language; Tcl is said to be not very efficient, but I haven't tested it.
As I said, C++ is better for GUI and another componentized programming, while C is way better for low level hacks, possibly with embedded assembly, where performance and excessive full control is useful.
Why would one use Python though?
Small, non performance critical applications.
Its lowdowns are a somewhat high memory usage and bad performance where a memory array has to be traversed.
For its advantages, it is very powerful yet easy to use. Absolutely no danger involved, the worst thing I have done with it is taking all the memory and having it killed by the kernel. And I tried hard. It is very easy to integrate with C code, so it's possible to write modules for the most expensive functions.
The best popular example of an application developed on Python is the p2p tool bittorrent; very useful and fairly complex.
I'd add Perl, which is great not only to elaborate text.
I mean: if you're interested in network apps, using regex ['regular expressions', that comes with Perl]
is a powerful way to create custom, quick, [also relatively low-level->socket, if you want..] non-GUI client things :)
[and there's a lot of Perl docs-examples, on the net]
Yes, run it from the prompt that way or place the shebang at the top and use it as an executable.
#!/usr/bin/python
import math
print math.sqrt(2)
etc... <added: 'chmod u+x test.py' of course...>
Both friends and family who have used Tcl/Tk are unanimous in their disdain, indeed, utter hatred for it. Apparently, using "tickle" is a hair-pulling, teeth-grinding experience, although in some cases it's the only package that will do. :(
I've also used Tk with Perl, and while I doubt it's the windowing toolkit I'd use today, it wasn't bad.
What I have on the shelf right now to learn is a Python book, and I'm looking forward to it. I'm also starting to write some non-web stuff in PHP instead of Perl, and liking it better. It at least feels like my PHP code has a better chance of being legible a year from now than my Perl does. I haven't tried php-gtk yet, though. I just don't seem to do much gui programming, unless you count server-side web apps.
I can definitively recommend Python, and have done so many times [webmasterworld.com] already. Python can be used for pretty much everything, including hardcore number crunching if you use the numeric extensions [pfdubois.com].
You can plug into a variety of GUI modules very easily, most of which (except MFC) are cross-platform.
Other than with Perl, there's no danger to lose your overview in large and very large applications (the original E-Groups [now Yahoo groups] system was writting almost completely in Python). I am selling an application that consists (among other things) of 35k lines of Python code, all of which I have written myself, and I don't have any kind of CS degree.
About 98% of all application code is not performance critical, so that using a bytecode interpreted language like Python will not result in any noticeable slowdown. And once you have identified the few dozen lines of code that act as a bottleneck, it's almost trivial to recode those in C.
Memory consumption of a typical Python application is roughly 10% of what Java would require for the same functionality, which means it's not a factor on todays hardware (unless you're thinking about embedded systems).
Python is very easy to write, and even easier to read. I immediately get a headache when looking at Perl code for more than a minute (even *good* Perl code), but I can understand what most Python code does at first glance. Remember that when you program, most of the time you're reading and thinking, the actual coding is the smallest part of the job.
Python is also the language of Zope [zope.org], the coolest and most powerful web application server framework in existence.
I'm a Vim guy
Vim can be programmed directly in Python.
How does the PC know it's a python script?
By the *.py (resp. *.py[wco]) file name extension on Windows.
By the hashbang line on unix.
Other than with Perl, there's no danger to lose your overview in large and very large applications (the original E-Groups [now Yahoo groups] system was writting almost completely in Python). I am selling an application that consists (among other things) of 35k lines of Python code, all of which I have written myself, and I don't have any kind of CS degree.About 98% of all application code is not performance critical, so that using a bytecode interpreted language like Python will not result in any noticeable slowdown. And once you have identified the few dozen lines of code that act as a bottleneck, it's almost trivial to recode those in C.
Interesting. That wouldn't happen to be Yahoo!Group's buggy and slow web application, would it?
<ducking and running>
* All the members of the group knew what I was doing and wanted it done.
** No, I shouldn't. I'm a member of the group, I have permission to read these posts. If I wish to do it with wget and a perl script that politely waits between requests, what's the difference? I identified myself as someone who is allowed to fetch this data, and I'm fetching it now.
Object Pascal is a variation of Pascal that Wirth didn't have any input on. This means that it is similar in Syntax to the other family members, but distincively different anyway.
Btw: Oberon isn't just a language. There's also an Oberon System, which is a complete OS for some custom hardware. Emulators of that system are also available for other OSes. It's really worth to have a look at that. Wirth is an extremely creative mind, and has invented many concepts in computing that will unfortunately never make it to the mainstream.
The genius of the Oberon System is in the "interclick". This means that you hold down one mouse button, and then click another one at the same time. Sounds strange at first, but gets easy after a few tries. With a three-button mouse, you get 8 actions that can be triggered this way, which is a very powerful way to operate a computer, once you're used to it.
Btw: Oberon isn't just a language. There's also an Oberon System, which is a complete OS for some custom hardware.
Emulators of that system are also available for other OSes.