Earlier quoted context omitted.
Hmm. Check this out: http://en.wikipedia.org/wiki/Type_inference Type checking is a little different, and refers to some safety measures done at compile time that theoretically guard against certain types of errors. Scripting languages don't do them, and don't miss out on much programming correctness as far as I can tell. Full run time type inference in C++ is about having a container of something -- let's say void p…
I replied to you above, but I'll reply to your specific example here. Your example is really not how PL people talk about type inference. However, you're right that you wouldn't call this example type-checking either... it would probably be a fuzzier term such as "reflection" or "introspection". But certainly not type inference. Do you understand what the wikipedia article you linked is about? Because it's NOT about…
Ask HN: If C++ is so bad, what should game developers use?
111–120 of 127 posts
Re: Ask HN: If C++ is so bad, what should game developers use?
#112Earlier quoted context omitted.
Hmm. Check this out: http://en.wikipedia.org/wiki/Type_inference Type checking is a little different, and refers to some safety measures done at compile time that theoretically guard against certain types of errors. Scripting languages don't do them, and don't miss out on much programming correctness as far as I can tell. Full run time type inference in C++ is about having a container of something -- let's say void p…
The I in RTTI stands for "identification", not "inference". Stop saying "runtime type inference".
Re: Ask HN: If C++ is so bad, what should game developers use?
#113Earlier quoted context omitted.
Fraq was made in 2005 and it looks worse than quake 3, wich was made 6 years early (addmitedly by a big studio instead of jut one person, but the point still stands). It is possible to make games in Haskell, but it's closer to a theorical exercise than it is to an aproach to proffesional game-making.
addmitedly by a big studio instead of jut one person, but the point still stands The point doesn't really stand, no. A big studio making a game over a long time period will obviously do a much better job than an undergraduate writing his thesis (yes, Frag was an undergrad thesis project). To be fair, I think there are legitimate difficulties making games in Haskell, primarily related to the predictability of performa…
Re: Ask HN: If C++ is so bad, what should game developers use?
#114Earlier quoted context omitted.
But the game engine is not. It doesn't use LUA to push polygons.
That is correct, but the game does use it for a lot more than just scripting. ps: Lua, not LUA -- it's the Portuguese word for moon, not an acronym :)
Re: Ask HN: If C++ is so bad, what should game developers use?
#115The main downfall of C++ is probably that it's too flexible in every direction. It takes an equivalent amount of effort to do the "right" thing as to do the "wrong" thing. In a sense, the language makes no value judgments regarding design. Which is helpful in some ways because it doesn't lock you into the straight-jacket that Java does, for example, but it doesn't encourage users to fall into a "pit of success" either (which a truly good language should, even if it is ultimately flexible enough to let you do those "wrong" things).
Re: Ask HN: If C++ is so bad, what should game developers use?
#116Contrary to popular belief. Java is actually pretty good.
Re: Ask HN: If C++ is so bad, what should game developers use?
#117Earlier quoted context omitted.
Unwillingness or inability to shift between development tools where appropriate is also something I've noticed characterises less experienced programmers (often evangelism can be driven by this). Using your example languages. I can think of situations where using C++ rather than Ruby would be idiotic, and likewise situations where the reverse is true.
Unwillingness due to what, though? Because, from what I've seen, a lot of people can be very excellent programmers in one language, but be unable to learn to program in another. Actually, I don't think it's really "less experienced programmers". Several of my computer science peers (I'm 23) -- inexperienced as professionals, but very smart -- will try the same problem in four or five languages, just to learn the lang…
Inexperience doesn't mean a person isn't smart, or that they aren't good or that they aren't clever. All it means is that they haven't developed a significant body of familiarity with something.
So, your peers are learning several languages -- maybe superficially, maybe not -- but they aren't yet developing the familiarity with one or a couple of languages that allows them to feel comfortable mentally solving any given problem in the language they're most familiar with. Thus, you have "Ruby" problems, "Python" problems, "C++" problems, and so on.
Those older'n-dirt programmers on the other hand have already solved a huge number of problems in C++. That doesn't mean they're a better programmer, but it does mean they're more experienced. So, if you ask them if they could write X or Y or Z, they'll say sure -- and in their head, they're probably already gathering the familiar pieces that they would need to solve it.
Or, to put it another way: if you went to pg and asked him to write software to run a forum like this, he would probably choose to do it in Lisp, and that would be a good choice for him. If you asked me, I would do it in PHP. If you asked DHH, he would do it in Ruby (on Rails).
None of those are wrong.
The only wrong choices would be me coding in Lisp.
That would be horrifying.
Re: Ask HN: If C++ is so bad, what should game developers use?
#118Earlier quoted context omitted.
Isn't that C++? (I'm not very learned, here, I'm really asking about this for a friend).
It is C++. Note that this perfectly reasonable individual choice tend to ensnare us all in a local maximum. One route out of this local maximum could be CPUs optimized for garbage collection and a high rate of function call. I doubt we will see that any-time soon, though.
Re: Ask HN: If C++ is so bad, what should game developers use?
#119Earlier quoted context omitted.
Lua is often used as an embedded scripting language within level editors, for example to keep track of the progress made on a quest or to trigger an event when the character reaches a certain point. Lua isn't used to code the game engine itself (in the vast majority of cases, there may be some obscure examples of game engines written in Lua)
You need some LÖVE! http://libregamewiki.org/LOVE "LÖVE is a cross-platform, 2D game engine. The latest version of the engine is 0.5.0 released on September 9th, 2008.[1] It uses the SDL library, OpenGL hardware acceleration and the Lua programming language to program games.[2] It is licensed under the Zlib license. "
Re: Ask HN: If C++ is so bad, what should game developers use?
#120Earlier quoted context omitted.
I replied to you above, but I'll reply to your specific example here. Your example is really not how PL people talk about type inference. However, you're right that you wouldn't call this example type-checking either... it would probably be a fuzzier term such as "reflection" or "introspection". But certainly not type inference. Do you understand what the wikipedia article you linked is about? Because it's NOT about…
Sorry, but people use the term this way: http://www.google.com/search?hl=en&client=firefox-a&...
Note that this term isn't very widely used: we are already in second position at your link.
So, unlike ML-style compile-time type inference, runtime type inference is implementation specific. Your earlier statement "Scripting languages have run-time type-inference built in everywhere" is actually ill-typed. However, if you had said "checking" instead of "inference", your sentence would have been correct.
Hence my "Err, by "runtime type inference", you actually mean runtime type checking, right?"