Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #15470 > unrolled thread
| Started by | bob <bob@coolfone.comze.com> |
|---|---|
| First post | 2012-04-19 06:57 -0700 |
| Last post | 2012-04-20 20:39 -0400 |
| Articles | 8 — 8 participants |
Back to article view | Back to comp.lang.c++
.nothing bob <bob@coolfone.comze.com> - 2012-04-19 06:57 -0700
Re: .nothing Marcel Müller <news.5.maazl@spamgourmet.com> - 2012-04-19 17:17 +0200
Re: .nothing Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-04-20 08:14 +0000
Re: .nothing Victor Bazarov <v.bazarov@comcast.invalid> - 2012-04-19 12:46 -0400
Re: .nothing Vlad from Moscow <vlad.moscow@mail.ru> - 2012-04-19 11:22 -0700
Re: .nothing Christopher Pisz <someone@somewhere.net> - 2012-04-19 13:51 -0500
Re: .nothing Paul N <gw7rib@aol.com> - 2012-04-20 08:38 -0700
Re: .nothing Richard Damon <news.x.richarddamon@xoxy.net> - 2012-04-20 20:39 -0400
| From | bob <bob@coolfone.comze.com> |
|---|---|
| Date | 2012-04-19 06:57 -0700 |
| Subject | .nothing |
| Message-ID | <1608955.34.1334843852890.JavaMail.geo-discussion-forums@ynkl30> |
Why did the .h get dropped from many files? For instance, why did vector.h become vector and iostream.h become iostream?
[toc] | [next] | [standalone]
| From | Marcel Müller <news.5.maazl@spamgourmet.com> |
|---|---|
| Date | 2012-04-19 17:17 +0200 |
| Message-ID | <4f902c8c$0$6560$9b4e6d93@newsspool4.arcor-online.net> |
| In reply to | #15470 |
On 19.04.2012 15:57, bob wrote: > Why did the .h get dropped from many files? For instance, why did vector.h become vector and iostream.h become iostream? No idea. Most likely because the changes including the namespaces were no longer source compatible. But I have no idea why the extension got completely dropped instead of using e.g. .hpp or whatever. Win Explorer and some other applications dislike files without extensions. AFAIK only Mac and OS/2 use name independent file types in meta data. And *nix can reasonably live without the extension. Marcel
[toc] | [prev] | [next] | [standalone]
| From | Jorgen Grahn <grahn+nntp@snipabacken.se> |
|---|---|
| Date | 2012-04-20 08:14 +0000 |
| Message-ID | <slrnjp26nb.1ls.grahn+nntp@frailea.sa.invalid> |
| In reply to | #15471 |
On Thu, 2012-04-19, Marcel Müller wrote: > On 19.04.2012 15:57, bob wrote: >> Why did the .h get dropped from many files? For instance, why did >> vector.h become vector >> and iostream.h become iostream? > > No idea. Most likely because the changes including the namespaces were > no longer source compatible. I always thought about it as a migration path to C++98. When you migrated, you removed the .h and did the updates needed to cope with the std:: namespace. > But I have no idea why the extension got completely dropped instead of > using e.g. .hpp or whatever. Win Explorer and some other applications > dislike files without extensions. AFAIK only Mac and OS/2 use name > independent file types in meta data. And *nix can reasonably live > without the extension. Not just "reasonably" -- there are a few things in Unix which depend on file naming conventions (C++ source files and object files come to mind) but those are exceptions to the general rule. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o .
[toc] | [prev] | [next] | [standalone]
| From | Victor Bazarov <v.bazarov@comcast.invalid> |
|---|---|
| Date | 2012-04-19 12:46 -0400 |
| Message-ID | <jmpfgc$v71$1@dont-email.me> |
| In reply to | #15470 |
On 4/19/2012 9:57 AM, bob wrote:
> Why did the .h get dropped from many files? For instance, why did
> vector.h become vector and iostream.h become iostream?
I guess in the mid-nineties there were development systems coming out
where definitions and declarations aren't necessarily kept in files, so
the Committee decided to abandon the "header *file*" concept and instead
introduce the "header" concept that might or might not correspond to a
named external storage area ("file"). Extensions are irrelevant when
name has nothing to do with the file system on which the compiled code
resides.
V
--
I do not respond to top-posted replies, please don't ask
[toc] | [prev] | [next] | [standalone]
| From | Vlad from Moscow <vlad.moscow@mail.ru> |
|---|---|
| Date | 2012-04-19 11:22 -0700 |
| Message-ID | <93358bc0-9729-48da-8857-86b206c71fa9@fo16g2000vbb.googlegroups.com> |
| In reply to | #15470 |
On 19 апр, 17:57, bob <b...@coolfone.comze.com> wrote: > Why did the .h get dropped from many files? For instance, why did vector.h become vector and iostream.h become iostream? Because before accepting the C++ Standard different C++ compilers use different extensions for C++ headers as, for example, hxx, hpp (or others) that to distinguish C++ headers from C headers. For example two headers, <string.h> and <string.hpp>, could be present in a C++ implementation. So the Committee decided to remove extensions for C++ headers and to prefix with letter 'c' for C standard headers . Though any implementation internally may use the same extensions for headers as it used them before.
[toc] | [prev] | [next] | [standalone]
| From | Christopher Pisz <someone@somewhere.net> |
|---|---|
| Date | 2012-04-19 13:51 -0500 |
| Message-ID | <jmpmqt$epr$1@dont-email.me> |
| In reply to | #15470 |
On 4/19/2012 8:57 AM, bob wrote: > Why did the .h get dropped from many files? For instance, why did vector.h become vector and iostream.h become iostream? To give interviewers a way to distinguish between C programmers and C++ programmers when they made the mistake of asking for C/C++ programmers, but were really looking for C++ programmers or were really looking for C programmers.
[toc] | [prev] | [next] | [standalone]
| From | Paul N <gw7rib@aol.com> |
|---|---|
| Date | 2012-04-20 08:38 -0700 |
| Message-ID | <28343ac6-df48-4590-95e6-5965b0e526d0@l18g2000vbx.googlegroups.com> |
| In reply to | #15470 |
On Apr 19, 2:57 pm, bob <b...@coolfone.comze.com> wrote: > Why did the .h get dropped from many files? For instance, why did vector.h become vector and iostream.h become iostream? I'm wondering whether the vast difference between <string> and <string.h> has any bearing on this question?
[toc] | [prev] | [next] | [standalone]
| From | Richard Damon <news.x.richarddamon@xoxy.net> |
|---|---|
| Date | 2012-04-20 20:39 -0400 |
| Message-ID | <jmsvk4$42j$1@dont-email.me> |
| In reply to | #15470 |
On 4/19/12 9:57 AM, bob wrote: > Why did the .h get dropped from many files? For instance, why did vector.h become vector and iostream.h become iostream? I will note, besides the other comments that have been made, that the standard does not require that <vector> does not need to reside in a file with the name "vector" (or even in a file). It is quite legal and proper for a compiler to define that when including a file with a name without an extension, the compiler will also look for that same file with the, say, .hpp extension, thereby allowing the file to have an extension for those tools that want/need one, but also to look in source files the way the standard describes.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.c++
csiph-web