[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 22:03:43 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Yuri Khan <yuri.v.khan@gmail.com> writes:
> There are still reasons to use Hungarian notation,
> because even the most strongly typed languages in
> common use are not strongly typed enough. (Haskell
> is or can be persuaded to be, but my employer is not
> ready to embrace Haskell.)
Good call :)
> 1: Every time I have to work with two or more
> coordinate systems that use the same axis names
> (typically X and Y). E.g. a mathematical plane and
> pixel coordinates relative to a window and/or
> a monitor and/or a workspace. Eventually I start
> naming variables starting with “wx, wy” for window,
> “sx, sy” for screen, etc.
Yes, however that falls outside of my definition of
Hungarian notation - I would do the same, only I would
probably spell out "window", "screen", and so on.
So in Lisp it would be window-x, window-y; in C,
win_x, win_y; in C++ perhaps Window would be
a class; etc.
> Without carefully labeling each affected variable,
> after a month of not touching the codebase, it
> becomes impossible to make modifications without
> breaking anything.
Indeed, I do long and descriptive names to the best of
my ability. I consider it a virtue. In C, when you
don't do that typically, I still do them longer and
more descriptive than most C programmers.
> Note that this isn’t the Systems Hungarian many
> people are used to, which encodes the actual type.
> It’s Applications Hungarian, where variables that
> have the same physical type get different prefixes
> after their conceptual type.
In so many words, I agree. Tho to my mind this is
common sense rather than any particular notational
system being adhered to.
--
underground experts united
http://user.it.uu.se/~embe8573
- Re: Check for redundancy, (continued)
- 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, 2015/06/27
- 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 <=
- 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
- Re: Check for redundancy, Emanuel Berg, 2015/06/24
- Message not available
- Re: Check for redundancy, Stefan Nobis, 2015/06/25
- Re: Check for redundancy, Andreas Röhler, 2015/06/25
- Re: Check for redundancy, Emanuel Berg, 2015/06/26