Skip to content

Instantly share code, notes, and snippets.

@RobertAKARobin
Last active March 17, 2023 14:52
Embed
What would you like to do?
Python Is Not A Great Programming Language

Python is not a great programming language.

It's great for beginners. Then it turns into a mess.

What's good

  • A huge ecosystem of good third-party libraries.
  • Multiple inheritance.

What should be good

  • It's easy to learn and read. However, it's only easy to learn and read at the start. Once you get past "Hello world" Python can get really ugly and counterintuitive.
  • The Pythonic philosophy that "There should be one -- and preferably only one -- obvious way to do it." As someone who loves working within rules and rigid frameworks, I love this philosophy! As someone who writes Python, I really wish Python actually stuck to this philosophy. See below.

What's "meh"

  • Forced indentation. Some love it because it enforces consistency and a degree of readability. Some hate it because they think it enforces the wrong consistency. To each their own.
  • Dynamic typing. There are lots of dynamically-typed languages and lots of statically-typed languages. Which kind of typing is better isn't a Python debate, it's a general programming debate.

What's bad

  • 400 ways (more or less) to interpolate strings. This prints "Hello Robin!" 3 times:

    user = {'name': "Robin"}
    print(f"Hello {user['name']}!")
    print("Hello {name}!".format(**user))
    print("Hello %(name)s!" % user)
    

    If there was a unique and obvious use-case for each of these then that would be one thing, but there's not.

  • 69 top-level functions that you have to just memorize. GvR's explanation sounds nice, but in reality it makes things confusing.

  • map doesn't return a list, even though the whole point of a mapping function is to create one list from another. Instead it returns a map object, which is pretty much useless since it's missing append, reverse, etc. So, you always have to wrap it in list(), or use a list comprehension, which, speaking of...

  • List comprehensions are held up as an excellent recent-ish addition to Python. People say they're readable. That's true for simple examples (e.g. [x**2 for x in range(10)]) but horribly untrue for slightly more complex examples (e.g. [[row[i] for row in matrix] for i in range(4)]). I chalk this up to...

  • Weird ordering in ternary/one-line expressions. Most languages follow a consistent order where first you declare conditions, then you do stuff based the on those conditions:

    if user.isSignedIn then user.greet else error
    
    for user in signedInUsers do user.greet
    

    Python does this in the opposite order:

    user.greet if user.isSignedIn else error
    
    [user.greet for user in signedInUsers]
    

    This is fine for simple examples. It's bad for more complex logic because you have to first find the middle of the expression before you can really understand what you're reading.

  • Syntax for tuples. If you write a single-item tuple (tuple,) but forget the trailing comma, it's no longer a tuple but an expression. This is a really easy mistake to make. Considering the only difference between tuples and lists is mutability, it would make much more sense to use the same syntax [syntax] as lists, which does not require a trailing comma, and add a freeze or immutable method. Speaking of...

  • There's no way to make dicts or complex objects immutable.

  • Regular expressions require a lot of boilerplate:

    re.compile(r"regex", re.I | re.M)
    

    Compared to JavaScript or Ruby:

    /regex/ig
    
  • The goofy string literal syntaxes: f'', u'', b'', r''.

  • The many "magic" __double-underscore__ attributes that you just have to memorize.

  • You can't reliably catch all errors and their messages in one statement. Instead you have to use something like sys.exc_info()[0]. You shouldn't have a catch-all in production of course, but in development it's very useful, so this unintuitive extra step is annoying.

What's bad about the culture

Most programmers will acknowledge criticisms of their favorite language. Instead, Pythonists will say, "You just don't understand Python."

Most programmers will say a piece of code is bad if it's inefficient or hard to read. Pythonists will say a piece of code is bad if "it isn't Pythonic enough." This is about as helpful as someone saying your taste in music is bad because "it isn't cultured enough."

Pythonists have a bit of a superiority complex.

@AkashicSeer
Copy link

AkashicSeer commented Feb 16, 2023 via email

@Odalrick
Copy link

@AkashicSeer

They also don't understand why strong typing is a good thing.

