[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Check for redundancy
From: |
Emanuel Berg |
Subject: |
Re: Check for redundancy |
Date: |
Sun, 28 Jun 2015 01:02:21 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
<tomas@tuxteam.de> writes:
> AFAIR (yes, I'm an old fart) Hungarian notation was
> introduced at Microsoft (by Charles Simonyi, no
> less) because their C compiler was abysmal at
> type checking.
There is some material on it in this book:
@book{programmers-at-work,
title = {Programmers at Work},
author = {Susan Lammers},
publisher = {Tempus Books},
year = 1989,
ISBN = 1556152116
}
> Yes, the API sucked too. Possibly it still sucks
> (since times Windows 3.1 I haven't had to look at
> it, thanfully)
Yeah, I suspect it is (was) there for some reason.
It has to be real bad for it to help tho :) Here is
the Wikipedia article [1] - especially read the
"Notable opinions" section!
The best one:
* Linus Torvalds:
Encoding the type of a function into the name
(so-called Hungarian notation) is brain
damaged — the compiler knows the types anyway
and can check those, and it only confuses
the programmer.
The second-best one:
* Bjarne Stroustrup:
... I don't recommend 'Hungarian'. I regard
'Hungarian' (embedding an abbreviated version
of a type in a variable name) a technique that
can be useful in untyped languages, but is
completely unsuitable for a language that
supports generic programming and
object-oriented programming — both of which
emphasize selection of operations based on the
type and arguments (known to the language or
to the run-time support). In this case,
'building the type of an object into names'
simply complicates and minimizes abstraction.
[1] https://en.wikipedia.org/wiki/Hungarian_notation
--
underground experts united
http://user.it.uu.se/~embe8573
- Re: Check for redundancy, (continued)
- Re: Check for redundancy, Andreas Röhler, 2015/06/24
- Message not available
- Re: Check for redundancy, Stefan Monnier, 2015/06/24
- Re: Check for redundancy, tomas, 2015/06/24
- Re: Check for redundancy, Stefan Monnier, 2015/06/24
- Re: Check for redundancy, tomas, 2015/06/25
- Re: Check for redundancy, Emanuel Berg, 2015/06/26
- Re: Check for redundancy, Marcin Borkowski, 2015/06/26
- Re: Check for redundancy, Emanuel Berg, 2015/06/26
- Re: Check for redundancy, Robert Thorpe, 2015/06/27
- Re: Check for redundancy, tomas, 2015/06/27
- Re: Check for redundancy,
Emanuel Berg <=
- Re: Check for redundancy, tomas, 2015/06/28
- Re: Check for redundancy, Emanuel Berg, 2015/06/28
- Re: Check for redundancy, Yuri Khan, 2015/06/28
- Re: Check for redundancy, Emanuel Berg, 2015/06/28
- Re: Check for redundancy, Robert Thorpe, 2015/06/28
- Re: Check for redundancy, Emanuel Berg, 2015/06/28
- Re: Check for redundancy, Emanuel Berg, 2015/06/24
- Re: Check for redundancy, Óscar Fuentes, 2015/06/24
- Re: Check for redundancy, Emanuel Berg, 2015/06/24
- Re: Check for redundancy, Óscar Fuentes, 2015/06/24