Okay, real talk C# people. I love your language, but I can’t stand your library support. Why do you call vectors Lists? Why is there no O(1) remove from end for them?
-
Näytä tämä ketju
-
Tämä twiitti ei ole saatavilla.
-
Vastauksena käyttäjälle @MikeNicolella
Arrays are fixed size. Vector (resizeable random-access ordered container) has been around in terminology since at least Lisp.
1 vastaus 0 uudelleentwiittausta 1 tykkäys -
Vastauksena käyttäjille @kurtismcc ja @MikeNicolella
Despite its precedent, I can’t reasonably call them vectors, because vector is a math construct. In my own libraries, I call them Arrays (and FixedArray). This conforms well with other containers that have Fixed* variations.
0 vastausta 0 uudelleentwiittausta 0 tykkäystä -
Tämä twiitti ei ole saatavilla.
-
Vastauksena käyttäjille @MikeNicolella ja @kurtismcc
Yeah. In fact, it makes more sense for a vector to be a fixed size, not array.
1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
Vastauksena käyttäjille @tloch14 ja @MikeNicolella
This is why computer programming is hard. We can’t even agree on what to name things. ;-)
1 vastaus 0 uudelleentwiittausta 1 tykkäys -
Vastauksena käyttäjille @kurtismcc ja @MikeNicolella
I mean I'd be happy to accept "vector" as the term for a dynamically allocated array, except I can't find a good reason to. Best I can tell, back in the day vectors and arrays were synonymous because math vectors were implemented as a small array.
1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
I think names are important, as a well defined vocabulary allows for better communication among coworkers. Esp in game dev, when I say vector, I don't want you to mistake that for a dynamic array when I mean a math vector, or visa-versa.
1 vastaus 0 uudelleentwiittausta 1 tykkäys
Side tangent -- this is a big deal for teams too. Probably the worst habit game devs have is using the term "Engine" and "System". They're basically meaningless. Well defined terms save time, money, and (most valuably) headaches.
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.