Python has strong typing, it's static typing it lacks. They are working on it though.

And I fail to see how simply removing { and } magically makes a language
more readable?

It doesn't, obviously. Removing indentation, however, "magically" makes a language less readable.

However, what I'm really interested in is this fanatic hatred of significant white-space.

You say you use an IDE and reformat the code; so you must be using white-space all the time.

I just don't get it. Why would anyone care? What is so hard about using tab instead of "{" and backspace instead of "}"?

As far as I'm concerned, the white-space has to be there regardless of whether the language requires it or not, and most code agrees. So why not skip the indirection of "{}" and just use it?

Most objections I can at least understand even if I don't agree with them, but this one is just baffling. Especially that it is apparently a main objection, rather than a small one like "I don't like that ruby uses the keyword rescue instead of catch.".

@pglpm
Copy link

pglpm commented Feb 16, 2023

@Odalrick I don't "hate" the white space, but I disagree with you on the "has to be there". There are other ways to emphasize nesting and subclauses, for example with changes of colour, or of font, or some symbols on the left of line start. These other ways become more convenient for example if you have multiple nestings.

The point is that the end users should have freedom to choose what kind of syntax highlighting they prefer. Some IDEs for example highlight functions or variables or whatnot with different colours; that's useful. But what would you say if suddenly the syntax of the language required you to write function names in a particular colour?

@nslay
Copy link

nslay commented Feb 16, 2023

AkashicSeer, C++ user interface development won't be a breeze. If you want easy breezy UI development, it's pretty hard to beat something like PyQt I'm sad to say. It's not a fair comparison... Python and other scripting languages are for fast development, maybe not so much for optimal/correct programs. C++ is for optimal/correct programs... very slow development though.

@AkashicSeer
Copy link

AkashicSeer commented Feb 17, 2023 via email

@AkashicSeer
Copy link

AkashicSeer commented Feb 17, 2023 via email

@AkashicSeer
Copy link

AkashicSeer commented Feb 17, 2023 via email

@AkashicSeer
Copy link

AkashicSeer commented Feb 17, 2023 via email

@AkashicSeer
Copy link

AkashicSeer commented Feb 17, 2023 via email

@Odalrick
Copy link

@pglpm

emphasize nesting and subclauses, for example with changes of colour, or of font, or some symbols on the left of line start

Those all sounds terrible to me. You cant write font or colour to a text file, and random symbols are hard to write. You'd need an IDE, and perfect colour vision and ability to tell fonts apart.

It can be nice as an extra indication, but indentation rules. Can you give an example of a language that uses either of those to indicate nesting? That sounds like an esolang to me.

The point is that the end users should have freedom to choose what kind of syntax highlighting they prefer.

Here I completely disagree, although this is an opinion I have acquired in later years. First from prettier; but nowadays I consider a language incomplete if it doesn't have an opinionated and intrusive auto-formatter endorsed by the language. Another thing Python could be better at.

@AkashicSeer

With brackets you can let your IDE do all the formatting.

Same with indentation, you just press some other keys. Easier to press keys too, but that depends on the keyboard layout so not really an advantage.

All languages can and do have indentation.

Exactly. So where does the hatred for Python having indentation come from?

What arguments can anyone make against brackets? How do they magically make code not able to be indented and formatted and less readable?

How does indentation magically make code not able to be indented? I don't have a problem with brackets, I just don't understand why some people insist that they are the greatest thing ever and must be present in every language, on every row or they throw a tantrum.

line up bullshit with tabs and indentations is harder for people like myself who have visual impairments and dyslexia

Ok, so it's your disabilities that are the problem. I can understand that, it sucks. Still, it's like being upset at stairs because you need a wheel-chair. The anger seems excessive.

So you can paste one long, long ass line of code

And with python you never have to, because it will always be properly indented. Or broken, but your JavaScript or PHP can also be buggy.

@pglpm
Copy link

pglpm commented Feb 17, 2023

