Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Still no dirent.h in C1X

Reply
Thread Tools

Still no dirent.h in C1X

 
 
David Demelier
Guest
Posts: n/a
 
      11-24-2011
Hello,

I've seen the new standard of C called C1x.
http://www.open-std.org/JTC1/SC22/wg...docs/n1250.pdf

They added some great features like anonymous unions and threads. But
there is still no directory management. I think that's very annoying.
Why threads should be added and dirent.h should not ?
 
Reply With Quote
 
 
 
 
Eric Sosman
Guest
Posts: n/a
 
      11-24-2011
On 11/24/2011 7:43 AM, David Demelier wrote:
>
> I've seen the new standard of C called C1x.
> http://www.open-std.org/JTC1/SC22/wg...docs/n1250.pdf
>
> They added some great features like anonymous unions and threads. But
> there is still no directory management. I think that's very annoying.
> Why threads should be added and dirent.h should not ?


Your question is better suited to comp.std.c than to this forum.

--
Eric Sosman
http://www.velocityreviews.com/forums/(E-Mail Removed)d
 
Reply With Quote
 
 
 
 
Quentin Pope
Guest
Posts: n/a
 
      11-25-2011
On Thu, 24 Nov 2011 04:43:26 -0800, David Demelier wrote:
> Hello,
>
> I've seen the new standard of C called C1x.
> http://www.open-std.org/JTC1/SC22/wg...docs/n1250.pdf
>
> They added some great features like anonymous unions and threads. But
> there is still no directory management. I think that's very annoying.
> Why threads should be added and dirent.h should not ?


You may not be aware that many, probably the majority, of C programs run
on systems without any notion of directories. For example, embedded
processors, but also many mainframe systems. It's only a few months ago
that I was doing some maintenance work on a UNISYS A Series, which has a
flat file system. This is not unusual for mainframes in current use.

C should not be ladened with cruft that simply doesn't make sense on a
large proportion of implementations.

My 2c.

//QP
 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      11-25-2011
On 11/26/11 09:01 AM, Quentin Pope wrote:
> On Thu, 24 Nov 2011 04:43:26 -0800, David Demelier wrote:
>> Hello,
>>
>> I've seen the new standard of C called C1x.
>> http://www.open-std.org/JTC1/SC22/wg...docs/n1250.pdf
>>
>> They added some great features like anonymous unions and threads. But
>> there is still no directory management. I think that's very annoying.
>> Why threads should be added and dirent.h should not ?

>
> You may not be aware that many, probably the majority, of C programs run
> on systems without any notion of directories. For example, embedded
> processors, but also many mainframe systems. It's only a few months ago
> that I was doing some maintenance work on a UNISYS A Series, which has a
> flat file system. This is not unusual for mainframes in current use.
>
> C should not be ladened with cruft that simply doesn't make sense on a
> large proportion of implementations.


Like _Complex

--
Ian Collins
 
Reply With Quote
 
jacob navia
Guest
Posts: n/a
 
      11-25-2011
Le 25/11/11 21:01, Quentin Pope a écrit :
> On Thu, 24 Nov 2011 04:43:26 -0800, David Demelier wrote:
>> Hello,
>>
>> I've seen the new standard of C called C1x.
>> http://www.open-std.org/JTC1/SC22/wg...docs/n1250.pdf
>>
>> They added some great features like anonymous unions and threads. But
>> there is still no directory management. I think that's very annoying.
>> Why threads should be added and dirent.h should not ?

>
> You may not be aware that many, probably the majority, of C programs run
> on systems without any notion of directories.


Where is your data for such sweeping generalizations?

According to several surveys, for instance this one:

http://langpop.com/

C is one of the most popular computer languages ever.
Applications like the linux kernel, many RDBMS like
Sqlite, and a LONG etc disprove your supposition that
C is used in embedded systems where there isn't a file
system.

Again, please show us some realworld DATA to prove
your asserions.

> For example, embedded
> processors, but also many mainframe systems. It's only a few months ago
> that I was doing some maintenance work on a UNISYS A Series, which has a
> flat file system. This is not unusual for mainframes in current use.
>


Well, archaic systems remain, but even there you have partitioned data
sets that are similar to directories in many ways.

You happen to have some history working in some special environments
Please do not generalize to ALL user of the language.

Thanks


> C should not be ladened with cruft that simply doesn't make sense on a
> large proportion of implementations.
>
> My 2c.
>
> //QP


 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      11-25-2011
Ian Collins <(E-Mail Removed)> writes:
> On 11/26/11 09:01 AM, Quentin Pope wrote:

[...]
>> C should not be ladened with cruft that simply doesn't make sense on a
>> large proportion of implementations.

>
> Like _Complex


How does complex arithmetic not make sense on some systems?
It doesn't require any support from the operating system, just some
compiler support for the operators and a few library functions that
can be implemented (mostly?) in portable C.

I think complex numbers were added to the core language because it
would have been difficult or impossible to add them as a library
feature, given that C doesn't have operator overloading.

(To those who think that adding operator overloading would have
been a better solution, I refer you to the previous flame wars.)

