473,732 Members | 2,201 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Function Name Mungling

In my opinion, C not mungling its function names imposes unnecessary
complexity on C++, requiring extern 'C' { ... } everywhere in headers.

I believe that in the next version of the ISO standard, C should move to
mungling its function names consistently with C++ to improve
interoperabilit y. Acutally this should have happened long ago.

Regards,
Jim

Jan 6 '08
13 1833
Jim Mackellan wrote:
In my opinion, C not mungling its function names imposes unnecessary
complexity on C++, requiring extern 'C' { ... } everywhere in headers.

I believe that in the next version of the ISO standard, C should move to
mungling its function names consistently with C++ to improve
interoperabilit y. Acutally this should have happened long ago.
Another thing: The fact that C's keywords cannot be used
as identifiers creates unnecessary hurdles for a Fortran-to-C
translator. I believe the next version of the Standard should
do away with keywords.

--
Eric Sosman
es*****@ieee-dot-org.invalid
Jan 6 '08 #11

"Eric Sosman" <es*****@ieee-dot-org.invalidschr eef in bericht
news:n8******** *************** *******@comcast .com...
Another thing: The fact that C's keywords cannot be used
as identifiers creates unnecessary hurdles for a Fortran-to-C
translator. I believe the next version of the Standard should
do away with keywords.
or make identifier with the same name as keywords possible :P

Jan 6 '08 #12
Eric Sosman wrote:
Jim Mackellan wrote:
>In my opinion, C not mungling its function names imposes unnecessary
complexity on C++, requiring extern 'C' { ... } everywhere in
headers. I believe that in the next version of the ISO standard, C should
move to mungling its function names consistently with C++ to improve
interoperabili ty. Acutally this should have happened long ago.

Another thing: The fact that C's keywords cannot be used
as identifiers creates unnecessary hurdles for a Fortran-to-C
translator.
That seems a minor detail, if it's even necessary for the most of the names
appearing in the C code to bear any relation to the Fortran ones. Just add a
unique suffix in those few cases. Where names must match globally, it's
necessary to use the same scheme throughout (but how many global names will
be C keywords?).

Probably clashing with C library names is more likely.

Anyway does Fortran still use upper case? Then there's no problem.

Bart
Jan 6 '08 #13
Eric Sosman <es*****@ieee-dot-org.invalidwrot e:
# Jim Mackellan wrote:
# In my opinion, C not mungling its function names imposes unnecessary
# complexity on C++, requiring extern 'C' { ... } everywhere in headers.
# >
# I believe that in the next version of the ISO standard, C should move to
# mungling its function names consistently with C++ to improve
# interoperabilit y. Acutally this should have happened long ago.
#
# Another thing: The fact that C's keywords cannot be used
# as identifiers creates unnecessary hurdles for a Fortran-to-C
# translator. I believe the next version of the Standard should
# do away with keywords.

This was done in PL/1 which only had reserved words in the
48 character sources.

--
SM Ryan http://www.rawbw.com/~wyrmwif/
She broke your heart and inadvertently drove men to deviant lifestyles.
Jan 6 '08 #14

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

Similar topics

8
2797
by: Nick Coghlan | last post by:
Time for another random syntax idea. . . So, I was tinkering in the interactive interpreter, and came up with the following one-size-fits-most default argument hack: Py> x = 1 Py> def _build_used(): .... y = x + 1 .... return x, y ....
0
1401
by: schaf | last post by:
Hi ! I'm writing a new xsl:function, which uses two other functions. But by the call of the first function, it would be abort just after the call. Not even the xsl:param would be set. I don't have any idea, why this works like this. Could you please help me ? Here my xsl-code: <xsl:function name="rsh:bestanden">
6
2741
by: marcelf3 | last post by:
Hello.. This page opens a window with some information, but everytime the user changes a field in the parent window, the child window needs to be closed. These 2 functions were supposed to do the work. Nota() - opens new window. fechaNota() - closes the window opened by Nota() here is the code.
12
7009
by: Susan Cranford | last post by:
Please forgive, I have looked at so much info I can't figure out how to put it together even though I know it must be fairly simple. I have an array of input text boxes (txtDOBn) where n is created at load. On the onchange event I want to calc the age and show in adjacent input text boxes that are readonly and also arrays (an age calced for each DOB entered). I was going to use the datediff function in vbscript to do the calc. Can...
6
4409
by: Bill Rubin | last post by:
The following code snippet shows that VC++ 7.1 correctly compiles a static member function invocation from an Unrelated class, since this static member function is public. I expected to compile the same invocation from a DistantlyRelated class. What actually happened was that the compiler produced: error C2247: 'A::function' not accessible because 'CloselyRelated' uses 'private' to inherit from 'A' I'm guessing that the above compiler...
4
2914
by: poojak | last post by:
I have write two different js function in a external file. one function write a table (I used innerHTML for this.) and another function is for showing/ hideing some rows depending on radio button selection. Both of these function works properly when used in HTML file, but when I use same showhide function in a table which is created by Javascript that function doesn't work at all. I am copying both JS functions here also, If someone can solve...
6
41078
by: Maguila007 | last post by:
Hi Is there any way to obtain the name of the function, inside the function which was called. Ex: function something() { alert( "The name of the function you invoke is " ......should
2
3172
by: shivendravikramsingh | last post by:
hi friends, i m using a ajax function for retrieving some values from a database table,and display the values in required field,my prob is that the ajax function i m using is working f9 once,but if i change something in php file using in ajax function.it not refreshed,means its shows the previous result it not get updated.i can't understand whats the prob.this is the code i m using: <? include("config.inc.php"); //error_reporting(0); ...
2
6159
by: WGW | last post by:
Hello all, I need another set of eyes cause it just isn't working, no matter how identical I make it. The initRotator function works when called by itself, but when adding another function, only the "other function" works, not the initRotator function. Here's some examples of what I've tried 1st Example using the 2 functions on body tag: <head> <script src="css/dw_rotator.js" type="text/javascript"></script> <script...
0
8774
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
9447
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
9307
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
9235
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
6031
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
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
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.