473,854 Members | 1,595 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
jacob navia said:
Richard Heathfield a écrit :
jacob navia said:

A)

Consider that the MMX instruction set is around 10 years old now, and
that we have yet to see a mapping of those operations into C.

Consider that many computers don't /have/ the MMX instruction set. What
possible use could C mappings of MMX instructions be to a mainframe
programmer?


Exactly. That is why you would use operator overloading in computers
that have the MMX instruction set (PCs) and not use any operator
overloading for those operations in computers that do NOT have that
feature.


In other words, it would be an implementation extension rather than part of
the language - which is basically what happens now. Code that used it would
not be portable to computers that don't have that functionality.

<snip>
If you want to maintain the natural syntax

String s;
...

s[2] = 'e';

it is good to be able to overload the [].

That's arguable. Some might consider it good. Others might consider it
unnecessarily confusing. [] suggests that s is an array, which it clearly
is not.


Excuse me, it IS an array, but indexed with an size_t offset from the
beginning that is all.


Excuse me, but it is *not* an array. It is an instance of a struct type
containing an array.
C) This feature
allows users to replace parts of the library at will.

Making the code harder to read, harder to understand, and harder to
maintain. If people aren't even going to /use/ the library, why bother
writing it?


Why is this:

SomeIntType_t a,b=7,c=6;
a = b*c;

more *difficult* to read than

SomeIntType_t a,b,c;

intToSomeIntTyp e(&b,7);
intToSomeIntTyp e(&c,6);
SomeIntType_Add (&c,b,a);

?????????


The function calls in the second version remind the reader that something
more complicated than mere arithmetic is happening. At present, a
maintenance programmer is entitled to assume from a single glance that a =
b * c is merely an arithmetic operation, obviously of no consequence in his
bug hunt, whereas what you are proposing would mean that such an operation
could conceal an arbitrary number of side effects, and indeed may not even
have anything whatsoever to do with multiplication.

--
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)
May 2 '06 #161
jacob navia wrote:
Richard Heathfield a écrit :
jacob navia said:
A)

Consider that the MMX instruction set is around 10 years old now, and
that we have yet to see a mapping of those operations into C.
Consider that many computers don't /have/ the MMX instruction set.
What possible use could C mappings of MMX instructions be to a
mainframe programmer?


Exactly. That is why you would use operator overloading in computers
that have the MMX instruction set (PCs) and not use any operator
overloading for those operations in computers that do NOT have that
feature.

Compare this solution with other solutions where the language would add
a special |+ operation (or similar) to the language itself.

All implementations would have to use it.

The advantage of operator overloading here is PRECISELY that you do it
where it is needed and nowhere else!


If I write code depending on the |+ operator then I need it implemented
on all the systems I need it ported to. It does not matter to me whether
it is implemented as an MMX instruction or a function call. You don't
need operator overloading for that, you need it added to the base language.
The language is made extensible without adding any specific extension.


The reserved namespace and stating in the standard that extensions are
allowed does that. Hell, since |+ is currently an error you can add it
as an extension to your compiler if you want, as long as it produces a
diagnostic when invoked in standard conforming mode! No need for
operator overloading to allow you to do that.
B)

This feature is useful when applied to special forms of arrays. Suppose:
typedef struct _String {
size_t length;
char *data;
} String;

If you want to maintain the natural syntax

String s;
...

s[2] = 'e';

it is good to be able to overload the [].

That's arguable. Some might consider it good. Others might consider it
unnecessarily confusing. [] suggests that s is an array, which it
clearly is not.


Excuse me, it IS an array, but indexed with an size_t offset from the
beginning that is all.


It's a structure containing an array.
C) This feature
allows users to replace parts of the library at will.


Making the code harder to read, harder to understand, and harder to
maintain. If people aren't even going to /use/ the library, why bother
writing it?


Why is this:

SomeIntType_t a,b=7,c=6;
a = b*c;

more *difficult* to read than

SomeIntType_t a,b,c;

intToSomeIntTyp e(&b,7);
intToSomeIntTyp e(&c,6);
SomeIntType_Add (&c,b,a);

?????????


Well, your suggestion here seems to have use * for addition... ;-)

Anyway, I would have done
SomeIntType_t a;
SomeIntType_t b = makeSomeTime(7) ;
SomeIntType_t c = makeSomeTime(6) ;

c = SomeTypeMult(b, c);

Unless the operation is very complex, in which case it might be worth
people knowing that rather than thinking, oh, that's just a multiplication.

Operator overloading may well be useful. So feel free to propose it to
the standard committee. However, that is not this group which discusses
the existing language.
--
Flash Gordon, living in interesting times.
Web site - http://home.flash-gordon.me.uk/
comp.lang.c posting guidelines and intro:
http://clc-wiki.net/wiki/Intro_to_clc
May 2 '06 #162
On 2006-05-02, jacob navia <ja***@jacob.re mcomp.fr> wrote:
Richard Heathfield a écrit :
jacob navia said:

A)

Consider that the MMX instruction set is around 10 years old now, and
that we have yet to see a mapping of those operations into C.

Consider that many computers don't /have/ the MMX instruction set. What
possible use could C mappings of MMX instructions be to a mainframe
programmer?


Exactly. That is why you would use operator overloading in computers
that have the MMX instruction set (PCs) and not use any operator
overloading for those operations in computers that do NOT have that feature.


