[Freeciv-Dev] Re: PATCH change_specialist
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Tue, 18 Dec 2001, Raimar Falke wrote:
> If you move C code to Java you have to make also other transformations
> (like replacing strcpy, or the iterate macros). So this boolean
> problem is your smallest problem.
well, but it's one less and makes the code more appealing for Java coders.
> Exactly. And this is the problem.
> boolean a;
> int b = a;
> will not create an error (like java would). So the compiler can't use
> the extra information.
Ok. That's due to the lack of weak typing in C. I just did it that time to
see the response, and if you agree I'd be happy to replace int with
boolean everywhere. I'm convinced it will help readability. To lessen the
chance of assining a boolean to an int, we could use something like a
hungarian notation like bHasChanged instead of has_changed or say that has
and is are also boolean prefixes. See my next email on this.
--
Gregor Zeitlinger
gregor@xxxxxxxxxxxxx
- [Freeciv-Dev] PATCH change_specialist, Gregor Zeitlinger, 2001/12/16
- [Freeciv-Dev] Re: PATCH change_specialist, Raimar Falke, 2001/12/17
- [Freeciv-Dev] Re: PATCH change_specialist, Gregor Zeitlinger, 2001/12/17
- [Freeciv-Dev] Re: PATCH change_specialist, Raimar Falke, 2001/12/17
- [Freeciv-Dev] Re: PATCH change_specialist, Gregor Zeitlinger, 2001/12/17
- [Freeciv-Dev] Re: PATCH change_specialist, Stewart Adcock, 2001/12/17
- [Freeciv-Dev] Re: PATCH change_specialist, Adam Olsen, 2001/12/17
- [Freeciv-Dev] Re: PATCH change_specialist, Gregor Zeitlinger, 2001/12/17
- [Freeciv-Dev] Re: PATCH change_specialist, Stewart Adcock, 2001/12/17
- [Freeciv-Dev] Re: PATCH change_specialist, Raimar Falke, 2001/12/18
- [Freeciv-Dev] Re: PATCH change_specialist,
Gregor Zeitlinger <=
- [Freeciv-Dev] Re: PATCH change_specialist, Raimar Falke, 2001/12/18
- [Freeciv-Dev] Re: PATCH change_specialist, Reinier Post, 2001/12/17
|
|