Re: HLL design

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
21 Oct 2006 13:56:29 -0400

          From comp.compilers

Related articles
HLL design free4trample@yahoo.com (fermineutron) (2006-10-21)
Re: HLL design gah@ugcs.caltech.edu (glen herrmannsfeldt) (2006-10-21)
Re: HLL design pjb@informatimago.com (Pascal Bourguignon) (2006-10-21)
Re: HLL design DrDiettrich1@aol.com (Hans-Peter Diettrich) (2006-10-21)
Re: HLL design mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2006-10-21)
Re: HLL design int2k@gmx.net (Wolfram Fenske) (2006-10-21)
Re: HLL design DrDiettrich1@aol.com (Hans-Peter Diettrich) (2006-10-21)
Re: HLL design free4trample@yahoo.com (fermineutron) (2006-10-21)
Re: HLL design danwang74@gmail.com (Daniel C. Wang) (2006-10-24)
Re: HLL design idknow@gmail.com (idknow@gmail.com) (2006-10-24)
Re: HLL design bjarke.walling@gmail.com (Bjarke Walling) (2006-10-24)
[3 later articles]
| List of all articles for this month |

From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Newsgroups: comp.compilers
Date: 21 Oct 2006 13:56:29 -0400
Organization: cbb software GmbH
References: 06-10-080
Keywords: design, performance
Posted-Date: 21 Oct 2006 13:56:29 EDT

On 21 Oct 2006 02:27:47 -0400, fermineutron wrote:


> This is somewhat of a theoretical question for the experts here. Most
> of easy to use languages are too slow for any serious computing while
> the languages like C and assembly are somewhat of a pain to use. The
> key issues that i identyfy as pain include but not limited to,
> variable declaration array boundary checking, strict data types
> etc. Most can be solved by using extended variables that carry key
> information about the data in the variable within the variable, for
> example using the 1st byte to designate the data type of a variable,
> int, float double etc. using second byte to designate the number of
> dimensions in the variable lets say its N, then using N 4-byte
> integers to store dimension sizes, and this header is followed by the
> data itself.
>
> Now my question is:
>
> Assuming that the system that is to work with such variables is
> inteligently designed, do you think it will be significantly slower
> than C?


There is no reason why it should be slower.


What you describe is the concept constrained objects. The array ranges
is a constraint put on an unconstrained array. The type tag is a
constraint put on a polymorphic object, which determines its specific
type (for example vtab_ptr in C++). When all constraints are known at
compile time, the object is said to be constrained. When some of them
are not, then the object is unconstrained. If you know the constraints
of a set of objects, they form a constrained subtype. Important is
that for constrained subtypes you don't need to keep / query /
evaluate constraints at run-time. Which technically means that you
loose neither space nor performance. What you need is to change the
object representation depending on the constraints. The simplest form
of this is to remove known constraints. More elaborated variants could
go further. The price to pay is loosing by-reference parameter passing
in some cases.


> I am thinking about starting a project to write such a language, but
> before i imbark of such a great crusade i want to hear what people who
> are by far more experienced than me have to say about it?


I would recommend you to study Ada design, which deploys this model.


--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.