1 |
On Mon, 22 Mar 2004 23:24:25 +0200 |
2 |
Mart Raudsepp <leio@××××××××.net> wrote: |
3 |
|
4 |
> On Mon, 2004-03-22 at 22:58, Tom Wesley wrote: |
5 |
> > This discussion seems to be leading towards the use of scripting (?) |
6 |
> > languages like Python and Perl, and more mentions of Python than |
7 |
> > anything else. I have to say that I like the idea of this, least of |
8 |
> > all because it will give me some ability to comment on portage and |
9 |
> > other Gentoo specifics. I like this idea, as for some reason it |
10 |
> > sounds less of a large slope to climb. If/when I get there, what |
11 |
> > are the GTK+2 and QT bindings like for Python? I'm mainly concerned |
12 |
> > about the speed and how similar it is to using C/C++ - it's quite |
13 |
> > probable that I'll want to learn either eventually. |
14 |
> |
15 |
> GTK+-2.x Python bindings (PyGTK[1][2]) and Qt 3.x Python bindings |
16 |
> (PyQT[3]) mostly just wrap around the C (for gtk+) and C++ (for Qt) |
17 |
> library with an extension, thus actually the speed loss isn't too |
18 |
> signifact. For example in the world of wxWidgets[4] many people first |
19 |
> write the application in wxPython[5] first as the GUI can be written |
20 |
> quickly, easilly changed, no need to waste time on compiling, etc. |
21 |
> Often it stays in python too. The skeletal is done in python so to |
22 |
> say. |
23 |
> |
24 |
> The API function names are kept as close as possible to the C/C++ |
25 |
> couterpart so later doing it directly in C/C++ shouldn't be too hard |
26 |
> once you have the basics and have memorized the function names. Less |
27 |
> often need to look into the reference you keep under your pillow ;) |
28 |
> Often there are multiple functions in python for one function in |
29 |
> C/C++, that's because python doesn't know about function overloading. |
30 |
> |
31 |
> Personally I started with BASIC, then Pascal, then took on C and C++. |
32 |
> And the more high-level the more I like it, thus I don't do low-level |
33 |
> C coding, only when I have to :P |
34 |
> Python is a very good language with which to start serious |
35 |
> programming. No need to worry about declaring variables, |
36 |
|
37 |
And that's what I dislike (am I the only one?) in script languages. |
38 |
(Mostly) you don't know the actual content of the variables. Is it a |
39 |
string? An Integer? An object reference? (Yeah I know there are |
40 |
possibilities to find it out). Why to find out such things if you could |
41 |
declare it in "right" languages? |
42 |
|
43 |
> you learn doing identation |
44 |
> right due to the language, you can program interactively, you have the |
45 |
> help system right there build in, and so on. |
46 |
> |
47 |
> References: |
48 |
> 1. http://www.daa.com.au/~james/pygtk/ |
49 |
> 2. http://www.pygtk.org/ |
50 |
> 3. http://www.riverbankcomputing.co.uk/pyqt/ |
51 |
> 4. http://www.wxwidgets.org/ |
52 |
> 5. http://www.wxpython.org/ |
53 |
> |
54 |
> -- |
55 |
> With regards, |
56 |
> Mart Raudsepp |
57 |
> |
58 |
> Project manager of wxMUD |
59 |
> E-mail: leio@××××××××.net |
60 |
> http://wxmud.sourceforge.net/ |
61 |
> |
62 |
> |
63 |
> |
64 |
> -- |
65 |
> gentoo-dev@g.o mailing list |
66 |
> |
67 |
|
68 |
-- |
69 |
gentoo-dev@g.o mailing list |