3 ms·
I am a day-to-day C programmer. I am surprised to hear Python did not fit well after C for you. In my view, Python is the like the easy scripting version of C.
by Aegean 16y ago
I am a day-to-day C programmer. I am surprised to hear Python did not fit well after C for you. In my view, Python is the like the easy scripting version of C. I first learned Tcl/Tk, then Perl, then looked at bash scripting (my god, horrible) and seen that the earlier three has some obscure syntax with some special meanings of $'s and @'s and hyphenated flags everywhere with no resemblance to C.
Then looking into python, I saw the same philosophy as C; A struct or an array? Use a nice dictionary, set, tuple or a list, nicely kept under the [ ] brackets. Throw them in for loops without the iteration integer. Its just all the same things I do in C but easier, with no cryptic idioms. That's why I love it.
I have 2 choices of languages for all my projects: C and Python
- mkramlich 16y agoAgreed. And interesting you said C and Python. A few years ago I was thinking about what would be the minimum set of languages that would be good to know in order to be able to do almost anything you wanted, and do it well, and to always be employable. I ruled out 1 language alone because of the C phenomenon: there's a whole class of software where today C is the best choice, and a whole different set where C is a bad choice. Therefore, the ideal set was 2+ with C being one. I ended up settling on C, Java and Python. Java for enterprise/BigDumbCompany work, but also because there's a lot of great tooling and innovation happening in the Java space more so than other langs. Python for the role of glue and prototyping and high level no boilerplate bureaucracy but where you could still trust every developer using it. Ruby could probably fill that role decently instead, except be a little better or worse in diff areas. C, Java, Python Then I found out that Google had picked these three as well. Nice!
- kragen 16y agoNo, Google picked C++, not C. Very different philosophy!
- mkramlich 16y agoThanks, looks like you may be right. I just found a post by Steve Yegge in 2007 where he said it was C++, Java, Python and JavaScript. I'm pretty sure I found references elsewhere to C/Java/Python though. Close enough. I had forgotten about JavaScript, I guess I considered that one a no-brainer on the browser side. However, the line blurs between C and C++, especially if you use the extra stuff only tactically as needed rather than a hard-core-always-OO-and-templates approach.
- mkramlich 16y agoBtw I considered C++ for the C slot. But decided if I really wanted 1st class OO support in a language that Java or Python could do that acceptably, and it wasn't worth the price of dealing with what I felt were C++'s design imperfections. So it fell back to: * C for (somewhat) bare metal programming (OS, embedded) * Java for high-level with rubber edges and safety wheels, esp huge codebases in enterprise IT shops with Joe Blub coders * Python for high-level agile w/solo or small elite teams (calling out to C bits where beneficial)
- anon_d 16y agoWhat do you have against bourne shell scripting? I thinks it's probably the most under-rated language/programming paradigm I know. I really don't understand all the hate. Also, what didn't you like about Tcl? I find it much more in-line with the C world-view than python is; It's C-interface is a lot cleaner than Pythons as well. My language-choice algorithm is: sh + unix DSLs -> Tcl/Tcl+C -> SML/Haskell/Scheme -> C -> * Where '*' is whatever language has a library I need, or a language that I'm required to use.