[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ptrdiff_t misuse
From: |
Stephen J. Turnbull |
Subject: |
Re: ptrdiff_t misuse |
Date: |
Fri, 06 Jul 2012 21:02:32 +0900 |
Eli Zaretskii writes:
> Not for someone who hacks Emacs sources. [EMACS_INT is] like
> Lisp_Object: you get used to it very quickly and use it naturally
> after that.
Well, it isn't "like" Lisp_Object; it *is* Lisp_Object! How natural
is *that*?
> The type name actively resists that. The "ptr" part is one problem,
> the "diff" part is another. None of them is related to the typical
> usage of the positional values.
Huh? The only way I can understand that is that people who have no
clue about programming in C are programming in C! Don't you find that
scary?
> I expect them to see the common practice [using EMACS_POS] in Emacs
> sources and follow suit. If not, they will get comments on their
> code to that effect and learn fast enough.
Ditto ptrdiff_t.
> I didn't have you (or myself) in mind when I suggested EMACS_POS ;-)
> I worry about newcomers, and would like to make their learning curve
> in the matter to be as un-steep as possible.
I worry about newcomers, and I would prefer (if I'm going to be
reviewing) that they have a clue about programming in C if they're
going to be programming in C. C, unlike Lisp, is the antithesis of a
"safe" language. *Especially* when using pointers (which, in case
you've forgotten ;-) is what C arrays -- including Emacs buffer and
string data -- are!
But I'm not going to be reviewing, most likely. I just wanted to
point out that there is a school of thought opposed to yours.
- Re: ptrdiff_t misuse [was :Re: (empty)], (continued)
- Re: ptrdiff_t misuse [was :Re: (empty)], Paul Eggert, 2012/07/06
- Re: ptrdiff_t misuse, Eli Zaretskii, 2012/07/06
- Re: ptrdiff_t misuse, Paul Eggert, 2012/07/06
- Re: ptrdiff_t misuse, Stefan Monnier, 2012/07/06
- Re: ptrdiff_t misuse, Samuel Bronson, 2012/07/06
- Re: ptrdiff_t misuse, Stefan Monnier, 2012/07/07
- Re: ptrdiff_t misuse, Paul Eggert, 2012/07/07
- Re: ptrdiff_t misuse, Eli Zaretskii, 2012/07/06
- Re: ptrdiff_t misuse, Stephen J. Turnbull, 2012/07/06
- Re: ptrdiff_t misuse, Eli Zaretskii, 2012/07/06
- Re: ptrdiff_t misuse,
Stephen J. Turnbull <=
- Re: ptrdiff_t misuse, Eli Zaretskii, 2012/07/06
- Re: ptrdiff_t misuse, Stephen J. Turnbull, 2012/07/06
- Re: ptrdiff_t misuse, Paul Eggert, 2012/07/06
- Re: ptrdiff_t misuse, Eli Zaretskii, 2012/07/06
- Re: ptrdiff_t misuse, Paul Eggert, 2012/07/06
- Re: ptrdiff_t misuse, Eli Zaretskii, 2012/07/06
- Re: ptrdiff_t misuse, Dmitry Antipov, 2012/07/06
- Re: ptrdiff_t misuse, Paul Eggert, 2012/07/06
- Re: ptrdiff_t misuse, Chong Yidong, 2012/07/06