![]() |
| | #1 |
| I like turtles Join Date: Sep 2009 Location: Ohio
Posts: 179
| Anyone else feel a certain disgust towards Python? I think it's just way too easy for someone to get comfortable in Python. (Happened to me with Lisp, luckily I had taken a C class before looking at Lisp at all). Slippery slope, they started teaching Java as a beginner's language, soon it'll be Python and then students will be drooling retardedly when they see C/C++ for the first time. Just my two cents. |
| Epy is offline | |
| | #2 |
| &TH of undefined behavior Join Date: Aug 2001
Posts: 5,183
| I can code in a multitude of languages (including C#, C++, Java, IA32 Assembler) and most of the stuff I do now is in python. Not because I have dumbed down, but because the stuff I'm doing calls for a language that can do what python does in an easy manner with the least amount of fuss. Most of what I do involves taking data from various types of databases across both Windows and Linux and moving them securely to different servers, manipulating the data and making it accessible to people via web portals. Could I do this in C++? Damn right I could! Will I? Hell no.
__________________ "If A is success in life, then A equals x plus y plus z. Work is x; y is play; and z is keeping your mouth shut." Albert Einstein (1879 - 1955) Board Rules |
| Fordy is offline | |
| | #3 |
| Senior software engineer Join Date: Mar 2007 Location: Portland, OR
Posts: 5,381
| I think it's weird that you see the expressiveness of Python as a bad thing, but whatever. Python is probably the world's best computer language for teaching students. It reads like pseudocode, with the advantage of actually being real, executable code. It provides a nice mix of imperative and functional constructs and lets you mix them in whatever proportion you are comfortable with. The only thing really missing from Python is static type inference and more robust compile-time checks (yes, Python is interpretted, but its compiled to intermediate code first). Disgust? No, I love Python. When I'm having trouble expressing the solution to a problem in C++, I often turn to Python, get the problem worked out, then translate back to C++. The result is usually better than what I'd end up with by hammering it out in C++ from the start. EDIT: If you see the low volume of code as a drawback for a "hobbyist programmer," try thinking of it another way. If you are just trying to satiate your need to write lines of code, Python lets you create more stuff in a given period of time. You can still write however much code you want, it's just that this volume of code translates to more programs.
__________________ "Congratulations on your purchase. To begin using your quantum computer, set the power switch to both off and on simultaneously." -- raftpeople@slashdot Last edited by brewbuck; 10-23-2009 at 12:20 PM. |
| brewbuck is offline | |
| | #4 |
| Registered User Join Date: Aug 2006
Posts: 76
| If a certain tool can do the job, use the tool. If a different tool, can do the same job, but quicker and easier... uhhh... switch. Python isn't 100% perfect, but what is? It can be used to accomplish very small, to very large jobs, quickly and easily... You find that somehow wrong? I suppose perhaps you should abandon all high(er) level languages, and start programming directly in machine code... not assembler, actual machine code! That should at least be 'Fun'! |
| rdrast is offline | |
| | #5 | |
| Senior software engineer Join Date: Mar 2007 Location: Portland, OR
Posts: 5,381
| Quote:
I lost interest in the nitty-gritties a long time ago, and any time I feel like I'm programming close to the metal I make a deliberate effort to genericize the code so I don't have to do that particular task again. I like doing stuff, not pushing bytes around.
__________________ "Congratulations on your purchase. To begin using your quantum computer, set the power switch to both off and on simultaneously." -- raftpeople@slashdot | |
| brewbuck is offline | |
| | #6 | |
| I like turtles Join Date: Sep 2009 Location: Ohio
Posts: 179
| Quote:
My point is that I'm very familiar with the concept of getting too comfortable with a higher-level language (when I say higher, I mean like a scripting type language). You think about how you would program something, but you think of it in terms of that language. So what happens when you need to program in C for an embedded application or you have to program in C++ to use a certain API? | |
| Epy is offline | |
| | #7 | |
| (?<!re)tired Join Date: May 2006 Location: Portugal
Posts: 5,220
| Quote:
On the other hand, if this is currently being a problem to you, then it clearly shows you are not ready yet. Your C or C++ knowledge hasn't matured enough for you to start dabbling in other programming languages. Better consolidate your C or C++ first.
__________________ Originally Posted by brewbuck: Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster. | |
| Mario F. is offline | |
| | #8 | |
| C++ Witch Join Date: Oct 2003 Location: Singapore
Posts: 10,352
| Quote:
![]() If this is a problem with a language like Python vis-a-vis C and C++, then this is a problem with C and C++ vis-a-vis assembly language (and machine language, but that was obviously just an exaggeration). The point that I would highlight from brewbuck's first post is that Python reads like pseudocode (in fact my pseudocode is pseudo-Python), thus it is arguably an effective tool for training new programmers to think about algorithms and problem solving instead of blindly groping for a solution. This kind of learning can carry over to other programming languages, including C and C++.
__________________ C + C++ Compiler: MinGW port of GCC Build + Version Control System: SCons + Bazaar Look up a C/C++ Reference and learn How To Ask Questions The Smart Way | |
| laserlight is offline | |
| | #9 |
| Hail to the king, baby. Join Date: Oct 2008 Location: Faroe Islands
Posts: 713
| I've seen Python, didn't like it. I've used Actionscript 3, didn't like it. This is mostly 'cause when I deal with it, I want to depth of C++ in it, I just like the control or something :P still, you wouldn't use C++ to make a flash like game, as in a game for browsers, and you wouldn't use C++ for stuff Python does better and easier, that's just logical thinking. Then you can think more about it and actually don't get involved with projects that would be best made in something as simple as Python, but make a project that's best made in C++ or C or whatever you like. It's like talking about a Land Rover and a Ferrari, only an idiot would challenge the Land Rover to a dirt race. |
| Akkernight is offline | |
| | #10 | |
| I like turtles Join Date: Sep 2009 Location: Ohio
Posts: 179
| Quote:
I'd be more apt to learn assembly than Python, simply because it takes more understanding in order for a person to learn assembly than to learn Python. Not really apples to oranges, I know. This is my entire point though...yes, it's fine as a teaching tool, but when it's so incredibly easy and there are so many libraries to do everything you need, it's just so clear to me that anyone introduced to programming is going to see Python, then see everything else and choose Python. When you do something with a lower-level language, it forces you to understand more of what's going on, rather than just using some high-level function in a library that does everything in one fell swoop. It's like using that piece of crap MATLAB. Say I want to see f(x) = x^x in the domain [0, 1]. In MATLAB, it'd simply be fplot('x^x',[0 1]). Yay, you got your graph, and that's all fine and dandy. To do the same in C, you'd have to set up a for loop to plot all the points, get something like libSDL to create a window and actually show the points, make sure you display the part of the graph where the line is present, etc. It'd be overkill, yes, but you'd learn a lot in the process. This is how it is at school, you memorize how to do something for one class and then totally forget it, which is what I think is likely to happen with students that see how easy and complete Python is. They don't give a damn about what's actually going on behind the curtain. It just seems to me that Python takes too much thinking and knowledge out of the equation. | |
| Epy is offline | |
| | #11 | |
| Registered User Join Date: Jul 2009
Posts: 32
| Quote:
Each language is good for something, which is why there are so many of them. You can't fault a programming language for the bad teaching and lack of motivation that some students seem to have. In fact, one could argue that much more could be learned about programming and software engineering in general when using a high-level language that lets you do things quickly. You spend less time fretting over code that is already done and more time actually designing a good program. | |
| crowe is offline | |
| | #12 |
| I like turtles Join Date: Sep 2009 Location: Ohio
Posts: 179
| Well, I can see that no one is going to agree with me here. I'll pose this question though: would you be more apt to hire someone to do some game programming or make a performance application whose main language of choice and knowledge is python? |
| Epy is offline | |
| | #13 | |
| &TH of undefined behavior Join Date: Aug 2001
Posts: 5,183
| Quote:
http://developers.slashdot.org/artic...5/09/17/182207
__________________ "If A is success in life, then A equals x plus y plus z. Work is x; y is play; and z is keeping your mouth shut." Albert Einstein (1879 - 1955) Board Rules | |
| Fordy is offline | |
| | #14 | |
| Registered User Join Date: Jul 2009
Posts: 32
| Quote:
Unfortunately your point moot, as there are just as many/more jobs where you would prefer somebody with knowledge of python over knowledge of asm. | |
| crowe is offline | |
| | #15 | |
| Senior software engineer Join Date: Mar 2007 Location: Portland, OR
Posts: 5,381
| Quote:
If I was hiring somebody to do C++ programming, obviously, I'd hire somebody who is a good C++ programmer. But their preferences toward other languages aren't really relevant.
__________________ "Congratulations on your purchase. To begin using your quantum computer, set the power switch to both off and on simultaneously." -- raftpeople@slashdot | |
| brewbuck is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| python c api | ralu. | C Programming | 0 | 03-01-2009 01:19 PM |
| C and Python | alexnb185 | Tech Board | 5 | 04-11-2008 11:11 PM |
| Python Embedding Help... | Rendered | C Programming | 2 | 11-17-2007 10:08 AM |
| Python | mart_man00 | Tech Board | 7 | 10-06-2003 07:24 AM |
| Python | Xterria | A Brief History of Cprogramming.com | 10 | 05-05-2002 04:08 PM |