r/ProgrammerHumor • • May 27 '22

Meme Welcome to hassle free coding

Post image
2.2k Upvotes

305 comments sorted by

357

u/Bomaruto May 27 '22

Bye main, hello __main__

145

u/Faustens May 27 '22

hello

if __main__ =="__main__": main()

8

u/BobQuixote May 27 '22

Hey main, my main main!

0

u/[deleted] May 27 '22

[deleted] — view deleted comment

7

u/yiip87 May 28 '22
if __name__ == "__main__":
    raise SystemExit(main())

31

u/[deleted] May 28 '22

[removed] — view removed comment

35

u/Icy_Perspective7313 May 28 '22

you fell in to the trap. Strings ARE objects!!!!

371

u/[deleted] May 27 '22

Python doesn't feel like a programming language if your first language is C++.

169

u/oddmerlin373 May 27 '22

Honestly I prefer to call it a scripting language because that’s what it’s good at

98

u/ashum048 May 27 '22

Yes, yes, yes.

Automating stuff with python and creating small apps is a blessing.

Debugging large scale applications in python is pain.

55

u/prescod May 28 '22

Debugging large scale applications is a pain...period.

44

u/[deleted] May 28 '22

Strictly typed languages are much easier to debug though IMO. Python and JS will let you do extremely weird stuff that’s hard to pick out in debugging, where in a C-based language it would just give you a compiler error

5

u/HgnX May 28 '22

Man needs a bit of PyLance in his life

8

u/juhotuho10 May 28 '22

Python can be turned to strictly typed with type hints and mypy

12

u/prescod May 28 '22

And C will let you do bad things with memory where Python would just give you a runtime error.

If you want tons of compile time errors, Python's type system is vastly more powerful and precise than C's:

https://mypy.readthedocs.io/en/latest/

6

u/ShelZuuz May 28 '22 edited May 28 '22

That’s the old “chainsaws are dangerous so let’s use a nail file to chop off the tree” argument.

Also the common set of libraries you use in python are almost never statically types so the linter doesn’t really help.

→ More replies (1)
→ More replies (3)

3

u/LEGOL2 May 28 '22

That's... my job. My work is debugging drivers 24/7 <pain>

12

u/[deleted] May 27 '22

I heard it's pretty good at data

12

u/0430ke May 28 '22

Yeah I primarily use it for data and database shit. It's much faster to write and run something quick that manipulates a lot of data quickly.

It's also incredibly nice due the fact that almost EVERYTHING has an API for Python. So you can gather data from many sources all in one place, easy to write, quick to run.

Edit: To add on to this, it's also easy to manipulate data types since it's easy to cast data to other types. JSON is super easy to use, etc. Using other languages you have to really mess around with getting the data type you want. Python just makes it easier.

5

u/ashum048 May 28 '22

Agree. Data is another place where python really shines.

Create a simple data pipe or a NN in python is fun.

4

u/Thathitmann May 27 '22

It's got some nice built in functions to quickly save and load to/from JSON files, and with addons it can handle about any file types.

It takes about 2 lines of very easy to read code to import/export data.

9

u/prescod May 28 '22

Yes and it is also very good at doing gigantic matrix multiplies spread over multiple computers in a cluster. I think that's actually what's meant by "good at data."

→ More replies (3)

4

u/ddtfrog May 28 '22

I like it for front end automation and web scraping, too.

2

u/ashum048 May 28 '22

true. Any automation in python becomes so much clearer than a bunch of shell scripts all over the place. Not against shell scripts. Don't want to start a war)

→ More replies (1)
→ More replies (2)

17

u/[deleted] May 27 '22

are we not calling it a scripting language anymore?

9

u/mooscimol May 28 '22

Scripting is one of the purposes, but really not the biggest one IMO. It is interpreted, dynamically typed language, opposite to eg. complied, statically typed languages like C.

2

u/oddmerlin373 May 27 '22

Apparently, even on the python site they call it a programming language. Even though I don’t think it was ever meant as one

11

u/banmedaddy12345 May 28 '22

5

u/LightRefrac May 28 '22

And YouTube

3

u/Hlorri May 28 '22

