473,854 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Boost process and C

Hi,

Is there any group in the manner of the C++ Boost group that works on
the evolution of the C language? Or is there any group that performs an
equivalent function?

Thanks,
-vs

Apr 29 '06
335 11957
Richard Heathfield wrote:
jacob navia said:
Richard Heathfield a écrit :

Third step - get people to use your shiny new standard container
library. Except that they won't, of course, because they will all
just carry on using whatever it is that they're using right now.


Until they have to port it to a new environment.


Mine ports just fine, thanks. You know why? Because I am careful to write
portable code that isn't full of silly use-me-and-lock-yourself-in
extensions such as are to be found in, say, lcc.


Now you are being unfair to lcc, which AFAIK is an accurate and
portable C compiler. It's the lcc-win32 version that is far behind
(I think by about 10 versions) and that sports the anti-portability
execrations and lack of reliability.

--
"Churchill and Bush can both be considered wartime leaders, just
as Secretariat and Mr Ed were both horses." - James Rhodes.
"We have always known that heedless self-interest was bad
morals. We now know that it is bad economics" - FDR
Apr 30 '06 #91
jacob navia wrote:
CBFalconer a écrit :
.... snip ...
There was never any indication of revision levels, except
that suddenly the debugger no longer worked at all, it just crashed
immediately (it apparently suddenly used Pentium only instructions,
without bothering to check what it was running on).


Mr Falconer insisted that I keep lcc-win32 compatible with his 486
system. I refused without a maintenance contract, and he did not
forgive me that to this day.


Don't lie. I never insisted on anything. You were totally unaware
of a problem, due to lack of testing. I simply abandoned the
system, and have never recommended it since.

You will note that M.Navia does not want to hear about bugs.

--
"Churchill and Bush can both be considered wartime leaders, just
as Secretariat and Mr Ed were both horses." - James Rhodes.
"We have always known that heedless self-interest was bad
morals. We now know that it is bad economics" - FDR
Apr 30 '06 #92
Ian Collins a écrit :

It has been pointed out elsethread that C would require the same baggage
to implement operator overloading. You have to have an object to
operate on! How would yo implement a = b+c on a plain struct without
the means of constructing a temporary object?
In standard C when lcc finds a function that returns a structure by
value like:

STRUCT fn(int arg1);

actually it passes a destination address to fn1 making it:

void fn(STRUCT *__invisiblearg ,int arg1);

This allows fn to return its result in an invisible passed in pointer.

I could do with some effort make lcc-win32 recognize the pattern
a = b+c and pass the address of a instead of a temporary.

I will do it this summer when I can work in that part of lcc-win32 again.


The simple point I'm trying to make is you can write C style procedural
code in C++ without any run time support or object related baggage. All
'advanced' features have a cost, paying that cost is the programmer's
choice.


Yes, true. Both languages have a common subset.

Besides, I would like to point out that I am by no means saying that
people that use C++ are bad, or that I do not respect their views. I
have another point of view, that's all.

jacob

Apr 30 '06 #93
jacob navia wrote:
Ian Collins a écrit :

It has been pointed out elsethread that C would require the same baggage
to implement operator overloading. You have to have an object to
operate on! How would yo implement a = b+c on a plain struct without
the means of constructing a temporary object?

In standard C when lcc finds a function that returns a structure by
value like:

STRUCT fn(int arg1);

actually it passes a destination address to fn1 making it:

void fn(STRUCT *__invisiblearg ,int arg1);

This allows fn to return its result in an invisible passed in pointer.

I could do with some effort make lcc-win32 recognize the pattern
a = b+c and pass the address of a instead of a temporary.

I will do it this summer when I can work in that part of lcc-win32 again.

That's OK to avoid a temporary, but a typical implementation of operator
+ is

T operator+( const T& a, const T& b )
{
T tmp = a;
a += b;
return tmp;
}

The problems I see are the new requirement for references and the
creation of tmp when a shallow copy of a T is inappropriate (say it
contains pointer members).

The simple point I'm trying to make is you can write C style procedural
code in C++ without any run time support or object related baggage. All
'advanced' features have a cost, paying that cost is the programmer's
choice.

Yes, true. Both languages have a common subset.

Besides, I would like to point out that I am by no means saying that
people that use C++ are bad, or that I do not respect their views. I
have another point of view, that's all.