--
Keith Thompson (The_Other_Keith) (E-Mail Removed) <http://www.ghoti.net/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      11-25-2011
David Demelier <(E-Mail Removed)> writes:
> I've seen the new standard of C called C1x.
> http://www.open-std.org/JTC1/SC22/wg...docs/n1250.pdf


http://www.open-std.org/JTC1/SC22/wg...docs/n1570.pdf is a more
recent draft.

> They added some great features like anonymous unions and threads. But
> there is still no directory management. I think that's very annoying.
> Why threads should be added and dirent.h should not ?


<dirent.h> is already standardized by POSIX. Standardizing
directory access for non-POSIX systems is a harder problem than
you might think. A library that's general enough to cover all
relevant systems would probably be substantially less powerful than
the existing system-specific library (dirent for POSIX, whatever
Windows has, etc.).

Threads are also supported by POSIX, but apparently standardizing
threads in a way that could reasonably be supported by all hosted
implementations (or most of them; as I recall it's an optional
feature) apparently wasn't as difficult.

--
Keith Thompson (The_Other_Keith) (E-Mail Removed) <http://www.ghoti.net/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
Kaz Kylheku
Guest
Posts: n/a
 
      11-25-2011
On 2011-11-24, David Demelier <(E-Mail Removed)> wrote:
> Hello,
>
> I've seen the new standard of C called C1x.
> http://www.open-std.org/JTC1/SC22/wg...docs/n1250.pdf
>
> They added some great features like anonymous unions and threads. But


It's stupid to start adding Unix stuff back to C.

C came from Unix, and the library on Unix didn't really distinguish between
what is part of C, and what is Unix-specific. So two parallel standards efforts
emerged, dividing up the library.

Why start merging it together now?

I haven't looked at the threads in C1X, but it would be ridiculous if it
was just a copy of <pthread.h> stuff from POSIX.

> there is still no directory management. I think that's very annoying.


There is.

> Why threads should be added and dirent.h should not ?


There is a <dirent.h> and it's in a set of documents called POSIX.

Doh?

It's already standardized in a document that builds on C.

What would you achieve by putting into the same standard? It would have to be
an optional extension --- exactly what it is now.

 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      11-25-2011
On 11/26/11 09:18 AM, Keith Thompson wrote:
> Ian Collins<(E-Mail Removed)> writes:
>> On 11/26/11 09:01 AM, Quentin Pope wrote:

> [...]
>>> C should not be ladened with cruft that simply doesn't make sense on a
>>> large proportion of implementations.

>>
>> Like _Complex

>
> How does complex arithmetic not make sense on some systems?


I didn't say that, but I do maintain that on the majority of systems
where C is used (read embedded, often small), it isn't much use. I'd
even go so far as to say it is of less use than filesystem support.

--
Ian Collins
 
Reply With Quote
 
Markus Wichmann
Guest
Posts: n/a
 
      11-25-2011
On 25.11.2011 21:01, Quentin Pope wrote:
> On Thu, 24 Nov 2011 04:43:26 -0800, David Demelier wrote:
>> Hello,
>>
>> I've seen the new standard of C called C1x.
>> http://www.open-std.org/JTC1/SC22/wg...docs/n1250.pdf
>>
>> They added some great features like anonymous unions and threads. But
>> there is still no directory management. I think that's very annoying.
>> Why threads should be added and dirent.h should not ?

>


Yeah, that appears to be quite stunning. To my knowledge, any OS out
there with multitasking capabilities should have a file system. Or are
there counter examples?

> You may not be aware that many, probably the majority, of C programs run
> on systems without any notion of directories. For example, embedded
> processors, but also many mainframe systems. It's only a few months ago
> that I was doing some maintenance work on a UNISYS A Series, which has a
> flat file system. This is not unusual for mainframes in current use.
>
> C should not be ladened with cruft that simply doesn't make sense on a
> large proportion of implementations.
>


_Complex was already named. Apart from that, in my (little) experience,
programming for embedded processors takes place in a freestanding
environment, rendering the entire Section 7 useless there (OK, not
entirely, but there isn't much left in a freestanding environment).

What's more: The standard library already contains enough cruft to sink
a cruiser, so I don't get where there should be harm in adding more
stuff. For example, many programs out there do not need <math.h>. Way
less programs need <tgmath.h>. Yet it is there and it contains way more
functions than any program could ever need at once.

If you think mandating the existence of directory listing facilities in
the OS would lessen portability, I think you are wrong. That is because
either there is _any_ kind of file system, then you can enumerate the
files, or there isn't, then you can't. However, in a hosted environment
C already mandates the existence of files. (As seen in <stdio.h>)

> My 2c.
>
> //QP


HTH,
Markus
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
posting history -- wording of C1X sequencing Ersek, Laszlo C Programming 1 09-24-2010 12:43 AM
On alignment (final committee draft for C++0x and n1425 for C1X) Gennaro Prota C++ 2 08-25-2010 11:43 PM
On alignment (final committee draft for C++0x and n1425 for C1X) Gennaro Prota C++ 6 08-25-2010 04:37 PM
improved C1X security Robert Seacord C Programming 7 08-15-2008 10:18 AM
Who knows more information about the next ISO C standard "C1x" ? Royt C Programming 2 03-16-2008 01:05 PM



Advertisments