More likely you mean, use a new type with a real operator that does that
on computers that have MMX, and use operator overloading to implement
saturation arithmetic in software on computers that don't have it.
May 2 '06 #163
jacob navia <ja***@jacob.re mcomp.fr> writes:
Robert Latest a écrit :
On 2006-04-30, jacob navia <ja***@jacob.re mcomp.fr> wrote:
We had this discussion already. I started yet another discussion
about the need for a portable standard container library several
times and the answers were:

[ quotes of clc regulars saying that such a library is unnecessary
snipped ... ]
And everyone accepted those things in silence. Nobody complained.

Which you failed to take as a pretty strong hint to the fact that
the regulars might be right, and you might be wrong.


Of course the "regulars" are right. C should be kept as dead as
possible. This is of course RIGHT since you say that C++ is the best
thing in the world. There is no point in dveloping C. C++ has done it
already.

That's YOUR point of view, I disagree.


jacob, until you stop making these *absurd* claims about what you
think everyone else believes, you will not be taken seriously here.

The "regulars" do not believe, and have never stated, that "C should
be kept as dead as possible", or that "C++ is the best thing in the
world". In attempting to support this ridiculous claim, you have
quoted E. Robert Tisdale, a notorious troll who absolutely does not
represent the point of view of anyone else in this newsgroup.

Most of us believe that C is (in many ways) a good language as it is,
though there is certainly room for improvement. Many of us believe
that C++ or other languages might be more appropriate than C for some
tasks; that in no way implies that C is, or should be, a dead
language.

Until and unless you understand that, you will not be able to have any
kind of serious discussion here. At the very least, I suggest you
stop trying to tell us what *we* believe, and concentrate on telling
us what *you* believe (assuming it's topical).

--
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 2 '06 #164
we******@gmail. com writes:
Ian Collins wrote:
Where would you draw the line on topicality?

My interpretation is [...] Potential improvements?


To which the familliar refrain is "if you don't like the features of C,
use some other language".


If you don't like the features of C, you can either:

(1) Do without, or

(2) Use some other language that provides those features, or

(3) Use a C compiler that implements those features as an extension
(thus tying your code to that specific implementation) , or

(4) Push to have the new features added to the next revision of the C
standard, and then wait for the new standard to be published, and
then wait for implementations to support the new standard. If
you're *very* lucky, this might take as little as a decade.

If you think the standardization process is too slow, you can discuss
it in comp.std.c. If you know of an alternative other than the ones
I've mentioned (and they've *all* been mentioned here), feel free to
suggest it.

--
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 2 '06 #165
jacob navia wrote:
Robert Latest a écrit :

.... snip ...

Why not? This way the language itself is kept lean and simple,


Lean and simple?

Assembler is even leaner and is much simpler.


Please post the source code to the last project you wrote in
assembler, and which ported unchanged to, say, an 8080, an 8051, an
8086, a 6800, a68000, an IBM 360/370, a PDP11, an HP3000. I trust
it ran to completion, and produced the same output on all systems
for the same input.

I won't insist on any more than the above selection. Note that I
even omitted a PIC and the Rabbit and the 6502. I will even let
you pick the (available) OS for each machine. However I do expect
more than a single 'halt' instruction.

--
"If you want to post a followup via groups.google.c om, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell. org/google/>
Also see <http://www.safalra.com/special/googlegroupsrep ly/>
May 2 '06 #166
we******@gmail. com wrote:
Ben Pfaff wrote:

.... snip ...

No. I mean that some string operations can be expressed shorter
and with more clarity in Perl than in C. No new string library
will change this.


That's a pretty wishy washy premise on which to base an implied
disapproval of Bstrlib. Let me just guess that you haven't really
seriously taken a look at it.


The last time I took an (admittedly cursory) look at Bstrlib, I
found it cursed with non-portabilities and unwarrented assumptions,
not to mention an interminable API. This is a criticism very few
can make of the standard C string operations.

--
"If you want to post a followup via groups.google.c om, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell. org/google/>
Also see <http://www.safalra.com/special/googlegroupsrep ly/>
May 2 '06 #167
Richard Heathfield wrote:
.... snip ...
[1] Please remember that the introduction of C99 did not magically
change the documentation of all existing implementations . The
documentation for Turbo C 2.01 still claims that it is an ANSI C
compiler, even though ANSI C has moved on and Turbo C 2.01 has not.
It is not unreasonable for people to expect to be able to compile
ANSI C programs in Turbo C 2.01.


In fact, that is one portability test I try to apply to my code.
It has been known to rub ones nose in unwarranted assumptions.

--
"If you want to post a followup via groups.google.c om, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell. org/google/>
Also see <http://www.safalra.com/special/googlegroupsrep ly/>
May 2 '06 #168
we******@gmail. com writes:
Ben Pfaff wrote:
No. I mean that some string operations can be expressed shorter
and with more clarity in Perl than in C. No new string library will change
this.


That's a pretty wishy washy premise on which to base an implied
disapproval of Bstrlib. Let me just guess that you haven't really
seriously taken a look at it.


I've never looked at Bstrlib, so I have no comments specifically
about it. But I believe that my statement holds in general.
--
Ben Pfaff
email: bl*@cs.stanford .edu
web: http://benpfaff.org
May 2 '06 #169
Robert Latest wrote:
On 2006-04-30, jacob navia <ja***@jacob.re mcomp.fr> wrote:

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. Then they will see how
easy is to port the libc. Basically you do not port it.

And the STL is easier to port?

I think the point was you don't have to, because it is part of the
language, the compiler vendor does this.

--
Ian Collins.
May 2 '06 #170

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
9752
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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...
0
10684
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
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
10371
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
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...
3
3188
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.