[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: feature request
From: |
Dirk Herrmann |
Subject: |
Re: feature request |
Date: |
Tue, 29 May 2001 12:53:43 +0200 (MEST) |
On Mon, 28 May 2001, Jacques A. Vidrine wrote:
> [ Please don't shoot the messenger :-) ]
Sorry if I have upset you. I didn't mean to. I know the whole mess is
not your fault :-)
> I did a web search to find some alternative source of info for the
> sake of argument (or rather, for the sake of avoiding it :-). These
> are among the first few hits:
Thanks for doing this investigation.
> A popular C style guide
> <URL:http://www.jetcafe.org/~jim/c-style.html>
> ``Typedef Names: Capitalized, with no _t suffix or other cutesy
> thing to say ``I'm a type'' - we can see that from it's position in
> the declaration! (Besides, all names ending with _t are reserved by
> Posix.) The capitalization is needed to distinguish type names from
> variable names - often both want to use the same application-level
> word.''
[...]
> > I
> > really want to be sure about this one, because it seems to be quite a big
> > demand to request all names ending with '_t', especially since it seems to
> > be a widely used pattern to name types that way.
>
> This is just because so many people make the mistake of copying the
> POSIX convention. They see ``size_t'' and think, ``Oh, that's not a
> bad idea, I'll do that, too.'' It is a common mistake.
Well, it's only a mistake because of POSIX. In our special situation,
however, capitalization may be possible, but will probably look strance:
scm_Size, scm_Ulong, scm_Bits etc.
We _could_ use such a convention. But, do we want to? Is there another
suggestion for uniform type naming in guile?
> > Can we use SCM_BOOL_T, or is that also a problem? ("Oh ... it makes me
> > mad ... mad!" -- "Easy, Mungo, easy ..." :-)
>
> SCM_*_T seems safe to me. Personally, I don't care for ``type
> tagging''. But I also don't like typedef'ing away structs. *shrug*
>
> What were they before? scm_bool? What was wrong with that?
SCM_BOOL_T is not a type, but a constant, namely the value #t. OK, the
name ist strange and might even be renamed some day in the 57th
century. But, it's not only types that could sensibly end with _t.
Best regards,
Dirk Herrmann
- feature request, Han-Wen Nienhuys, 2001/05/20
- Re: feature request, Dirk Herrmann, 2001/05/24
- Re: feature request, Dirk Herrmann, 2001/05/27
- Re: feature request, Rob Browning, 2001/05/28
- Re: feature request, Lars J. Aas, 2001/05/28
- Re: feature request, Jacques A. Vidrine, 2001/05/28
- Re: feature request, Dirk Herrmann, 2001/05/28
- Re: feature request, Jacques A. Vidrine, 2001/05/28
- Re: feature request,
Dirk Herrmann <=
- Re: feature request, Michael Livshin, 2001/05/29
- Re: feature request, Jacques A. Vidrine, 2001/05/29
- Re: feature request, Jacques A. Vidrine, 2001/05/29
- Re: feature request, Lars J. Aas, 2001/05/29
- Re: feature request, Marius Vollmer, 2001/05/30
- Re: feature request, Rob Browning, 2001/05/30
- Re: feature request, Dirk Herrmann, 2001/05/31
- Re: feature request, Marius Vollmer, 2001/05/31