@Odalrick You say "Those all sounds terrible to me" – that's exactly my point: these matters are subjective, and therefore such choices should be left to the end user. Imagine a language that would force you to use different fonts for syntax; how would you feel about that? That's how people like me feel when forced to use spaces or tabs for syntax by Python.

Whitespace was never used for syntax in other languages as Python does now because it was too sensitive with copy, paste, and file transfer operations. Nowadays textual aspects such as fonts or colours can more and more be copied and pasted. So I imagine that in some years some smartass might have the brilliant (not) idea of forcing fonts or colours for syntax. That's what Python did with indentation.

You also say "I consider a language incomplete if it doesn't have an opinionated and intrusive auto-formatter...". Sure that's your opinion. I don't see why it should be imposed on others, and I won't let anyone impose it on me. Indeed that's why I don't use python anymore.

@AkashicSeer
Copy link

AkashicSeer commented Feb 17, 2023 via email

@AkashicSeer
Copy link

AkashicSeer commented Feb 17, 2023 via email

@Odalrick
Copy link

@pglpm

therefore such choices should be left to the end user.

And they are. Use a different language, that is the choice that should be left to the user.

It's not disliking meaningful indentation I have a problem with, I is the vitriol people seem to have about it I just don't understand.

It's like intentionally picking a red crayon out of a pack of different colours, and screaming about how you hate red.

Imagine a language that would force you to use different fonts for syntax; how would you feel about that?

I wouldn't use it. I also wouldn't hate and scream about it.

I don't see why it should be imposed on others

It should be imposed on others so that people write similar code that is easier to skim and create more useful diffs.

The same reason we have meaningful names and think about the structure of the code.

Indeed that's why I don't use python anymore.

Good, I don't want you to use tools you don't like or feel are not useful.

@Odalrick
Copy link

@AkashicSeer

So you're telling me that I can easily copy and paste python from one function to the next and simply let my IDE format it?

Maybe you can't. I've never had a problem with it. Different experiences give rise to different preferences.

Try PyCharm Community edition maybe? I even have it set up so I don't have to press a key, it formats when I save.

Why do pythonians love to stare at screens trying to figure out if the code is properly indented or not?

The point is you don't. The indention is there instantly, and you see instantly if the nesting is correct.

Could this be the issue? You don't use the indention to see if your code is correct?

Why do Pythonians love to waste so much time trying to visually format shit.

We don't. We set the nesting of functions, blocks, et cetera. It just "happens" that it also visually formats.

The thing you have to realise is that to other people the indentation is useful. To me and others who like indentation, it is the indention that tells us what the code is. The braces need to be there to satisfy the computer, but to us they're just line noise; the indentation tells us what the code does.

For instance, c:

if (a > 2)
    do_stuff();
    do_other_stuff();

Looks like both functions are in the if-block to me; and had it been Python I'd be correct and my code would work from the start if I wrote that. But in c, is is incorrect, and one has to reformat for it to be immediately visible.

Worse if you encounter this code in an example. It is obviously wrong, but there is no way of telling what it should do.

Python sidesteps that issue by saying that the for-humans structure is the same as the for-computer structure. Obviously code can still be buggy, but at least it isn't ambiguous and buggy.

What is wrong with letting the IDE do

Nothing. You still have to tell the IDE how to format. In C you do that with braces, in Python you do it with tab and backspace.

I'm sorry you have problems with Pronterface, maybe you can get a refund? And next time check out the software before you buy it, usually if it's that bad other people will warn you.

...so your apparent hatred of indentation is because you are unhappy with a piece of software you bought? So it's not really about the indentation?

disabilities are not a good reason

I get that it is unfair, but it not really Pythons fault that you have trouble reading. You don't have a right to demand that everything caters to you, no-one does. Everyone has things that are inaccessible to them. It's not like there is a shortage of other languages you can use instead.

@AkashicSeer
Copy link

AkashicSeer commented Feb 17, 2023 via email

@AkashicSeer
Copy link

AkashicSeer commented Feb 17, 2023 via email

@nslay
Copy link

nslay commented Feb 17, 2023

