What are Language Standards? Do they matter?

preview_player
Показать описание
---

Related Videos:

***

Welcome! I post videos that help you learn to program and become a more confident software developer. I cover beginner-to-advanced systems topics ranging from network programming, threads, processes, operating systems, embedded systems and others. My goal is to help you get under-the-hood and better understand how computers work and how you can use them to become stronger students and more capable professional developers.

About me: I'm a computer scientist, electrical engineer, researcher, and teacher. I specialize in embedded systems, mobile computing, sensor networks, and the Internet of Things. I teach systems and networking courses at Clemson University, where I also lead the PERSIST research lab.

More about me and what I do:

To Support the Channel:
+ like, subscribe, spread the word

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

Back in my college first year I started python 2.7 but my course was on python 3. I couldn't wrap around my head why the heck two version is different from one another. eventually I ditched 2.7 cause print with parenthesis seems logical to me since I started my programming journey with c. Thank's for the video.

khalidsaifullahfuad
Автор

Regarding python, the version number is the version of the standard not the interpreter (at least the first two fields, 3.0, 3.6, etc.) the interpreter most people use is described as a reference implementation of the standard.

When browsing the official documentation one can even select which "version" to see the documentation for something that is kind of nice when working on machines without access to the latest versions.

So in theory python is "only" a standard, in practice most people use a version of the reference implementation and the the two meld together into one blob of an executable and a language.

axellord
Автор

Reminds me of an old joke: "Standards are wonderful, because there are so many to choose from!" 😆

subsidizer
Автор

Often when something so large as python decides to do a breaking language change, there's scripts that automatically port old code to the new one.

You should still do a diff of the result to be sure, but that makes it much easier to port things.

As long as you're at it early, without resulting changes like different APIs for your dependencies.

But yeah. It was about time for Python to sunset 2.7.X.

SMTM
Автор

Thanks Jacob.
Today Python 3 is ubiquitous but at the time python 3.0 was out, it wasn't so poupular. People were first thinking Java and wondering which would win between Ruby and Python.
I think that drove the decision not to upset all the adopters and ease onboarding of python 3.

unperrier
Автор

Remember when I started learning C++ in college around 1995... In addition to our text book, we had a small reference book with all the keywords and important library functions &c with small examples. Anyway, for the entries about try, throw and catch, all it said was that it was part of the exception handling, and that this feature hadn't been fully defined yet.

baardkopperud
Автор

6:25 Remember why they did it: they had to break one unavoidable thing, so while they were at it, they decided to break a few other lesser issues as well.

It seems to me, parentheses around print() calls is one of the more minor (in)compatibility headaches, since that particular change can be handled automatically. Why are you doing it by hand?

lawrencedoliveiro
Автор

With python 2.7 it was possible to write forward compatible code, code that would run on python 3 without issues. Required a little attention, but nothing major in my opinion. That allowed me to continue while some of the external modules made the transition. With that preparation and the 2to3 script it was mostly painless for me.

mrtnsnp
Автор

That's another thing good about C; language stability is considered a feature. C doesn't have every script-kiddie style web programmer out there shoving new features into existing programs just because the feature now exists. It's definitely a cultural difference. In JS, for example, you can't go 5 minutes without someone on the team trying to shove in the latest es6 syntactic sugar into your production codebase.

ravidesai
Автор

Python is a language, not an interpreter. The interpreter you're using in your video is most likely CPython, there are many different implementations that run on Java, web browsers, and microcontrollers. Python itself is a language specification, every version is documented thoroughly and changes are proposed via PEPs.

4:32 "This python version is the version of the interpreter"
Yes, that's the version for the interpreter, but the version for the specification is also included there, the first two numbers denote it, while the last number is related to the bug fix version of the interpreter.

hkejhkm
Автор

Python has pep standards which most linters use and also has the 2to3 utility that does a pretty good job of converting python2 code to python3. It's not perfect but catches most stuff. I ported a lot of code as an entry level dev with that tool. It really makes life easier.

seanvinsick
Автор

i just checked my debian bookworm machine and it does not have python 2 installed on it, nor do i see it in the repository. my bullseye machine and most of my raspberry pi's still have python2.

samplesandtests
Автор

lol I laughed pretty hard at the whole parentheses rant :D

julienderiviere
Автор

U got an official program to convert python2 to python3. It's called 2to3. Sounds like you doing most of this manually. It's worth a try. At least converted a couple libraries for me.

hed
Автор

I was looking at most the difference between python 2 and 3. It seems to me that it would be pretty easy to port most of python code over by having a script rewrite it.
I have to wonder though how much difference there is in importing libraries from C or C++ in python 2 vs 3. I probably could use a script to handle most of that for me as well though that includes running the compiler. Maybe, what someone should have done was just create a site where python 2 stuff could get converted automatically to python 3. Seems to me 99% of this issue is the same issue I find with most python projects and such pure laziness.

diconicabastion
Автор

Problem solving standards > language standards

SimGunther
Автор

I wish C++ committee did this too. Like breaking the backwards compatibility starting from C++26 and introducing a new language with a ton of improvements.

ohwow
Автор

no it would have been horrible if they forced everyone to migrate
when I write code I don't like going back and rewrite it, that's just counterproductive
I should only ever go back if there is a very critical security vulnerability, otherwise who gives a shit about a print statement that has or hasn't parentheses?

I think python3 should have never happened, they should have just kept the backward compatibility and kept the whole thing in a single binary with a single standard.

I could be wrong though.

lordadamson
Автор

imho c99 was last c standard wich made any sense

trimethoxy
Автор

I got a better idea for the python devs, toss both.

lonec
visit shbcf.ru