Good, that ends that silly argument!

--
Ian Collins.
Apr 30 '06 #94
CBFalconer said:
Richard Heathfield wrote:
jacob navia said:
Richard Heathfield a écrit :

Third step - get people to use your shiny new standard container
library. Except that they won't, of course, because they will all
just carry on using whatever it is that they're using right now.

Until they have to port it to a new environment.
Mine ports just fine, thanks. You know why? Because I am careful to write
portable code that isn't full of silly use-me-and-lock-yourself-in
extensions such as are to be found in, say, lcc.


Now you are being unfair to lcc, which AFAIK is an accurate and
portable C compiler.


I have no wish to be unfair to lcc. What I am talking about is the use of
extensions such as Jacob Navia frequently mentions here in clc. Such
extensions render unportable any code that uses them. It is interesting
that Jacob is here arguing that portability is a significant issue, whereas
he has so often argued that it is not.
It's the lcc-win32 version that is far behind
(I think by about 10 versions) and that sports the anti-portability
execrations and lack of reliability.


I shan't comment on reliability aspects, because I don't use lcc-win32
myself. As for extensions, I think they're a Good Thing, in that they add
power to the programmer's elbow. But I also think that discussion of them
should be restricted to newsgroups where they are topical. This newsgroup
isn't one of those.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Apr 30 '06 #95
"Herbert Rosenau" <os****@pc-rosenau.de> writes:
On Sat, 29 Apr 2006 13:05:21 UTC, jacob navia <ja***@jacob.re mcomp.fr>
wrote:

[...]
The problem with ultra FAT languages like C++ is their incredible
complexity!

Constructors and destructors?

Who needs them?


YOU, because you needs operator overloading, that requires constuctors
to define the operators to overload and destructors to undefine them.


Not at all. Operator overloading is (or can be) nothing more than
syntactic sugar, allowing an operator symbol to be used as a function
name. There no necessary connection to constructors and destructors.
(The 1983 version of Ada had operator overloading but did not directly
support object orientation.)

I believe that, theoretically, a form of operator overloading could be
added to C without bringing in any of the other baggage of C++.

(I'm not commenting on whether it would be a good idea.)

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
May 1 '06 #96
jacob navia <ja***@jacob.re mcomp.fr> writes:
CBFalconer a écrit :

[...]
His recent citing of Trollsdale as an authority goes beyond any
pale.


Maybe you should cite the context too?

I did not cite him as an authority but as a representative of a view
that is always repeated here:

C++ is the future, C is the past. If you want any improvement to C
just use C++.


If the only example of that attitude you can think of is a quotation
from Tisdale, you should consider the possibility that this attitude
is not as common here as you claim it is.

There are programmers who need (or think they need) features that are
provided by C++, but not by C. Those programmers are better advised
to use C++ than to wait however many decades it might take to get
those features standardized and implemented in C. Most of the rest of
us here in comp.lang.c are content to use and discuss C as it
currently exists.

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
May 1 '06 #97
jacob navia <ja***@jacob.re mcomp.fr> writes:
Keith Thompson a écrit :
jacob navia <ja***@jacob.re mcomp.fr> writes:
[...]
The problem is that instead of getting away from strings as zero
terminated array of characters they STILL hang to it. THEN all
functions must be explicitely be given the length of the
strings/buffers/etc even if it is immediately obvious that the
programmer can't know in all cases what that dammed length is nor
should he care!

typedef struct _string {
size_t length;
char *Stringdata
} String;

is too much for the C standards comitee. This structure is split then
at each function call in a data and a length, and it is up to the
programmer to figure out the length without ever making an error. Are you suggesting that the C standard should be changed so that
strings are no longer terminated by '\0'?


Yes. If we have the length as a size_t we do not need to start
scanning memory at each access to get the length of the string, what
is GREATLY inefficient and has been pointed out as inefficient since
decades!!!!!
There are dozens of
standard library functions that use this representation, and it's
central to the semantics of string literals.


lcc-win32 proposed replacing
strcmp --> Strcmp
strcat --> Strcat

where the arguments are the same but in THOSE kind of strings.

Similarly, the compiler when it sees:

String s = "This is a string";

would make an array of characters and prepend the length instead of
adding a terminating zero.
Conceivably you could add a new string representation *in addition to*
the existing one.


Yes.
You would then be permanently stuck with two
distinct and incompatible ways of representing strings. (Breaking
nearly all existing code is not an option.)


Yes, new code would use Strcmp, old would use strcmp.

I have tried porting code that uses heavily strings in the old
representation to the new one and it is relatively easy to do.
Of course, it's easy enough to implement this kind of thing in a
library using purely standard C; perhaps that's why there isn't much
enthusiasm for adding it to the language.


No. The problem is that you want to keep:

String s;
...

s[23] = 'b';

and not forcing people to use:

strindex(s,23)

strindexassign( s,23,'c');

or similar nonsense.


I don't recall every saying I "want to keep" any such thing.

C does not currently support operator overloading. Your String type
could be implemented in standard C, but it would require using
additional function calls. In a hypothetical C-like language that
*does* support operator overloading, a new String type could be
implemented more conveniently.

I do not necessarily oppose either adding operator overloading to a
future C standard, or implementing it as an extension in an existing C
compiler. I've used languages that support operator overloading, and
I've found it very convenient at times. (It's also prone to abuse.)

