<br><br><div class="gmail_quote">On Sat, Oct 8, 2011 at 11:34 PM, Alan Gauld <span dir="ltr">&lt;<a href="mailto:alan.gauld@btinternet.com">alan.gauld@btinternet.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On 08/10/11 14:17, lina wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
    You will never say, &quot;Gosh, I wish I knew FEWER programming languages!&quot;<br>
Ha Ha ...<br>
<br>
regarding the python and C, I was told that python is good for interface<br>
and others, but slow. and further was suggested to write the main part<br>
in C and wrapped in python.<br>
</blockquote>
<br>
The myth that Python (and interpreted languages in general) are too slow for &quot;real programming&quot; is common among older programmers(*) who were trained on old computers like the original PC and servers like the DEC PDP series. When I left university our office had just acquired the largest, most powerful VAX computer in Europe - it ran at 12MHz and had 16MB of RAM and supported over 100 users! Wow! However many. many, applications can now be written in interpreted languages and run fast enough (and the key word is &quot;enough&quot;).<br>
</blockquote><div>Wow .. I used to hate slow computer. Now I won&#39;t hate the retard (slow reaction) lab computers any more.  (It&#39;s a joke)<br>When I was in college, I needed to copy assignment to print it out. <br>
I used floppy driver at that time, and the stores in campus put the floppy driver near the cashier place with the gum and other candies. Now the gum and other candies I guess are still there, but no floppy driver any more, but probably some CDs or DVDs.<br>
      <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
If you really need the last bit of speed then yes, C (or even assembler) may be needed, but that is a tiny proportion of the code for most things. So to take your friends comment and turn it around:<br>
<br>
&quot;... write the main part in Python (or .NET or Java or...) and write the speed critical parts in C.&quot;<br>
<br>
Because typically the Python part is likely to be 70-90% of the code<br>
and the C part much less.<br>
<br>
(*)I tend to consider myself in that group and up until about 15 years ago held the same view. But around then I got involved in projects using languages like Smalltalk, Tcl/Tk and VB. It was obvious that these languages were perfectly capable of producing usable apps<br>

on the typical hardware of the time - early Pentiums running at<br>
around 500MHz and with 128M RAM etc. Nowadays with most PCs having processors running in excess of 2GHz and over 2GB RAM there are very few apps that cannot be constructed using interpreted languages, and many are. I suspect the reason most commercial projects still use Java, C++ etc is twofold:<br>

1) Magazines etc tend to review apps against their competition on speed, even if the real world speed measures are irrelevant. So for marketing purposes you must be seen to be comparable to your competitors.<br>
2) Compiled code is harder for the competition to reverse engineer so coding secrets are &#39;safer&#39;. (This is largely psychological since its the design concepts your competitors are more likely to steal, not the algorithmic details.)<br>

<br>
There are projects where ultimate speed is still important, indeed one of my current projects at work is being largely rewritten from C#.Net to compiled C++ for exactly that reason. (But it is a number crunching server app supporting around 15000 concurrent users) But the vast bulk of user programs could be written in interpreted languages IMHO.  One of the interesting things about my recent conversion from Windows to Linux for my home PC  is to see just how many of the desktop apps are written in Python, including games and office apps etc.<br>
</blockquote><div> </div><div>My initiative to learn python is that I noticed some (often used) apps are written in python.<br>Another reason is that I want to learn (at least) one language deeper and seriously (hopeful to have a happy ending in learning).<br>
<br>Thanks, I have forwarded this email to my friend.<br>   <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><font color="#888888">
<br>
-- <br>
Alan G<br>
Author of the Learn to Program web site<br>
<a href="http://www.alan-g.me.uk/" target="_blank">http://www.alan-g.me.uk/</a><br>
<br>
______________________________<u></u>_________________<br>
Tutor maillist  -  <a href="mailto:Tutor@python.org" target="_blank">Tutor@python.org</a><br>
To unsubscribe or change subscription options:<br>
<a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/<u></u>mailman/listinfo/tutor</a><br>
</font></blockquote></div><br>