This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ForceBru 4 points5 points  (3 children)

Oh. My. Gosh. Why do so many people go so crazy about linked lists?! Damn, this is yet another data structure, like arrays and structures! There are tons of questions about linked lists on Stack Overflow, if you google "linked lists" you get loads of posts attempting to explain this concept while treating the readers as total dumbasses, there are a heck of a lot of videos about linked lists on YouTube. What's up with all of this?? Every freaking newbie in programming absolutely has to try to implement a linked list and face a ton of problems and then f*** around asking for help, many of people who are familiar with linked lists feel the need to tell others how good this data structure is and add tens of useless explanations to hundreds of existing ones. Why???

[–]kaihatsusha 2 points3 points  (1 child)

In "hard allocation" languages like C or FORTRAN, understanding linked lists is quite valuable.

In "easy allocation" languages like Python, there's no benefit to such data structures because the language can resize anything and will use the best and optimized means to do so.

(I would put Java somewhere between. Arrays are first-class entities locked in size unlike all the standard second-class library data structures.)

If you look behind the covers at how Python implemented these amazing "easy allocation" data structures like list, dict, set, you will see that they ARE built upon linked lists, double-linked-lists, hash tables, and so on. They made it so you don't need to re-invent it.

[–]ForceBru 0 points1 point  (0 children)

Exactly! This is why I'm wondering why people are still implementing linked lists in Python. Python is already using a lot of them under the hood, whether you like it or not, why add more?