What have you tried with C++ when creating a UI? What didn't work? How can C++ development be any slower than using a shitty language that forces you to stare at a screen to make sure you indent properly? I'm looking at GTK, C++, Eclipse, Cmake. I'll never in my life touch Python, it sucks ass that bad. I'm mostly looking to create something that takes minimal space and works as fast as possible so even my old phones can run it. I want to be able to point my old phone at the printer and use it's camera and broadcast it via Wifi so I can view it on other computers and phones while being able to also control the printer.

For C++ GUIs, I have written a wxWidgets GUI for graphically designing power system survivability simulations. It's been a while, but wxWidgets is like Microsoft Foundation Classes, but cross platform. It uses lots of preprocessing macros! And more recently I've used Qt to design a plugin for MITK. I made a mesh editor plugin for fast 3D segmentation annotation for blob-like organs in medical images.

C++ GUI development is slower mostly because it involves having to compile every attempt. Every change you make requires compiling to test! And that's very slow for large projects. When you have a compilation error, you have to compile again after fixing the error! You also have to spend the time to setup the build system to pull in all the dependencies (include paths/library paths) to even build the thing in the first place! GUI toolkits like Qt are massive with hundreds of include files and dozens of libraries... you need to use something like CMake that can navigate the numerous includes/libraries of a GUI toolkit like Qt. On top of CMake, knowledge of library dependencies in Qt really helps!

For the end users, you have to do something like ship the Qt libraries and make sure those users have the proper dependencies or redistributables installed. Versions of dependencies is also an important consideration as different versions can break ABI! That's when you get dreaded symbol errors in Linux. Or you'll have to use something like Dependency Walker to figure out which symbols are missing on Windows.

Now in Python... you just import some Qt module and can instantly start making windows, buttons, text boxes, combo boxes, etc.... I had a colleague make a fancy network topology editor with PyQt in just a matter of hours! This time frame would be nearly impossible in C++! The key here is that you don't need build systems or compiling to make changes and test GUI changes or functionality. It just works out of the box with scripting languages like Python!

What do you get out of C++? Your program is probably going to run faster and it's likely more correct owing to all the compile-time type checks! What do you get out of Python, or other scripting languages? You'll be able to try things faster and with no project bootstrapping overhead.

@sammorton11
Copy link

This thread is great lol.

@grahamnicholls
Copy link

grahamnicholls commented Feb 17, 2023 via email

@AkashicSeer
Copy link

So every time you get an error on Python, it's at runtime - in a medical imaging app. As opposed to a c++ (not that I'm a fan) app, where it is at least syntactically and referentially correct. Scripting languages are not suited to critical apps IMO.

On Fri, 17 Feb 2023, 15:40 nslay, @.> wrote: @.* commented on this gist. ------------------------------ What have you tried with C++ when creating a UI? What didn't work? How can C++ development be any slower than using a shitty language that forces you to stare at a screen to make sure you indent properly? I'm looking at GTK, C++, Eclipse, Cmake. I'll never in my life touch Python, it sucks ass that bad. I'm mostly looking to create something that takes minimal space and works as fast as possible so even my old phones can run it. I want to be able to point my old phone at the printer and use it's camera and broadcast it via Wifi so I can view it on other computers and phones while being able to also control the printer. For C++ GUIs, I have written a wxWidgets GUI for graphically designing power system survivability simulations. It's been a while, but wxWidgets is like Microsoft Foundation Classes, but cross platform. It uses lots of preprocessing macros! And more recently I've used Qt to design a plugin for MITK. I made a mesh editor plugin for fast 3D segmentation annotation for blob-like organs in medical images. C++ GUI development is slower mostly because it involves having to compile every attempt. Every change you make requires compiling to test! And that's very slow for large projects. When you have a compilation error, you have to compile again after fixing the error! You also have to spend the time to setup the build system to pull in all the dependencies (include paths/library paths) to even build the thing in the first place! GUI toolkits like Qt are massive with hundreds of include files and dozens of libraries... you need to use something like CMake that can navigate the numerous includes/libraries of a GUI toolkit like Qt. On top of CMake, knowledge of library dependencies in Qt really helps! For the end users, you have to do something like ship the Qt libraries and make sure those users have the proper dependencies or redistributables installed. Versions of dependencies is also an important consideration as different versions can break ABI! That's when you get dreaded symbol errors in Linux. Or you'll have to use something like Dependency Walker to figure out which symbols are missing on Windows. Now in Python... you just import some Qt module and can instantly start making windows, buttons, text boxes, combo boxes, etc.... I had a colleague make a fancy network topology editor with PyQt in just a matter of hours! This time frame would be nearly impossible in C++! The key here is that you don't need build systems or compiling to make changes and test GUI changes or functionality. It just works out of the box with scripting languages like Python! What do you get out of C++? Your program is probably going to run faster and it's likely more correct owing to all the compile-time type checks! What do you get out of Python, or other scripting languages? You'll be able to try things faster and with no project bootstrapping overhead. — Reply to this email directly, view it on GitHub https://gist.github.com/a1cba47d62c009a378121398cc5477ea#gistcomment-4474454 or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYOKGHHTXUOLDI3PSSD3FLWX6LV5BFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFQKSXMYLMOVS2I5DSOVS2I3TBNVS3W5DIOJSWCZC7OBQXE5DJMNUXAYLOORPWCY3UNF3GS5DZVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVA4TQOBUGA4DQNVHORZGSZ3HMVZKMY3SMVQXIZI . You are receiving this email because you commented on the thread. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

