Re:Initialization in C++ is Seriously Bonkers
by MikeLui on Saturday January 05, 2019 @11:48PM
(#18836636)
Funny you mention that: the data structures course I took let us use any language we wanted. I chose python because I thought “hey python’s easier than C!” So I started making some tree implementation from scratch, and I kept having problems because I didn’t understand Python’s name binding system at the time, because I had no mental model of pointers or references or objects really. (Of course it was a shallowcopy/deepcopy issue). The next assignment I did in C and it was much more natural. Only later did I realize how meta and absurd it was to build custom dictionaries out of python primitives.
Re:Initialization in C++ is Seriously Bonkers
by MichaelMoser123 on Sunday January 06, 2019 @12:26AM
(#18836721)
a dictionary in python where everything is a dictionary. That's what undergraduate courses are made for!
This could happen for example if the data structure course was in python or java and later courses are in C.
Also you can do the darn list in many ways: single linked list, double, ring, with counter/without counter. All very important in this day and age when you should know to avoid them altogether because linked lists fucks up cache behavior.