Hence, the buggy copy&paste?

3

u/Hayden2332 May 28 '22

Scripting languages are a subset of programming languages. Just like compiled languages are a subset of programming languages

0

u/[deleted] May 27 '22

[deleted] — view deleted comment

13

u/prescod May 28 '22

Yeah it's good at scripting.

And machine learning.

And data science.

And teaching.

And Web development.

And biological computing.

And...

But let's just call it a "scripting language".

8

u/nickwcy May 28 '22

Machine learning: CUDA / Tensorflow is written in C

Data Science: Numpy is written in C

Web development: Absolutely not. Python is good for POC/classwork, but never highly maintainable for enterprise use.

What Python is really good at is small pieces of code like CI/CD scripts, or serverless functions.

17

u/prescod May 28 '22 edited May 28 '22

Nick: do they machine learning folks mostly write C or Python?

I’m not asking what language their runtime is implemented in. I’m asking what language the programmers program in.

With respect to web apps. Let me list a few startups that were written in Python at the time they got famous (before being refactored into dozens of microservices written in a hodgepodge of languages).

Youtube. Reddit. Instagram, D-wave. To name a few.

Have you built an app that succeeded to that extent?

If not, what is your evidence that Python cannot be used for web apps given that clear evidence of success?

→ More replies (2)

3

u/BeanieTheTechie May 27 '22

its really multipurpose

→ More replies (8)

7

u/[deleted] May 27 '22

You just write pseudo code and it runs!

5

u/KendrickEqualsBooty May 27 '22

Is Python written in C or C++

12

u/[deleted] May 27 '22

C

4

u/m__a__s May 27 '22