Python isn't suited for many things, but that is not stopping those who know only one language from trying to use the one language to do everything the one language shouldn't be used to do. I have yet to find a program written in Ptyhon that works properly without a ceremony of installing 10+ dependencies, and then it still doesn't work

@AkashicSeer
Copy link

What have you tried with C++ when creating a UI? What didn't work? How can C++ development be any slower than using a shitty language that forces you to stare at a screen to make sure you indent properly? I'm looking at GTK, C++, Eclipse, Cmake. I'll never in my life touch Python, it sucks ass that bad. I'm mostly looking to create something that takes minimal space and works as fast as possible so even my old phones can run it. I want to be able to point my old phone at the printer and use it's camera and broadcast it via Wifi so I can view it on other computers and phones while being able to also control the printer.

For C++ GUIs, I have written a wxWidgets GUI for graphically designing power system survivability simulations. It's been a while, but wxWidgets is like Microsoft Foundation Classes, but cross platform. It uses lots of preprocessing macros! And more recently I've used Qt to design a plugin for MITK. I made a mesh editor plugin for fast 3D segmentation annotation for blob-like organs in medical images.

C++ GUI development is slower mostly because it involves having to compile every attempt. Every change you make requires compiling to test! And that's very slow for large projects. When you have a compilation error, you have to compile again after fixing the error! You also have to spend the time to setup the build system to pull in all the dependencies (include paths/library paths) to even build the thing in the first place! GUI toolkits like Qt are massive with hundreds of include files and dozens of libraries... you need to use something like CMake that can navigate the numerous includes/libraries of a GUI toolkit like Qt. On top of CMake, knowledge of library dependencies in Qt really helps!

For the end users, you have to do something like ship the Qt libraries and make sure those users have the proper dependencies or redistributables installed. Versions of dependencies is also an important consideration as different versions can break ABI! That's when you get dreaded symbol errors in Linux. Or you'll have to use something like Dependency Walker to figure out which symbols are missing on Windows.

Now in Python... you just import some Qt module and can instantly start making windows, buttons, text boxes, combo boxes, etc.... I had a colleague make a fancy network topology editor with PyQt in just a matter of hours! This time frame would be nearly impossible in C++! The key here is that you don't need build systems or compiling to make changes and test GUI changes or functionality. It just works out of the box with scripting languages like Python!

What do you get out of C++? Your program is probably going to run faster and it's likely more correct owing to all the compile-time type checks! What do you get out of Python, or other scripting languages? You'll be able to try things faster and with no project bootstrapping overhead.

