473,750 Members | 2,202 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C++ improvements: core and user properties, default compiler

To continue some ideas of "C++ Archeology: Limits of OO paradigm", i want
to ask about C++ development.

There are C++ compilers, that has been written in old good C. Are C or
pascal perfect languages that can be used to build any powerful OO
language with mutable source representation, as C++ could be? Obviously
no.

Is current C++ can be used to build the OO language? Obviously no, because
unfortunatelly C++ simultaneously is not-trivial for implementation, but
quite limited for users.

I have got a hint, that we can select "core of C++" (that does not mean
the core must be completely compatible with current C++ or its subset) and
use the not-mutable core language to build all concrete-hardware "complete
C++" compilers. The "complete C++" language can be the powerful OO
language with mutable source representation, structured by dialects.

The core language properties must be:
- compiler of the core must be able to be easy implemented by C-like
language
- the core must be very conservative (to resists all possible
improvements)
- the core must be suitable to express complete C++ compiler

The related questions are:
- what kind (enumerated set of properties) of language must we take for
core compiler?
- what set of properties and paradigms (in comparison with current C++)
must be supported by the core language?

The complete language can have "default compiler" - the thing with the
follow properties:
- public source code in terms of "core language"
- very slow, but pure incremental
- very easy to be extended by users with new dialects

The "default compiler" can be represented as:
- front-end translator from any concrete representation of "C++ source" to
concrete unified "internal (not for human using) representation"
- front-end compiler and logical optimiser from "internal representation"
to "code generator source code"
- code generator and hardware optimiser from "code generator source code"
to "compiled representation"
- C++ uints linker from "compiled representation"
- traditional static linker -//-
- C++ dynamic linker -//-
- traditional dynamic linker -//-

The related questions are:
- what (enumerated set of properties) is
- unified "internal (not for human using) representation"
- "code generator source code"
- "compiled representation"

Pure logical optimiser can be impossible to implement, so logical and
hardware optimisers can be implemented as separated, but related to the
concrete hardware pair for each concrete hardware

So, what can you advise about all of these?

Maksim A. Polyanin
http://grizlyk1.narod.ru/cpp_new
--
Message posted using http://www.talkaboutprogramming.com/...comp.lang.c++/
More information at http://www.talkaboutprogramming.com/faq.html

Feb 23 '08 #1
8 1918
co**@mailvault. com wrote:
>There are C++ compilers, that has been written
in old good C. Are C or pascal perfect
languages that can be used to build any
powerful OO language with mutable source
representation , as C++ could be?
Obviously no.

This is a problem with the gnu stuff.
No, i am not speaking about gnu stuff. Limitations here can be explained
by nature of programming language - nature of supported paradigms.

It is hard to write mutable results in languages, that has no enough
abstraction.

Maksim A. Polyanin
http://grizlyk1.narod.ru/cpp_new
--
Message posted using http://www.talkaboutprogramming.com/...comp.lang.c++/
More information at http://www.talkaboutprogramming.com/faq.html

Feb 25 '08 #2
Mattias wrote:
>What do you mean by "mutable results"?
Read first message of the thread.

By the way, it seems to me, the first message is an example of questions
of OO conceptual level decomposition of the C++ domain and i asked experts
of C++ compilers who can describe the domain.
C++ compiler can be written in C
Have _you_ done it already?

Maksim A. Polyanin
http://grizlyk1.narod.ru/cpp_new

--
Message posted using http://www.talkaboutprogramming.com/...comp.lang.c++/
More information at http://www.talkaboutprogramming.com/faq.html

Feb 27 '08 #3
Grizlyk wrote:
>What do you mean by "mutable results"?

