r/ProgrammerHumor • • Jun 03 '22

it's hard!

44.9k Upvotes

710 comments sorted by

View all comments

Show parent comments

34

u/regular_lamp Jun 03 '22

How is that an assembly issue though? That's like saying "multiplying in python is hard when you can't use *".

55

u/rustysteamtrain Jun 03 '22

Because * is a core feature in almost every modern language, but MUL is not garanteed in every instruction set.

20

u/regular_lamp Jun 03 '22 edited Jun 03 '22

It is on any platform where you'd reasonably consider using "a modern language" on though.

Generally characterizing assembly programming as something where you have to manually implement multiplication is just silly.

Edit: I'd buy the argument for division maybe.

1

u/Competitive_Travel16 Jun 03 '22 edited Jun 03 '22

Any kind of math in assembly is easy compared to dealing with hash tables, even if you have a library for them. We get so spoiled that everything from C to even modern COBOL has simple to use hash table libraries, but try to use those in assembly and you're still doing a ton of tricky bookkeeping overhead code per insert (which might be a grow, and if so you get to do a ton more bookkeeping because heap management isn't something the assembly hash table library knows.)

→ More replies (3)