Lex Fridman on switching from C++ to Python

preview_player
Показать описание
Please support this podcast by checking out our sponsors:

GUEST BIO:
Guido van Rossum is the creator of Python programming language.

PODCAST INFO:

SOCIAL:
Рекомендации по теме
Комментарии
Автор

Guest bio: Guido van Rossum is the creator of Python programming language.

LexClips
Автор

It seems that lex was pretty dogmatic about his use/love of C++. My degree is in CS and we learned early on that It is better to be agnostic and simply use the best tool for the job at that time.

DaggerSecurity
Автор

In my opinion the best case is to know both of them because it's conviniently to use python for testing hypotheses and learning models but c++ to use for extensions and high-performance production (for example in computer vision)

hopelesssuprem
Автор

Really love to see how much of an existential question this is for Lex. I myself am really into language design, and play around quite a bit with languages just to get a sense of what they can offer. I have a series of data post-processing algorithms I use as my "hello world" projects, and the relative complexity of trying to implement those algos in a new language shows me a lot, like the community, how easy it is to learn, how close are the paradigms to things I already know.

I'm most comfortable in PHP, and I've stopped beating myself up about that. When I need to quickly prototype something, I whip it up in PHP, and if the POC proves valuable, I think re-write the code into whatever language would make most sense. Certain languages, while not exactly useful for finding a job or getting things done quickly, are absolutely uncontested in terms of altering the way you think about programming.

Haskell, LISP, oCAML, even brainf**k all radically altered the way I think about coding, and practices from those have leaked into my enterprise code as well. To wrap this all up, as much as I love learning languages (and writing them), I still have such a deeply personal connection to PHP, like a first love, of sorts.

StasPakhomov-wjnn
Автор

I appreciate how he expressed the struggles of trying to pick a language, especially when you want to pick a default language.

kofiani
Автор

I am adding c++. As a data scientist I usually use python, modern c++ is much nicer than I remember c++98. I think that you need lots of python in AI but c++ is so much faster doing certain things such as reading and preprocessing data. I think Bjarnes advice is the best, you should know at least 2 languages, preferably 5. So far is enough for me with python/c++.

gilbertobatres-estrada
Автор

Honestly, there is nothing wrong with the C style C++. It only needs a Matlab like IDE with an interactive REPL to become perfect.

brainxyz
Автор

It's hilarious to me, that people associate machine learning with python even though most popular libraries for machine learning are written in C or C++ (or at least are partly written in those languages). Python is there to stitch everything together and make it human readable; for that, it works very well, but who's doing the bulk of the work?

Dr.SexySpice
Автор

It's rarely very difficult picking a programming choice. The obvious choice is obvious the vast majority of the time. If 2 languages are hard to pick between you usually can't go wrong with either one.

williamcory
Автор

If you want to study a new topic and want to implement a new algorithm, the fastest way is Python...for example when I was studying path planning algorithms, I implemented most of them in python. However, when I was developing a robotic system, I implemented everything in C++...

ANDY-xsym
Автор

Many Robotics researchers have the same question about which program language they should use. In some research areas such as the control theory of robots, the research community uses Python mostly but the industrial community uses C++ because the previous work is based on C++, and C++ may be faster than Python. Other researchers in a different area may have a similar situation likes this.

jiasun
Автор

I’m going through this now throughout my career I use to be big into wordpress and php it was something I was really good at but I felt like I was playing it safe as far as jobs. Then I started getting better and deeper into JavaScript both Frontend with react library and then backend using node js, graphql, and mongo. Now I got an opportunity with a gaming company that makes a well known AAA game. I’m literally switching from web to c++ building for computers and consoles and the more and more I learn it the more and more I enjoy it l, love how things work on the lower level. Love working and learning about memory management. But also I came from the era of action script pretty much dying out and JavaScript wasn’t as powerful like it is now this is definitely jquery days. This is when in the tech community if you wasn’t using a low level language. You weren’t considered a programmer and scripting languages was never acknowledged as a programming languages until now. I’m happy to see how JavaScript has evolved and I can say is one of my favorite languages. C++ I’ve stayed away from because I was intimidated but the language. But with years of programming in JavaScript and going from not understanding how to create a function to understanding the mark and sweep algorithm used to garage collect objects not being referenced. I feel confident on learning a new language.

Webdevelopmentya
Автор

0:42 I agree that community & culture has an impact on the choice of language. For eg., here in the biz & consulting domain where I work, R is quite popular, with C++ sprinkled in. Coming from Excel land, R just feels easier & more natural to use than Python, & having a community that's into it, helps as well.

annaczgli
Автор

Borland based C was the first programming language I learnt in 1999. But I suggested my niece learn Python so she's ready for the AI generation that is already here, although i really feel working with C programming gives greater appreciation for memory management and all the pointer stuff.

neoblackcyptron
Автор

I went to tech school for programming about 8 years ago. I learned Visual Basic and C++. I found C++ fun but confusing when the program got past a certain complexity. Of course now I've forgotten nearly everything I'd learned and am starting over. I'm thinking of concentrating on both Python and C++. No idea if I can ever get some sort of job with these skills but I have to try. I'm 42 and can't see any other career path out there for me, especially having some physical impairments.

nodak
Автор

My personal "choose your programming language" flowchart is something like this: 1) List all languages that are commonly used, except Python unless there's no other option. 2) Filter out inappropriate languages for the job, e.g. C++ is not for web. 3) Sort by use-case library support, general language popularity, and add a small weight on "do I want to learn this language".

darkwoodmovies
Автор

If I start to learn programming, where should I start C ++ or python, or even some says C is better for Ai

rulerofexistence
Автор

I'm not sure if C++/C and Python are as antagonistic as some debates make it out to be. CPython (written in C/Py) is the most widely used implementation of the Python language. Moreover, many high-performance Python libraries are based on code in C such as NumPy. You call it in Python but you practically get C performance. If you stay away from abysmal Python, e.g. lots of (nested) loops, most people will be fine. Those who miss C-style performance and syntax in Python could use the Cython library.

carlosiebenschuh
Автор

This guy has intimate relationships with his tech

Septumsempra
Автор

You can use both C++ and python as they can integrate nicely using things such as Pybind11, SIP, shiboken, boost::python, etc.

christianm