Read first message of the thread.
I did before responding. The term "mutable result(s)" doesn't appear in
there. What does appear is "mutable source representation" but I have no
idea what this is supposed to mean.
What exactly is your question?
By the way, it seems to me, the first message is an example of questions
of OO conceptual level decomposition of the C++ domain and i asked experts
of C++ compilers who can describe the domain.
It sounds more like gibberish to me, sorry.
>C++ compiler can be written in C
Have _you_ done it already?
I don't have to.
Feb 27 '08 #4
Grizlyk wrote:
>>>C++ compiler can be written in C
Have _you_ done it already?
I don't have to.

The "have to" is wrong modal verb maybe? If you say "can be written", you
can prove it by anything, can't you?
The g++ (Gnu) compiler is written in C. Probably some others too.
Feb 27 '08 #5
LR
Grizlyk wrote:
Mattias wrote:
>C++ compiler can be written in C

Have _you_ done it already?

I'm sorry, but I don't understand the point of this question. No matter
the language of the compiler, the compiler is compiled too, and runs in
machine language.

And I think that it is well established that any task that can be
performed by a particular Turing complete language can be performed by
any Turing complete language.

Am I mistaken?

Do you think there is some requirement for C++ that requires something
special in the language used to implement it? What in particular?

LR
Feb 27 '08 #6
LR wrote:
I'm sorry, but I don't understand the point of this question. No matter
the language of the compiler, the compiler is compiled too, and runs in
machine language.

And I think that it is well established that any task that can be
performed by a particular Turing complete language can be performed by
any Turing complete language.

Am I mistaken?
This doesn't take anything away from the point you're making, but it
seemed worth pointing out that this is only true in the context of
Turing machines. C and sed are both Turing-complete; but you can't open
a network socket in sed*. :)

*Ignoring silly things like using the "r" command to open a device file
that opens a network connection, or using sed to drive a program through
a pipe to do so.

Of course, only someone who has neither written nor studied any sort of
compilers could believe that a language such as C would not be capable
of handling a compiler for the complete C++ language.

Grizlyk's arguments would make _somewhat_ more sense if the argument
were whether you could write a program to translate C++ into C programs
with identical functionality, though even there phe'd be wrong. In fact,
I believe Comeau Computing has just such a beast (and, of course, C++
was originally implemented via a compiler-to-C, though the language back
then was not nearly as complex).

If I were planning to write a C++ implementation, writing it in C would
be something I'd strongly consider, in no small part because (old)
standards-conformant C implementations still appear to be more plentiful
than C++ implementations , and because even if I chose to write it in
C++, I might choose to avoid many of the most advantageous pieces of the
C++ Standard Library, as I might not be able to depend on their having
been implemented as optimally as I might wish.

Of course, writing in C++ would have the advantage that I could then
bootstrap my implementation, which is a terrific, "eating your own
dogfood" way to test it. :)

--
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/
Feb 27 '08 #7
Micah Cowan wrote:
LR wrote:
>I'm sorry, but I don't understand the point of this question. No
matter the language of the compiler, the compiler is compiled too,
and runs in machine language.

And I think that it is well established that any task that can be
performed by a particular Turing complete language can be
performed by any Turing complete language.

Am I mistaken?

This doesn't take anything away from the point you're making, but it
seemed worth pointing out that this is only true in the context of
Turing machines. C and sed are both Turing-complete; but you can't
open a network socket in sed*. :)

*Ignoring silly things like using the "r" command to open a device
file that opens a network connection, or using sed to drive a
program through a pipe to do so.

Of course, only someone who has neither written nor studied any
sort of compilers could believe that a language such as C would not
be capable of handling a compiler for the complete C++ language.

Grizlyk's arguments would make _somewhat_ more sense if the argument
were whether you could write a program to translate C++ into C
programs with identical functionality, though even there phe'd be
wrong. In fact, I believe Comeau Computing has just such a beast
(and, of course, C++ was originally implemented via a
compiler-to-C,
Which was, of course, written in C++.

http://www.research.att.com/~bs/bs_f...#bootstrapping
though the language back then was not nearly as
complex).

