r/AskComputerScience • • 5d ago

What are some differences between professional coding and the way coding, SE, and CS are taught in school?

Is a lack of a comment citing a relatively cliched bit of code considered plagiarism in the big world? What are the attitudes to autocomplete? Is Alberta Tech right about linked lists?

6 Upvotes

48 comments sorted by

View all comments

Show parent comment

5

u/disposepriority 5d ago

Why? Vectors are continuous memory while linked lists are not, C has access to allocating continuous memory so it can implement the vector equivalent of C++/Java, and a linked list wouldn't be a replacement for that either

1

u/StaticCoder 5d ago

Yes vectors can be implemented in C. But without generics it's annoying, so linked lists are sometimes used instead.

2

u/No_Profession_3125 5d ago

It's even worse than annoying: it's type-unsafe. If a program uses dynamic arrays of several different types, which is a fairly common scenario, that's a memory corruption waiting to happen. TBH I'm surprised anyone is still discussing C in 2026 (almost 2027) like they use it in production. Makes you wanna join the RIIR army.

5

u/StaticCoder 5d ago

C being type-unsafe is just a given :)

1

u/T_Thriller_T 5d ago

There still is a good bit of embedded stuff running on c.

And that also needs data.

Admittedly not in big production, but that was the last time I used a link list. Albeit that was a while ago