strange? pointer error

Started by
20 comments, last by AbsolutDew 21 years, 11 months ago
quote:Original post by a person
i will repeat again. this is for *GAME* development. i have seen very few games of top quality in python, ruby, java, etc. that did not use some for of dynamic objects and referencing. please show me a few top quality games written in those languages that does not dynamically allocate memory, manage some memory, and strictly uses only auto garbage collection of the lanaguage.

Why don't you show me the newbie who expects to write a top-quality game requiring advanced programming techniques? If you agree that newbies don't target top-quality games, then maybe you also agree that newbies don't want or need all the features required in writing a top-quality game. Therefore, they can concentrate on the features that make them more productive - i.e. STL collections, handle classes such as smart pointers, etc.

IMO using the STL to not have to understand (or otherwise worry about) low-level details is exactly the right thing for a newbie to do. Attempt to understand pointer manipulation and memory management once you reach the limitations of the standard library techniques. If someone doesn't learn the common idioms of the language, they will be forever condemned to liberally sprinkle pointers and memory management code throughout their programs, never understanding what an abomination they are creating. As I said, the less places I have that sort of thing in my code, the happier I am.
quote:
i have done some java, and it has the concpets of pointers.

Yes, but it doesn't have a pointer primitive. Pointer management is done "under the hood".
quote:
while i have not used python, i have looked it over and many times its soley used as a scripting engine for use within a c++ based app. basically creating plugins and the sort. not for hardcore graphics that reuire speed.

Which newbies almost *never* need.

[ C++ FAQ Lite | ACCU | Boost | Python | Agile Manifesto! ]

[edited by - SabreMan on May 3, 2002 4:52:47 AM]
Advertisement
quote:i have done some java, and it has the concpets of pointers.

It doesn''t just have the "concept" of pointers -- they''re everywhere. Any and every object is created as a pointer to an object on the garbage-collected heap. There are no stack or value-type objects. You either have a primitive or you have a pointer. That''s all Java knows about. Use of pointers, in conjunction with Java''s strict pass-by-value, is why you can''t write a generic ''swap'' function in Java.

char a[99999],*p=a;int main(int c,char**V){char*v=c>0?1[V]:(char*)V;if(c>=0)for(;*v&&93!=*v;){62==*v&&++p||60==*v&&--p||43==*v&&++*p||45==*v&&--*p||44==*v&&(*p=getchar())||46==*v&&putchar(*p)||91==*v&&(*p&&main(0,(char**)(--v+2))||(v=(char*)main(-1,(char**)++v)-1));++v;}else for(c=1;c;c+=(91==*v)-(93==*v),++v);return(int)v;}  /*** drpizza@battleaxe.net ***/

This topic is closed to new replies.

Advertisement