Re: __func__ not declared for kernel build (5.0-CURRENT)

2000-04-23 Thread Marty Leisner





Assar Westerlund <[EMAIL PROTECTED]> writes  on 24 Apr 2000 02:43:28 +0200
 > Matthew Dillon <[EMAIL PROTECTED]> writes:
 > > obviously missing __FUNCTION__ was added by GCC many years ago, 
but it was
 > > a while before it's use in defines in header (.h) files was dealt 
with
 > > properly.
 > 
 > You mean outside a function?  What's the proper way of dealing with 
that?
 > 
 > > I wish these stupid standards committees would just choose
 > > something that people are already using rather then make up new 
names!
 > 
 > The problem is that __func__ and __FUNCTION__ are not the same thing.
 > And thus it makes sense for them not the use same name.
 > 

What's different about them?

__func__ was defined in aztec C nearly two decades ago...I really looked
the appearance of a __func__ pseudomacro -- it made lots of stuff much easier
to understand (as opposed to __FILE__/__LINE__) -- but __func__ had to
be handled by the translater, not the preprocessor...


 > /assar
 > 
 > 
 > To Unsubscribe: send mail to [EMAIL PROTECTED]
 > with "unsubscribe freebsd-current" in the body of the message




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: btokup().. patch to STYLE(9) (fwd)

1999-01-31 Thread Marty Leisner
> 
> 
> On Fri, 29 Jan 1999 00:55:21 EST, Mikhail Teterin wrote:
> 
> > Everybody's goal is to keep/make code readable (accusations of "trying
> > to obfuscate" are silly). You, people, are just not agreeing what
> > "readable" means. Hoping to aid in the ending of this thread(s),
> 
> Thank you very much. This is _exactly_ the point here.
> 
> As far as I see it, there are a lot of people who are saying
> 
> "I want to use parens to improve readability"
> 
> when what they really mean is
> 
> "I want to use parens to obviate the need to learn operator precedence."
> 
> I can't imagine how unnecessary parens are going to improve
> "readability" for anyone who knows his/her operator precedence. What
> it does is allow folks who aren't sure about what they're doing to get
> around doing things properly.
> 
> Ciao,
> Sheldon.
> 

If you use paranthesis, you don't have to memorize the operator precedence.

People are not compilers, unnecessary parenthesis/braces is usally a good
idea where there could be some confusion.

In our work place we have a policy of extra braces around single line
ifs...the idea is people often add lines in maintaince, and forget to
add the braces...I think its a good argument for maintability...


Marty Leisner





To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message