If I were planning to write a C++ implementation, writing it in C
would be something I'd strongly consider, in no small part because
(old) standards-conformant C implementations still appear to be
more plentiful than C++ implementations , and because even if I
chose to write it in C++, I might choose to avoid many of the most
advantageous pieces of the C++ Standard Library, as I might not be
able to depend on their having been implemented as optimally as I
might wish.
Hey, if you write your own C++ compiler, you will of course have the
best Standard Library implementation as well. Just write that one
first!
>
Of course, writing in C++ would have the advantage that I could then
bootstrap my implementation, which is a terrific, "eating your own
dogfood" way to test it. :)
See! :-)
Bo Persson
Feb 28 '08 #8
Let's return to OP questions. Of course, at last, I will do it myself, but
conditions, selected by me, could be incomplete.

I hope, one can see by the thread why i have written once, that we must
strictly divide C++ and STDLib. This is _really_ different things and the
things have really different experts.

Maksim A. Polyanin
http://grizlyk1.narod.ru/cpp_new
--
Message posted using http://www.talkaboutprogramming.com/...comp.lang.c++/
More information at http://www.talkaboutprogramming.com/faq.html

Mar 1 '08 #9

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

Similar topics

4
3847
by: Logan | last post by:
Several people asked me for the following HOWTO, so I decided to post it here (though it is still very 'alpha' and might contain many (?) mistakes; didn't test what I wrote, but wrote it - more or less - during my own installation of Python 2.3 on Fedora Core 1 Linux for a friend of mine). Anyway, HTH, L.
23
2223
by: Rotem | last post by:
Hi, while working on something in my current project I have made several improvements to the logging package in Python, two of them are worth mentioning: 1. addition of a logging record field %(function)s, which results in the name of the entity which logged the record. My version even deduces the class name in the case which the logger is a bound method, and assuming the name of the "self" variable is indeed "self".
6
11299
by: martin | last post by:
Hi, I am a web page and a web user control. My web user control is placed in my web page using the following directive <%@ Register TagPrefix="uc1" TagName="Header" Src="WebControls/Header.ascx" %> The web user control contains the following server controls
7
2440
by: Bit Twiddler | last post by:
Hi, I have a windows form app which would benefit from the new application settings support in VS2005. Say that my form has a single textbox on it. When the form closes I would like to save the text in that textbox as part as the user level application settings. When the application restarts I would like that text to be restored to the textbox.
6
1720
by: wenmang | last post by:
Here is the code which causes core dump when is built differently, 1 for regular dev built, the other for packaging build. class my_class{ public: my_class(){}; ~my_class(){}; private: string myData1;
15
2959
by: John Nagle | last post by:
I've been installing Python and its supporting packages on a dedicated server with Fedora Core 6 for about a day now. This is a standard dedicated rackmount server in a colocation facility, controlled via Plesk control panel, and turned over to me with Fedora Core 6 in an empty state. This is the standard way you get a server in a colo today. Bringing Python up in this completely clean environment is a huge hassle, and it doesn't...
16
1411
by: arnuld | last post by:
/* C++ Primer 4/e * section 3.2 - String Standard Library * exercise 3.8 * STATEMENT * write a programme to read strings from standard input, concatenate all of them * in one string where each input string is seperated by whitespace and then print it. */ #include <iostream>
71
3342
by: Jack | last post by:
I understand that the standard Python distribution is considered the C-Python. Howerver, the current C-Python is really a combination of C and Python implementation. There are about 2000 Python files included in the Windows version of Python distribution. I'm not sure how much of the C-Python is implemented in C but I think the more modules implemented in C, the better performance and lower memory footprint it will get. I wonder if it's...
5
5835
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
Prior to C# 3.0, I would typically define a property of a custom user control with pattern A: === PATTERN A ========== private bool myBool = true; public bool MyBool { get { return myBool; } set { myBool = value; } } ======================
0
8836
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
9575
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
9394
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...
0
9256
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
8260
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...
0
6080
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
4712
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...
1
3322
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
3
2223
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.