Wow thanks a lot for the detailed feedback. I have been reading and trying for days to decide how to create the UI. I am leaning towards putting it in a browser page, going to look into webview and web assembly today. One reason is I know all devices I want to target have a browser, phones, tablets, laptops, pcs etc. The issue is each has a different OS and each OS has it's own way of doing things. I have not found any UI framework that claims to work on all mobile devices. The other bonus to using a webview or browser etc. is I can use HTML,Javascript, CSS to build it and I can view it without compilation steps. The downside is it feels cheesier. LOL But my app needs a built in server for the user to remotely via browser to interact with their Printer/CNC machines anyways.

@AkashicSeer
Copy link

So every time you get an error on Python, it's at runtime - in a medical imaging app. As opposed to a c++ (not that I'm a fan) app, where it is at least syntactically and referentially correct. Scripting languages are not suited to critical apps IMO.

On Fri, 17 Feb 2023, 15:40 nslay, @.> wrote: @.* commented on this gist. ------------------------------ What have you tried with C++ when creating a UI? What didn't work? How can C++ development be any slower than using a shitty language that forces you to stare at a screen to make sure you indent properly? I'm looking at GTK, C++, Eclipse, Cmake. I'll never in my life touch Python, it sucks ass that bad. I'm mostly looking to create something that takes minimal space and works as fast as possible so even my old phones can run it. I want to be able to point my old phone at the printer and use it's camera and broadcast it via Wifi so I can view it on other computers and phones while being able to also control the printer. For C++ GUIs, I have written a wxWidgets GUI for graphically designing power system survivability simulations. It's been a while, but wxWidgets is like Microsoft Foundation Classes, but cross platform. It uses lots of preprocessing macros! And more recently I've used Qt to design a plugin for MITK. I made a mesh editor plugin for fast 3D segmentation annotation for blob-like organs in medical images. C++ GUI development is slower mostly because it involves having to compile every attempt. Every change you make requires compiling to test! And that's very slow for large projects. When you have a compilation error, you have to compile again after fixing the error! You also have to spend the time to setup the build system to pull in all the dependencies (include paths/library paths) to even build the thing in the first place! GUI toolkits like Qt are massive with hundreds of include files and dozens of libraries... you need to use something like CMake that can navigate the numerous includes/libraries of a GUI toolkit like Qt. On top of CMake, knowledge of library dependencies in Qt really helps! For the end users, you have to do something like ship the Qt libraries and make sure those users have the proper dependencies or redistributables installed. Versions of dependencies is also an important consideration as different versions can break ABI! That's when you get dreaded symbol errors in Linux. Or you'll have to use something like Dependency Walker to figure out which symbols are missing on Windows. Now in Python... you just import some Qt module and can instantly start making windows, buttons, text boxes, combo boxes, etc.... I had a colleague make a fancy network topology editor with PyQt in just a matter of hours! This time frame would be nearly impossible in C++! The key here is that you don't need build systems or compiling to make changes and test GUI changes or functionality. It just works out of the box with scripting languages like Python! What do you get out of C++? Your program is probably going to run faster and it's likely more correct owing to all the compile-time type checks! What do you get out of Python, or other scripting languages? You'll be able to try things faster and with no project bootstrapping overhead. — Reply to this email directly, view it on GitHub https://gist.github.com/a1cba47d62c009a378121398cc5477ea#gistcomment-4474454 or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYOKGHHTXUOLDI3PSSD3FLWX6LV5BFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFQKSXMYLMOVS2I5DSOVS2I3TBNVS3W5DIOJSWCZC7OBQXE5DJMNUXAYLOORPWCY3UNF3GS5DZVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVA4TQOBUGA4DQNVHORZGSZ3HMVZKMY3SMVQXIZI . You are receiving this email because you commented on the thread. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

Actually with python you might not even get an error, shit just won't work properly and you will be left wondering WTF? Programs crash and don't tell you why etc. Python should not be used anywhere in medical fields.

@movy
Copy link

movy commented Feb 19, 2023

