[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] squeezing a little fun out of java ... meh



On Tue, Jan 3, 2012 at 10:18 PM, Jan Pobrislo <ccx@xxxxxxxxxxxxxx> wrote:
> When it comes to C/C++ it's bit trickier. The way C++ implements virtual
> methods and classes in general inspired quite amount of hate for it and I hear
> that even Objective-C that does the type resolution in runtime is often
> faster than C++ that does that compile-time.
>
> By the way, if you are C++ programmer and haven't yet read Frequently
> Questioned Answers, I suggest you find time to at least skim through it.

Taking a look now, thanks for the pointer.

>> I mean we could make cholices as we code as to what to use.
>> > When it was better to use a strongly typed methodolgy we could
>> > refactor our code. We could use the feature as needed, and continue
>> > with duck typing for normal python ness.
>
> The thing I dislike on the Java-style classful/interface based type checking
> everyone seems to implement is it promotes complicated interfaces and
> overengineered OO infrastructure.

Hallelujah. This is the hell I'm in now. For example check out this
documentation of a 'simple' thing to do:

------
http://libgdx.l33tlabs.org/docs/api/com/badlogic/gdx/scenes/scene2d/Actor.html

The projection and transform matrices are setup so that an Actor can
simply call the SpriteBatch.draw(com.badlogic.gdx.graphics.Texture,
float, float, float, float, float, float, float, float, float, int,
int, int, int, boolean, boolean) method to render himself.
------

maybe that's just what it takes in this framework, but that is HELL of
a lot of arguments when you're just trying to put a picture on a
screen. The first time I read it I was like, 'wow... that's a lot of
s**t for what is basically a BLIT'.