Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2003:
[Freeciv-Dev] Re: Python?
Home

[Freeciv-Dev] Re: Python?

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Cc: Freeciv-Dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Python?
From: Jason Dorje Short <jshort@xxxxxxxxxxxxxx>
Date: Sat, 29 Nov 2003 19:00:09 -0500
Reply-to: jdorje@xxxxxxxxxxxx

Brandon J. Van Every wrote:

There are 2 kinds of C developers:
- those that don't know OO methodologies
- those that do, but are using C on a particular legacy project

It is easy to follow OO methodologies in C; in fact most gravitate toward this normally. We do this in Freeciv: just look at map_get_tile (although we don't hide the map struct like we should). C doesn't support advanced OO features like polymorphism or inheritance - I don't miss these much.

What I do miss from C are features of functional languages. What I miss most often is tuples [1]. Less often I will miss more complex features. Of course, Python has many of these features.

[1] Compare:
      {
        int nat_x, nat_y;
        map_to_native_pos(&nat_x, &nat_y, map_x, map_y);
        return native_pos_to_index(nat_x, nat_y);
      }
    to
      {
        return native_pos_to_index(map_to_native_pos(map_x, map_y));
      }

jason



[Prev in Thread] Current Thread [Next in Thread]