473,394 Members | 1,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

C++0x and file I/O

Hi,

While people are getting all excited of new features that will extend the
language, I'm more worried about basic stuff that is important in a very
large number of applications: file I/O.

1) 64 bit (or large enough) addressing on 32 bit systems. Files obviously
are getting bigger and 32 bit addressing simply isn't enough anymore and
the situation is only getting worse. This drives people into using
platform-dependant I/O and thus makes even simple CLI applications unportable.

2) File locking is pretty much essential for applications running in
multitasking environments. Sure, not every system supports it at all, and
not every system allows per-byte access control, but even having some very
basic functionality (lock entire files against writing or both writing and
reading) would help a lot.

3) Non-blocking or async I/O. Quite difficult to implement due to immature
OS support. Also not strictly required, as multi-threading (separate I/O
threads) can work around most of the problems.

Have these issues been considered for the next standard?

- Tronic -

Please CC me on replies.
Jan 19 '06 #1
10 2018
Lasse Kärkkäinen / Tronic wrote:
Hi,

While people are getting all excited of new features that will extend the
language, I'm more worried about basic stuff that is important in a very
large number of applications: file I/O.

You might be better off posting this to comp.std.c++.

--
Ian Collins.
Jan 19 '06 #2

Lasse Kärkkäinen / Tronic wrote:
Hi,

While people are getting all excited of new features that will extend the
language, I'm more worried about basic stuff that is important in a very
large number of applications: file I/O.

1) 64 bit (or large enough) addressing on 32 bit systems. Files obviously
are getting bigger and 32 bit addressing simply isn't enough anymore and
the situation is only getting worse. This drives people into using
platform-dependant I/O and thus makes even simple CLI applications unportable.
I have managed to solve that problem though by using my own traits
class which uses 64-bit streampos and streamoff. It wasn't good enough
to make it unsigned. What would be good however would be standard types
that are guaranteed to be at least 64 bits.
2) File locking is pretty much essential for applications running in
multitasking environments. Sure, not every system supports it at all, and
not every system allows per-byte access control, but even having some very
basic functionality (lock entire files against writing or both writing and
reading) would help a lot.
No reason why every system eg a device driver should even have a
concept of a file. However the language does support file I/O, but
adamantly refuses to support GUI or threads. And of course C++ has no
concept of a network, or any network protocols (including the
internet).

Hey, there is no standard way to open a file for read and write at any
place, creating the file if it doesn't exist without wiping the current
contents. Well yes the workaround is first to open with app then close
again then open without app. And there's no standard way to create the
directory path if it doesn't already exist, in fact there's no such
thing as a directory.
3) Non-blocking or async I/O. Quite difficult to implement due to immature
OS support. Also not strictly required, as multi-threading (separate I/O
threads) can work around most of the problems.
This can be implemented with what we already have.
Have these issues been considered for the next standard?


Well there is boost::filesystem but will it become standard? I don't
know.

Jan 19 '06 #3
On Thu, 19 Jan 2006 13:43:33 +1300, Ian Collins <ia******@hotmail.com>
wrote:
Lasse Kärkkäinen / Tronic wrote:
Hi,

While people are getting all excited of new features that will extend the
language, I'm more worried about basic stuff that is important in a very
large number of applications: file I/O.

You might be better off posting this to comp.std.c++.


OMG. (8-O) Telling the guy to go to a DEAD newsgroup. This is getting
just ridiculous.

I don't know the answer to your question (I wish I did) and obviously
Ian doesn't either. All the "heavy weights" that could answer that
question have left this sad snake-pit of a newsgroup. Hmm... I wonder
why? All we're left with is Traffic Cops and Russian Mafia wannabes.

"comp.lang.c++.moderated" would be you're best bet. A few of the
"biggies" that attend the Standards meetings still post there.

Good Luck

MyopicPettyBureaucrat = LanguageLawyer += NetCop;
Jan 19 '06 #4
JustBoo wrote:

OMG. (8-O) Telling the guy to go to a DEAD newsgroup. This is getting
just ridiculous.

I don't know the answer to your question (I wish I did) and obviously
Ian doesn't either. All the "heavy weights" that could answer that
question have left this sad snake-pit of a newsgroup. Hmm... I wonder
why? All we're left with is Traffic Cops and Russian Mafia wannabes.

"comp.lang.c++.moderated" would be you're best bet. A few of the
"biggies" that attend the Standards meetings still post there.


Some of the "biggies" who attend the standards meetings post here, too.
But comp.std.c++ is still the best place to pose questions related to
what's coming up in the future.

--