Python came to prominence when other alternatives were Perl, PHP or Ruby (or C++ hehe). It was a sane choice at the moment, but nowadays only a person who's whole coding experience consists of Scratch Jr, can pick Python as a starting point for their project. Which is a real bummer, as it truly feels like going backwards in time when you switch from literally anything modern to Python, and some of the brightest coders waste their (and ours, users') time on this mess.
I guess this thread includes people who used only Python and pray on Ven. Guido's portrait before bedtime and other people, who, you know, have experienced anything else in this world. It's a stupid idea trying to convince fanatics to walk away from their outdated beliefs, but it's fun to see them justifying their terrible life choices.

p.s. Community Service Announcement: JS/TS never required semicolons (apart from veeeeery rare edge cases, which can and should be rewritten anyway), and (IMHO) it looks way cleaner without them. So whoever brings up this point ("omg, ; at every line, yuck!") just displays his/hers level of (un)awareness about other languages.

@AkashicSeer
Copy link

AkashicSeer commented Feb 20, 2023 via email

@nslay
Copy link

nslay commented Feb 20, 2023

I do love C, but C has a lot of similar problems as C++. On top of that, a lot of the conveniences C++ offers, you have to roll yourself in C or use external libraries (e.g. C lacks STL). I didn't mean to scare you about C++ and I think you should prefer it over C. Not only do you get all of the powerful features of C++ and STL, it's mostly a superset of C and plays nicely with C!

If C/C++ are languages you are learning for practical reasons, I think C++ will land you more jobs than C. Otherwise, I'd just go straight to something like Rust... I know it's hyped a lot, but that one seems to have real potential. You get all the benefits and powers of C/C++ and some memory and thread safety C/C++ lacks. Heck, you can even write operating systems in Rust like RedoxOS! Although, memory safety in C++ is a lot better these days since you can generally use STL for all your data structure and memory management needs. You won't really be playing games with arrays and copies when STL is doing all of this for you under the covers.

@AkashicSeer
Copy link

I do love C, but C has a lot of similar problems as C++. On top of that, a lot of the conveniences C++ offers, you have to roll yourself in C or use external libraries (e.g. C lacks STL). I didn't mean to scare you about C++ and I think you should prefer it over C. Not only do you get all of the powerful features of C++ and STL, it's mostly a superset of C and plays nicely with C!

If C/C++ are languages you are learning for practical reasons, I think C++ will land you more jobs than C. Otherwise, I'd just go straight to something like Rust... I know it's hyped a lot, but that one seems to have real potential. You get all the benefits and powers of C/C++ and some memory and thread safety C/C++ lacks. Heck, you can even write operating systems in Rust like RedoxOS! Although, memory safety in C++ is a lot better these days since you can generally use STL for all your data structure and memory management needs. You won't really be playing games with arrays and copies when STL is doing all of this for you under the covers.

I'm working on software that interacts with 3d printers. I'll also be working on the firmware for the printer which is C++ So again I am not learning them for fun or for jobs, I am learning them to create software I need and will probably sell to others. I also do lots of microcontroller coding since I invent lots of things. So pretty much everything I am doing and will do will require C and C++. I'd like to know plain C because it leads into C++. I already know OOP so many of the C++ concepts should come pretty easily once I move to C++, actually I am learning both at the same time. One reason I want to know C is as you say, many libraries are in C and if I need to edit or create my own I need to know it.

Golang sounded very promising, but it just isn't. I don't want to deal with Golang and C while compiling or trying to cross compile. I'll check back with Golang in another 5 years to see if so many of the modules still need C.

@RobertAKARobin
Copy link
Author

RobertAKARobin commented Feb 20, 2023

Please move conversations unrelated to this article to a different platform. You might try r/cscareerquestions or r/experienceddevs, for example. Thanks!

@AkashicSeer
Copy link

Please move conversations unrelated to this article to a different platform. You might try r/cscareerquestions or r/experienceddevs, for example. Thanks!

Sorry I have severe ADHD and little things get me off on a wild tangent.

@valsteen
Copy link

List comprehensions are held up as an excellent recent-ish addition to Python

PEP 202 – List Comprehensions
https://peps.python.org/pep-0202/
Created: 13-Jul-2000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment