Re: [AD] Function parameter ordering conventions

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Position - Geometry - Colour	(primitive)
Position - Color		{pixel)
Bitmap   - Position - Mode	(bitmap)

This distinction is arbitrary - why should a bitmap follow a different
convention from a colour?

Why should they follow the same semantics? A bitmap is a completely different thing from a colour.

Does handling distinct 'objects' (bitmaps,
colours, whatnot) differently convey some significant advantage to the
developer or the user?

See, to my mind, a colour is not an object as such. It's an attribute.

I think the second is the easiest to use: you can automatically type in x, y and the object/mode, whereas in the first you have to make a conscious
distinction between colours and bitmaps (muscle memory fails!).

As I said, they're completely different types of things. To me, saying that they should be treated the same sounds like over designed forced object oriented programming. Object oriented is good, but it shouldn't be overdone. Treating colours on the same footing as bitmaps is overdoing it.

What is the advantage of the first proposal over the second or third?

Consistency with how everyone else seems to be doing it?

Evert





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/