Pete Becker
Dinkumware, Ltd. (http://www.dinkumware.com)
Jan 19 '06 #5
On Thu, 19 Jan 2006 15:01:52 -0500, Pete Becker <pe********@acm.org>
wrote:
"comp.lang.c++.moderated" would be you're best bet. A few of the
"biggies" that attend the Standards meetings still post there.

Some of the "biggies" who attend the standards meetings post here, too.


Well, not like it used to be, by any measure. But, time marches on,
people move on. That's li... well, one can't really use the analogy of
life to usenet can one.
But comp.std.c++ is still the best place to pose questions related to
what's coming up in the future.


Okay, I guess I became confused by having two messages a week show up
in comp.std.c++.

Does that say anything about new features in c++?

However beautiful the strategy, you should occasionally
look at the results. - Winston Churchill
Jan 19 '06 #6
JustBoo wrote:
On Thu, 19 Jan 2006 13:43:33 +1300, Ian Collins <ia******@hotmail.com>
wrote:
Lasse Kärkkäinen / Tronic wrote:
Hi,

While people are getting all excited of new features that will extend the
language, I'm more worried about basic stuff that is important in a very
large number of applications: file I/O.


You might be better off posting this to comp.std.c++.

OMG. (8-O) Telling the guy to go to a DEAD newsgroup. This is getting
just ridiculous.

comp.std.c++ isn't dead and is the group for questions relating to the
thinking behind the standard and its future.

--
Ian Collins.
Jan 19 '06 #7
JustBoo wrote:
But comp.std.c++ is still the best place to pose questions related to
what's coming up in the future.

Okay, I guess I became confused by having two messages a week show up
in comp.std.c++.

Does that say anything about new features in c++?

Odd, I see at least 20 a day.

--
Ian Collins.
Jan 19 '06 #8
On 2006-01-19 15:39:01 -0500, JustBoo <Ju*****@BooWho.com> said:
On Thu, 19 Jan 2006 15:01:52 -0500, Pete Becker <pe********@acm.org>
wrote:
"comp.lang.c++.moderated" would be you're best bet. A few of the
"biggies" that attend the Standards meetings still post there.


Some of the "biggies" who attend the standards meetings post here, too.


Well, not like it used to be, by any measure. But, time marches on,
people move on. That's li... well, one can't really use the analogy of
life to usenet can one.
But comp.std.c++ is still the best place to pose questions related to
what's coming up in the future.


Okay, I guess I became confused by having two messages a week show up
in comp.std.c++.
Does that say anything about new features in c++?


I've seen 13 messages there so far today
--
Clark S. Cox, III
cl*******@gmail.com

Jan 19 '06 #9

"Ian Collins" <ia******@hotmail.com> skrev i meddelandet
news:11***************@drone2-svc-skyt.qsi.net.nz...
JustBoo wrote:


OMG. (8-O) Telling the guy to go to a DEAD newsgroup. This is
getting
just ridiculous.

comp.std.c++ isn't dead and is the group for questions relating to
the thinking behind the standard and its future.


It's not at all dead, but it actually was in sort a coma over the New
Year, when all the moderators were absent at the same time.

The patient has slowly recovered since. :-)
Bo Persson
Jan 21 '06 #10
Bo Persson wrote:
OMG. (8-O) Telling the guy to go to a DEAD newsgroup. This is
getting
just ridiculous.


comp.std.c++ isn't dead and is the group for questions relating to
the thinking behind the standard and its future.

It's not at all dead, but it actually was in sort a coma over the New
Year, when all the moderators were absent at the same time.

The patient has slowly recovered since. :-)

Ah yes, the famous "oops we were all on holiday at the same time and all
posts got lost" post....

--
Ian Collins.
Jan 21 '06 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Ensoul Chee | last post by:
I used #include <iostream.h> int m; cout << "Hexadecimal == 0x" << hex << m << endl; to print value of m in hexadecimal mode. But I got the compile error like this couttest.cpp:20 `hex'...
1
by: Luna Kwok | last post by:
Hello, I am having a problem with Netscape 7.01 & 7.02 not updating a variable value in javascript. I have stepped though my code with a debugger, and the values and code all look correct. This...
14
by: Ioannis Vranos | last post by:
I would like to see your views on these. C++98 is already a large language since it supports 4 paradigms and each one is supported well, with optimal space and time efficiency. And this is...
5
by: turnstyle | last post by:
Hi all, I'm trying to run a select where a uniqueidentifier/GUID equals a hex, but I don't seem to be getting matches. For example, this query returns the expected record: select * from...
2
jeffbroodwar
by: jeffbroodwar | last post by:
Hi, I want to concatenate 0x with a variable (dont know what type) to pass it in a byte array. the code below shows the original code : ORIGINAL CODE : ioData = new byte; ...
2
by: msnews.microsoft.com | last post by:
The crystal report in VS2005 used to work well. But now it doesn't work. I open the report (rpt file) in VS2005 and try to refresh database connection, it gives the error message like: Cyrstal...
2
by: LewGun | last post by:
at the end of last year Herb Sutter told us that "C++ 0x has been fixed", now GCC4.3 had been released, the compiler were known as "the C ++ new features' experimental unit",but it support to the...
6
by: Dmitriy V'jukov | last post by:
On 2 Á×Ç, 20:47, "Dmitriy V'jukov" <dvyu...@gmail.comwrote: Q: Can I use Relacy Race Detector to check my algo againts other that C ++0x memory models (x86, PPC, Java, CLI)? A Yes, you...
13
by: Dmitriy V'jukov | last post by:
Consider following Peterson's algorithm implementation from Wikipedia: http://en.wikipedia.org/wiki/Peterson%27s_algorithm flag = 0 flag = 0 turn = 0 P0: flag = 1 turn = 1...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.