On the other hand, operator overloading is really nothing more than
syntactic sugar; there's nothing you can do with it that you can't do
without it (though perhaps much more verbosely).

A string library implemented in standard C would be a good topic for
discussion in this newsgroup. A string library that depends on
extensions provided by a single compiler would be a good topic for a
newsgroup that deals with that copmiler. Advocacy of changes to the C
language belongs in comp.std.c. You've complained that your
suggestions haven't been well received there; that doesn't seem to
have stopped you from talking about them here.

Get this through your head. I do not oppose your ideas. Some of them
are undoubtedly worth considering. I am sick and tired of your
attitude and your insistence on discussing them in a form where they
are off-topic.
I have proposed (and implemented) a demonstration how could that be
done. See the string library of lcc-win32.

If you'll provide a pointer to the documentation, I might take a look
at it. (If I can't read the documentation without installing
lcc-win32, I'm not going to bother.)


Basically it implements all functions of the C library using the new
Strings. The syntax is almost the same:
Strcmp --> strcmp
Strcat --> Strcat

etc

Using operator overloading operators like

if (! s) {
}

have their usual meanings.


I asked for a pointer to the documentation. Is there any? If not,
it's not worth my time to consider it.

[...]
Speaking only for myself, I routinely quote from the C99 standard.
Yes, I and others often point out that not all compilers support C99.
We do so because it happens to be true, and programmers in the real
world need to be aware of that fact.


Maybe. I would not say that it is wrong. But the insistence for using
gcc with the -pedantic etc options that is getting recommended here
goes with the attitude of negating C99 in this bgroup.


Have you tried "gcc -pedantic -std=c99"? I use it routinely.
I remember the
discussion about the FAQ we had, where I was flamed because I insisted
on upgrading the FAQ to C99.
I don't remember that.

[...] I am not imposing anything to anyone. I have explained with a lot of
arguments why I am doing this or that. Nobody is forced to use
lcc-win32 but I think that arguing and convincing people still is
possible, and is still the oenly way to publish your own ideas.


You are imposing extensions that are specific to lcc-win32 on this
newsgroup. You are imposing your advocacy of changes to the standard
on a newsgroup that discusses the language *as it currently exists*,
after being told repeatedly that such discussions would be more
appropriate in comp.std.c.

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
May 1 '06 #98
jacob navia <ja***@jacob.re mcomp.fr> wrote:
It is a pity. Most people in this forum, for instance, that I thought
it would be suchg a group, refuse to discuss about any evolution
and seem nostalgic of some mythical past: they endorse the C89
standard (full 17 years ago) and will start getting VERY upset
if any improvement is proposed. Most of them think, as one of them
said:

"C++ is the future, we are just waiting that C programmers die out."


Tisdale is a known idiot, and you are a known liar.

_This group_ discusses ISO C. It does not discuss any of the gazillions
extensions to it that are out there. In particular it does not discuss
toy compiler suites crufted together by someone who hasn't even read the
Standard properly. It is understandable that this gets up your tits, but
you'll just have to learn to live with being marginal.

Richard
May 1 '06 #99
Ian Collins <ia******@hotma il.com> wrote:
jacob navia wrote:

Whether this nightmare is acceptable or not is a matter of opinion-- but
it strikes me as a whole new class of nightmare that C never had to deal
with before. Like anything, C has its strenths and weaknesses and one of
the strengths has always been the relative lack of nasty surprises.


No surprise here either, if you do not use this feature. Contrary to C++
all this is completely optional. The behavior of old programs and of
programs written not using this features is not affected.

You appear unable of understanding the simple fact that "all this" is
optional in C++ as well.


s/optional/an abomination/.

Operator overloading... yeurgh. What does random_struct_x *=
random_union_y + random_integer_ z; _do_ in the first place?
References... yikes! When I want my object to change behind my back
without me even being aware of it, I'll use first-generation FORTRAN and
change the value of 3, thank you very much.
STL... bah. When I want to use a linked list, I want to use _this_
linked list which is tailored to _this_ application, not some Extruded
Datatype Product which may be "good enough" for most applications and
has precisely the wrong properties for mine.

C is simple, clean and efficient. Let's keep it that way.

Richard
May 1 '06 #100

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

Similar topics

65
5408
by: perseus | last post by:
I think that everyone who told me that my question is irrelevant, in particular Mr. David White, is being absolutely ridiculous. Obviously, most of you up here behave like the owners of the C++ language. A C++ interface installation IS ABOUT THE C++ LANGUAGE! The language does not possess the ability to handle even simple file directory manipulation. Those wise people that created it did not take care of it. So, BOOST is a portable...
205
10771
by: Jeremy Siek | last post by:
CALL FOR PAPERS/PARTICIPATION C++, Boost, and the Future of C++ Libraries Workshop at OOPSLA October 24-28, 2004 Vancouver, British Columbia, Canada http://tinyurl.com/4n5pf Submissions
17
1906
by: Howard Gardner | last post by:
/* If I am using boost, then how should I write this program? As it sits, this program is using SFINAE to determine whether or not a type supports particular syntax. I suspect that there is functionality in boost to do this. I have found mpl::has_xxx, which I suspect of being part of the solution. I've also found type_traits::has_nothrow_constructor
2
6636
by: smith4894 | last post by:
{ not sure you're aware of that but there are the newsgroups for all major operating systems. you might want to try asking in the forum 'comp.os.linux.development.apps', since memory-mapped files are not a language-supported structure, they are platform-specific. -mod } I'm trying to use boost serialization to serialize/deserialize data to and from a mmap'd file. I have my own ostream/istream classes that essentially read/write bytes...
5
2400
by: linyanhung | last post by:
I used a boost multi thread in VS 2005 on a Duo Core PC, and made a two thread process. The code is something like this: #include <boost/thread/thread.hpp> void fun1() { //do something
8
6216
by: Matt England | last post by:
My team currently using Boost Threads, but we are considering switching to ZThreads. (We seek cross-platform, C++ multithreading capabilities in an external library.) ZThread(s): http://zthread.sourceforge.net/ http://www.inf.uni-konstanz.de/dbis/members/vinnik/zsim/doc/ Can anyone share their ZThreads experience, either good, bad, or
2
2417
by: ironpingwin | last post by:
Hi! I'd like to make few threads which will run in the same time in C++. I try to use boost library v 1.34.1 (it can't be newest, because I compile on remote machine, which is not administrated by me). In this version there isn't detach() function. How to run functions from two different class in the same time?
13
4542
by: brad | last post by:
Still learning C++. I'm writing some regex using boost. It works great. Only thing is... this code seems slow to me compared to equivelent Perl and Python. I'm sure I'm doing something incorrect. Any tips? #include <boost/regex.hpp> #include <iostream> // g++ numbers.cpp -o numbers -I/usr/local/include/boost-1_35 /usr/local/lib/libboost_regex-gcc41-mt-s.a // g++ numbers.cpp -o numbers.exe
5
3596
by: ameyav | last post by:
Hi All, I am converting some C code into C++ code. The objective is to improve throughput. I have some code written in C which serially parses through a list of files, opens each one of them, processes the data and closes the file. All the files are processed one by one. The obvious performance bottleneck that i could think of is the wasted cpu cycles for file i/o. *My solution* was to spawn multiple threads to do the file i/o. For...
0
9901
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11031
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10763
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9517
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7918
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7082
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5744
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5942
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4159
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.