From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roman Zippel Subject: Re: share/private/slave a subtree - define vs enum Date: Fri, 8 Jul 2005 18:57:29 +0200 (CEST) Message-ID: References: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Andrew Morton , bfields@fieldses.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linuxram@us.ibm.com, mike@waychison.com, Miklos Szeredi , Pekka J Enberg , Alexander Viro Return-path: Received: from scrub.xs4all.nl ([194.109.195.176]:6836 "EHLO scrub.xs4all.nl") by vger.kernel.org with ESMTP id S262719AbVGHQ5v (ORCPT ); Fri, 8 Jul 2005 12:57:51 -0400 To: Bryan Henderson In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Hi, On Fri, 8 Jul 2005, Bryan Henderson wrote: > I wasn't aware anyone preferred defines to enums for declaring enumerated > data types. If it's really enumerated data types, that's fine, but this example was about bitfield masks. > Isn't the only argument for defines, "that's what I'm used to."? defines are not just used for constants and there is _nothing_ wrong with using defines for constants. > The macro language is one the most hated parts of the C language; it makes > sense to try to avoid it as a general rule. Nevertheless it's part of the language, it's used all over the kernel and suddenly starting to mix different types of definitions, makes things only worse. I prefer consistency here over any minor advantages enums might have. bye, Roman