From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262661AbVGHNeZ (ORCPT ); Fri, 8 Jul 2005 09:34:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262659AbVGHNeY (ORCPT ); Fri, 8 Jul 2005 09:34:24 -0400 Received: from scrub.xs4all.nl ([194.109.195.176]:26547 "EHLO scrub.xs4all.nl") by vger.kernel.org with ESMTP id S262654AbVGHNeW (ORCPT ); Fri, 8 Jul 2005 09:34:22 -0400 Date: Fri, 8 Jul 2005 15:34:15 +0200 (CEST) From: Roman Zippel X-X-Sender: roman@scrub.home To: Pekka J Enberg cc: Ram , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Alexander Viro , Andrew Morton , mike@waychison.com, bfields@fieldses.org, Miklos Szeredi Subject: Re: share/private/slave a subtree In-Reply-To: Message-ID: References: <1120816072.30164.10.camel@localhost> <1120816229.30164.13.camel@localhost> <1120817463.30164.43.camel@localhost> <84144f0205070804171d7c9726@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Fri, 8 Jul 2005, Pekka J Enberg wrote: > > You can't do that with defines? > > Sure you can but have you ever tried to figure out where a group of #define > enumerations end? Comments? Newlines? > Enums are a natural language construct for grouping related > constants so why not use it? So are defines. > Bottom line, there are few advantages to using enums rather than #defines > which is why they are IMHO preferred for new code. Are the advantages big enough to actively discourage defines? It's nice that you do reviews, but please leave some room for personal preferences. If the code is correct and perfectly readable, it doesn't matter whether to use defines or enums. Unless you also intent to also debug and work with that code, why don't leave the decision to the author? bye, Roman