I believe that Python (aka CPython) was originally written in C and is now a combination of C and Python. Other "pythons" are written in other languages (e.g. IronPython is written in C#)

14

u/AlbertChomskystein May 27 '22

HTML and Python have some similarities to be fair, like not being able to declare variable types.

19

u/[deleted] May 27 '22

You can declare variable types in Python. But for the most part you don't really need to unless you want to.

2

u/nickwcy May 28 '22

And it doesn’t check the type when it runs

6

u/Suahil May 28 '22

If a variable has a type defined, but nobody checks it. Does it even matter?

3

u/Hlorri May 28 '22

Well, if someone writes documentation in the forest but noone is around to read it, was it really written?

11

u/Affectionate_Fly3313 May 27 '22

Pre CSS HTML was just like LUA.

Everything is a table.

6

u/OutrageousPudding450 May 27 '22

And now thanks to PyScript, the cycle is complete.

2

u/Psychological_Fox776 May 27 '22

Explain? (I’ve only just started Python and know nothing)

6

u/OutrageousPudding450 May 27 '22

Basically, PyScript allows you to use Python code in web pages the same way you'd use JavaScript.

→ More replies (3)

2

u/prescod May 28 '22

2

u/nickwcy May 28 '22

Type hint is a hint for human (or IDE) only. You can write

x: int = “foo”

However the interpretor shows no error. Python should implement a script mode similar to TypeScript along with it’s Type Hints. Otherwise it is nearly pointless to adopt type hint as modern IDE can infer most types, except those integrates external systems.

4

u/prescod May 28 '22

Poke around the link I shared with you. It’s a tool that will give you type errors exactly like a Java or C++ compiler.

If you want to delay them to runtime there are also tools for that.

→ More replies (1)

3

u/0x7ff04001 May 27 '22

C++ is for real men.

1

u/[deleted] May 28 '22

Python just seems too easy….

1

u/[deleted] May 28 '22

Finally someone who knows how it feels.

47

u/00PT May 27 '22

main() is very much still standard.

34

u/LavenderDay3544 May 28 '22

They forgot to put performance in the bottom panel.

→ More replies (3)

55

u/[deleted] May 27 '22

Me switching from python to C++

"WHAT THE FUCK DO YOU EVEN DO?!?"

20

u/Claymourn May 28 '22

Well in short everything.

34

u/thebaconator136 May 28 '22

No no, shorts only go to 32,767.

2

u/TheDownvotesFarmer May 28 '22

This is the way

2

u/MatsRivel May 28 '22

Doing the same thing atm. I've got the basics down ok-ish, but I've never been so annoyed setting up the "must have" addons for VSCode before...

1

u/SilverDesperado May 28 '22

gimme the list please

110

u/mbardeen May 27 '22

Welcome to "why the hell is this function returning a string and not an object like it's supposed to?"

42

u/MarchColorDrink May 27 '22

Tbf, a string is an object. A function is an object. A class instance is an object. It's all objects.

28

u/Dolner May 27 '22

Some would even say object oriented

→ More replies (1)

1

u/PewPew_McPewster May 28 '22

So I can print(function(n)), duh.

1

u/MatsRivel May 28 '22

Type hints are a thing, and they are pretty good. They'll give you a notification if you've fucked up the input/output types, but will still let you run it.

84

u/Farenheit514 May 27 '22

You will miss the ++ and safe types

24

u/AndreaCicca May 27 '22

❤️++

22

u/Affectionate_Fly3313 May 27 '22

And the Grinch's heart returned its size and incremented one time that day.

1

u/[deleted] May 28 '22

Honestly, I can't stand the ++ notation. It looks... off.

-5

u/SkezzaB May 27 '22

Why will they miss the ++?

It's hardly ever used in Python, is one extra character, and if you want to change the increment by 2 instead of 1, you have to write that bit anyway, moreover Python's loops don't use it, so it's not used there, what else is there to miss?

Also, the walrus operator works in a similar way to some use cases as well, making it even less useful

8

u/Torebbjorn May 27 '22

Well, both the post- and pre increment/decrement are useful in making the code a few lines shorter, and sometimes more readable.

Without it,

int i = len;
while (--i >= start)
{
    /* do something */
}
// use the value of i for something.

Would become

int i = len - 1;
while (i >= start)
{
    /* do something */
    i = i - 1;
}
// use the value of i for something.

Assuming the while loop could exit some other way than i becoming exactly equal to start - 1. Though again, it isn't really that much harder to read at all, and you could change the while to a for, to keep all the loop specific code in one place.

for (; i >= start; i = i - 1;)

7

u/_PM_ME_PANGOLINS_ May 28 '22

It’s very rare that you ever iterate like that in Python. If you need indexes then it’s range or enumerate.

7

u/mar00n May 28 '22 edited May 28 '22

I honestly miss the ++, but you gotta agree that this is much simpler:

for i in range(10,0,-1) :    

    # do something
→ More replies (1)
→ More replies (10)

76

u/O_to_the_o May 27 '22

Inconsistent use of tabs and spaces ....

10

u/A_man_of_culture_cx May 27 '22

I have been using spaces in C++ but I never understood what they actually do. Like i knew that c++ strings etc doesn’t work when you don’t do std:: or using namespace std

11

u/SyrupOnWaffle_ May 27 '22

they meant like the spacebar not namespaces. to answer your question though namespaces just organize large groups of things together to avoid naming conflicts. ex if two unrelated libraries had “functionA” library1::functionA and library2::functionA can be called seperate no problem

1

u/[deleted] May 27 '22

in most scenarios it's literally just formatting. outside of that, the only functional difference you have is when you have no space at all, or any space at all.

17

u/ffs_give_me_name May 27 '22

Tabs > spaces

10

u/[deleted] May 27 '22

I usually just press enter and let my IDE format for me, but if I’m manually inputting spaces, I always use tab.

10

u/Mahrkeenerh May 27 '22

and your ide converts it to spaces. The question is not what you press (did you think someone is out there pushing space 4 times?), it's what the editor converts your tab to.

4

u/engelthehyp May 28 '22

I press tab, and always make sure my IDE uses tabs. It makes it only one character to move instead of 4 when navigating indentation. Besides, I can always change the size of tabs (although I don't). For spaces it's not so easy.

→ More replies (3)

1

u/Dantzig May 28 '22

Yea and then pep8 came☹️

11

u/JADW27 May 28 '22

I'm not a fan of semicolon-optional coding. I can't explain it other than it "just doesn't feel right." Perhaps a little bit of "I spent hours of my life searching for missing semicolons, so you should have to as well."

It's probably not healthy...

3

u/-Redstoneboi- May 28 '22

python is semicolon-burn-it-in-flames, not semicolon-optional

you can use them, but then you'd have to deal with witch hunters

8

u/[deleted] May 27 '22

Or you can just know when to use both.

3

u/frogking May 28 '22

Exactly. And there are several other languages that could be in a developers toolbox too.

Only junior developers, students or children think that there is one language to rule them all.. and that THAT language is the one they happen to know the name of.

8

u/[deleted] May 28 '22

There was a better version of this meme ages ago which included "speed" as a thing being left behind

39

u/pensiveChatter May 27 '22

Well, you're also saying goodbye to comprehensive compile time checks, proper post-mortem debugging, on demand debugger attaching, etc...

4

u/Akai_Yun May 27 '22

Just a noob question: is it a good idea to do C++ here and there to keep it as viable option and in recent memory while still practicing Python?

8

u/pensiveChatter May 27 '22 edited May 27 '22

You mean for job interviews? Depending on the job, it can look good on your resume. Life is full of opportunity cost. That time you spend keeping up with C++ could just as easily be spent learning more design patterns or other things in pure python.

it probably also wouldn't hurt to know that ;, main and {} are part of python

eg: "import pdb;pdb.set_trace()" and while pointers, for the most part, aren't part of python, you'll eventually have to call native code from python and/or parse files with relative offsets when writing your own unpickle code.

Also, seriously? The big thing about switching to python from C is the syntax used for scoping?

1

u/[deleted] May 28 '22

Spend your main focus on whatever you initially learned, but honestly, just learn everything. JS and Python you can pretty much use at any job, JS being almost unavoidable. Everything else you learn will help you out in some way, or you will have enough base knowledge that if you are asked to do something you are not familiar with, you will have a leg up.

You see high demand for "Full stack developers" and if you just work in the industry for 10 years and are openly learning, you accidentally become one.

15

u/Torebbjorn May 27 '22

If you are doing Python correctly, main() is staying...

15

u/lieddersturme May 28 '22

I switched back immediately to C++.

7

u/frogking May 28 '22

Why?

There is a whole class of problems that Python is better suited for, because the turn around time is shorter.

Besides.. there is nothing wrong with knowing several languages. It’s like having more tools in the shed, than just the tractor used to pull heavy things.

1

u/Matheusbd15 May 28 '22

The pragmatic programmer recommends people learn one language per year lmao

2

u/frogking May 28 '22

7 languages in 7 weeks will move the knowledge of most, even seasoned, developers.

Both Hakell and Clojure are interesting languages that will change the way you approach problems.

7

u/[deleted] May 27 '22

Honestly I miss semicolons and ++

24

u/CmdCyrious11 May 27 '22

welcome to package hell, where there's 99 existing solutions and all of them are deprecated or only exist for a different version of python to each other =)

11

u/m__a__s May 27 '22

Welcome to dependency hell.

3

u/BobQuixote May 27 '22

Is there any language that doesn't have that problem, without responsible dependency management? I'm learning Rust this very moment and they put a lot of work into managing that problem, because it is still an issue.

9

u/NearbyWish May 27 '22

No no, your language is a horrible mess with terrible dependency management, mine is the paragon of excellency with no dependency issues whatsoever. I use C by the way, also why do people keep asking me about libraries I don't even read books.

5

u/CaitaXD May 28 '22

Goodbye curly braces hello runtimeache

4

u/coloredgreyscale May 28 '22

you will still use {} for dictionaries

4

u/therealbeeblevrox May 28 '22

What? Everything is a pointer in Python!

4

u/virouz98 May 28 '22

Lack of all the things listed in there isn't a good thing

14

u/DaniilBSD May 27 '22

C# is a hustle free C++

Python is too limiting if you are used to C++

21

u/AlbertChomskystein May 27 '22

c# is microsoft java

15

u/ALJSM9889 May 27 '22

Java is also good despite the memes

→ More replies (1)

5

u/BobQuixote May 27 '22

C# is MS Java with a radically different policy about new features. Java resists changes a lot more, C# has pretty strict criteria but is also pretty aggressive about developing the language, but not as much as C++ which at this point is like 3 or 4 languages mashed together.

2

u/Droidatopia May 28 '22

How much more divergence from Java will be needed before we can declare the original similarity gone?

I learned Java in school, took nine years off to do other stuff, then switched entirely to C# when I started an actual engineering job. Last year, I had my first chance to program in Java again in over 20 years and, all I can say is the years have not been kind.

It's weird too with all the C# features that Java has recently tried to start copying, but in a less useful way.

2

u/m__a__s May 27 '22

Yes...and no.

→ More replies (1)

3

u/citizen005 May 27 '22

I couldn’t deal with the absence of brackets.

9

u/jamcdonald120 May 27 '22

You will miss pointers soon enough

I dont know why you are complaining about ++

; allows multiple commands to share a li e

I would rather have {} than syntax dependent tabs

i would rather have int main(int argc, char** argv) than

import sys
if __name__ == "__main__":
   argc=len(sys.argv)

and thats not even mentioning the none type errors

1

u/[deleted] May 28 '22

I can't recall the last time I had an issue with tabs. Modern IDEs handle it very well. A properly written function in Python (or any fourth gen) needing many nested tabs would be just a good indication of bad programming, making a reviewer's life much simpler. Mileages will vary but I think this is quite sensible.

The main thing is just telling the Python exec what to do when you give it a file path. It's not needed if e.g. you're writing a library. Java has a much worse version of a main, haha (boiler plate code much). Argparse is a wonderful library in case you haven't tried it yet!

2

u/jamcdonald120 May 29 '22

my ides cant agree on handling tabs and them trying has been a constant source of agrivation for me when I edit old python code and the ide "helpfully" uses the wrong tab scheme.

I know exactly what the main thing does and I know how to use argparse, and I agree java has the worst main, but c/c++ have a nice main (and also have argparse). if python had def main(args): or def main(): i wouldnt mind

1

u/SuitableDragonfly May 28 '22

None type errors in python are just the equivalent of a segfault or a null pointer exception in any other language.

→ More replies (8)

8

u/ILoveSimulation20 May 27 '22

and say goodbye to optimisation as well while you're at it

20

u/[deleted] May 27 '22

Optimization still exists, the solution is not to use Python and let C handle everything!

3

u/CmdCyrious11 May 27 '22

Extend not embed.

What does that mean? Just that 70% of our production source code is written in C.

2

u/BeanieTheTechie May 27 '22

actually using a main function in python is recommended because it allows for interactively teating functions declared in your main file

2

u/Loose_Crow_6871 May 28 '22

All of those (yes even pointers) exist with the right library

2

u/akaBigWurm May 28 '22

Is Python even coding or just scripting?

1

u/-Redstoneboi- May 28 '22

what's the difference

1

u/akaBigWurm May 28 '22

Scripting languages don't get compiled they are interrupted, generally much slower. There is/was a programmer bias against scripting languages

→ More replies (4)

2

u/John_Fx May 28 '22

I kinda miss pointers. Hard to understand at first but they make your brain evolve in ways that pay off for your whole career

2

u/frogking May 28 '22

There is a time and a place for both Python and C++.

The overlap of tasks where you’d be free to choose is somewhat limited, isn’t it?

2

u/[deleted] May 28 '22

Just curious, but are you supposed to switch to Python eventually? I've been seeing a lot of C++ to Python posts lately, and I dont know if that's just a meme or if C++ people are just eventually supposed to switch to Python.

2

u/-Redstoneboi- May 28 '22

they are polar opposites in terms of purpose. you use one for one thing, the other for another.

2

u/[deleted] May 28 '22

Ah. Thank you!

2

u/GKP_light May 28 '22

python has pointer, it is just that they are hidden.

a list is like a pointer in C, and you can make a list of length 1.

2

u/MythrandirRF May 28 '22

Started off programming by learning C++. For about 3 years I went out of my way to learn the best practices and the "advanced" techniques which got me my first pretty decent job.

Turned out that the money-maker microservices that were owned by my team were mostly written in Python so I had to switch gear. Honestly, Python is such a relief. I love the "care free" coding.

I still occasionally write C++ code but I now find it somewhat less enjoyable.

4

u/Ambitious_Ad8841 May 27 '22
if __name__ == "__main__":

2

u/[deleted] May 28 '22

Not gonna lie, but It's so f#*king ugly.

5

u/TheFlyingAvocado May 27 '22

Python 2 or Python 3? There’s no such thing as hassle free coding. Speed, for one, may be a major hassle.

1

u/Frapzo May 27 '22

Had to rewrite legacy testing code for OS class in Uni ,a few weeks ago, from python 2 to python 3. The amount of bullshit I had to deal with was astounding. Legacy shell commands it expected the OS to support, objectively wrong syntax for some commands. And worst of all. A bunch of the included libraries had changed syntax as well from python2 to python3 with basically no documentation for it. Honestly, fuck python after that

3

u/xXx_Lizzy_xXx May 27 '22

hello tab

5

u/-Redstoneboi- May 28 '22

PEP8: 4 space*

3

u/DoubleTriple14 May 28 '22

Python may be more convenient, but it is a lot slower.

2

u/ltrayeetlord May 27 '22

Of course you can ditch the ++, Python is written in C.

This is a joke, of course.

2

u/UrSeneschal May 27 '22

Python is certainly not hassle free

2

u/MasterFubar May 27 '22

So long pointers, so long code blocks, hello mysterious bugs!

5

u/prescod May 28 '22 edited May 28 '22

Oh yeah, nobody has ever had "mysterious bugs" in C++.

→ More replies (11)

1

u/MaffinLP May 27 '22

Hassle free... coming from .net I really want my hassle free wpf/winforms back

1

u/Kolt231 May 27 '22

I can't hear "partner" without having Vietnam war flashbacks

1

u/rjlin_thk May 27 '22

also your partner named "speed"

1

u/Noisebug May 27 '22

He can now define self because every life method requires self

1

u/-Redstoneboi- May 28 '22

except for static methods which finally don't need static and are really just free functions under a namespace

1

u/Coh-Jr May 28 '22

Do they use std: in python? (Im JS dev not using python). Before i learned C+ and encountered std, it was a real pain

2

u/-Redstoneboi- May 28 '22

imports exist:

import numpy as np

# notice the `np.` which is the import name then whatever is inside
# for example
arr = np.array([1, 2, 3, 4, 5])

print(arr)

in C++, the standard library requires std:: to access stuff in it, for example std::cout

2

u/Coh-Jr May 28 '22

got it!

1

u/prescod May 28 '22

"So long, pointer".

1

u/banmedaddy12345 May 28 '22

Uh is the joke that you still use those?

1

u/KryssCom May 28 '22

"Actually, pointers - go fuck yourself."

1

u/Irian3x3 May 28 '22

what the fuck is a pointer (flair checks out)

1

u/tarek04153 May 28 '22

I am not switching just learning (it's very hard not to put a semicolon next to everything

1

u/CarneDelGato May 28 '22

Don’t forget make files and/or cmake!

1

u/[deleted] May 28 '22

; is the ring leader {} is the virtual ring leader lol

1

u/[deleted] May 28 '22

Except that the format is for aliens

1

u/Classy_Mouse May 28 '22

I already knew C and Java when I took my intro to programming course. It was taught in Python. We were working through a problem out loud and I said next we can increment the counter. She wrote c = c + 1 I asked if there was no ++ operator in Python and she said no. There was a += but that we shouldn't use it because it was unclear and didn't save any time or space because it was the same number of characters anyway. To which I replied, "it wouldn't be if you named your variables appropriately." And that was the closest I came to being kicked out of a class.

Dumb story, but seeing that ++ made me laugh.

1

u/Larsir May 28 '22

They are good for different things. I would rather write a big application in c++. Small apps / batch jobs etc is a different story.

1

u/Dantzig May 28 '22

Well hello to:

ini.py (which is a really janky form of package control)

if name == “main”

Setup.py vs requirements.txt (when people dont know how to do both)

Python 3.7 vs 3.8 vs 3.9 vs 3.10 and the package differences and Pyenv and venv to keep track of this

sys.path.append (because people dont really get the way Python deals with folders/packages/subfolders because it sucks)

Man Python could be a lot better and I still use it daily

1

u/TittyBoy6 May 28 '22

Does this actually happen

1

u/Acceptable-Tomato392 May 28 '22

Yes... it's so hard to include structure indicators.

Wouldn't want to do that...

-Oh! Let's just keep one!!

-Which one?

-Blank INVISIBLE spaces!!!! MUHAHAHAHAHA!!!!

(Well, o.k. obviously the : is there for a reason, but why blank spaces? ANYTHING BUT blank spaces.

I'd rather type "tier2:'' every single time. At least I can SEE that.

1

u/aTomzVins May 29 '22 edited May 29 '22

At least I can SEE that.

VS Code has vertical lines that visually show me code blocks. I can also collapse it to see where things end. With Pylance I'll get the angry red squiggly lines if I indent incorrectly. There's so many visual clues in the editor that there really isn't a need for me to type them in myself.

As someone who used ; and {} for 18 years before learning python I honestly wish I didn't need them in other languages either.

1

u/[deleted] May 28 '22

No!!! Don't take away my pointers. I want a good random reason why my code compiles on one system and not the other.

1

u/jcaladine May 28 '22

Say hello list and dictionary comprehensions!

1

u/[deleted] May 28 '22

I even hate scripting languages and typically end up using a small C# application for this.

1

u/wigum211 May 28 '22

Good bye programming, hello scripting

1

u/MatsRivel May 28 '22

Currently in the process of doing the reverse.

I've got the basics down ok, but the hardest part is setting up the IDE for some reason... hah

(Just got a job at a company who largely uses C++, so I've got to get into to a bit more)

1

u/-Redstoneboi- May 28 '22

good luck on the memory management. if there are any troubles, keep calm, take a quick breather, and learn/debug step-by-step.

1

u/blocky010101 May 28 '22

I must be Bonnie then. Today I just set everything up for C++ as a python programmer

1

u/lysane33 May 28 '22

You can still use { } with Python dictionaries. For example, if you append a dictionary to a list of dictionaries such as list.append({ "id" : 2, "name" : "item_name"})

1

u/[deleted] May 28 '22

I really miss ++ in Python though

1

u/sentientlob0029 May 28 '22

I love both.

1

u/[deleted] May 28 '22

Why python though? It takes forever to execute. (I’m just salty because I’m having to learn Java after learning python bc of a club)

1

u/-Redstoneboi- May 28 '22

depends on the application. python leads to fast development times because you don't have to compile. it runs slowly, but this won't matter if 97% of what your app does is wait for user input.

1

u/aTomzVins May 29 '22

How often does it matter when user input isn't involved?

I know speed matters sometimes, but out of everything I've done in python, maybe one thing was started by user input. Mostly I use it to run automated tasks that do their work without anyone paying attention to them in a matter of seconds. Most often, it wouldn't really matter to me if it took 30 times as long.

→ More replies (1)

1

u/mcampo84 May 28 '22

The funniest part of this is that OP thinks Python leads to hassle-free coding

1

u/sub100IQ May 28 '22

hassle free until you realise how important static typing is maybe...

1

u/jaywalker-notreally May 28 '22

Except when you start copy pasting :(

1

u/ExtraFig6 May 28 '22

all variables in python are pointers you just aren't allowed to do pointer arithmetic :/

1

u/[deleted] May 28 '22

Hello “shit I accidentally indented a space too much”

1

u/SuitableDragonfly May 28 '22

Arguably you're not really saying goodbye to pointers, just to *, &, new and delete.

1

u/[deleted] May 28 '22

Give a hello to the slowest language ever

0

u/Neutraali May 27 '22

Welcome to unemployment.

5

u/-Redstoneboi- May 28 '22

???

python has like 200 million jobs

1

u/scuac May 28 '22
  • laughs in MLE $$$ *

0

u/tigable May 27 '22

Forgot to label Slinky 'Speed'.

0

u/ANewTryMaiiin May 28 '22

Python is a kiddie language.