Re: ISA-independent programming language
- From: "Hank Oredson" <horedson@xxxxxxxxxxxxx>
- Date: Wed, 17 Aug 2005 04:01:04 GMT
"Michel Hack" <hack@xxxxxxxxxxxxxx> wrote in message
news:1124218524.621766.99450@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> Hank Oredson wrote:
>
>> > - arithmetic is two's complement
>>
>> It doesn't matter, the compiler takes care of it.
>> A number is a number.
>> It must have a defined range, whether there are one
>> or two representations for zero should not matter to me.
>>
>> > - the sizes of variables are uniquely defined by the programming
>> > language
>>
>> It doesn't matter, the compiler takes care of it.
>> Why should I care what size they are?
>>
>> > - variables are stored in memory in little-endian format
>>
>> It doesn't matter, the compiler takes care of it.
>> The compiler should not allow you to see this detail.
>> The use of aliases, casts and unions to expose such details
>> should be avoided.
>
> [etc.]
>
> Interesting discussion of desirable properties for a CLOSED
> ENVIRONMENT.
Any language is a "CLOSED ENVIRONMENT."
> If this environment is to communicate with the outside world, it also
> needs a mechanism to define an external format for its data, one where
> the representation is of course of critical importance.
Of course. The compiler must deal with this.
> Even if the environment only wanted to communicate with itself, it
> would
> need some defined external storage representation, if only to support
> one
> version to talk to the next one. But who wants a programming language
> that cannot communicate with the outside world? Surely you want users
> to
> provide input data or files, and the only way a program can document
> what
> values it accepts is for the language to give it access to the relevant
> constraints. Sometimes the only constraint is physical resources, and
> if
> those are exhausted, the program is allowed simply to die, or to report
> that
> it ran out of resources and could not handle a request. Many languages
> with
> a-priori unbounded integer or rational precision, or with symbolic
> evaluation
> capabilities, can be like that. Most programming languages have
> constrained
> datum types however, and in that case the constraints must be explicit.
You state the obvious requirements on the language.
> A totally different paradigm presents itself when the purpose of the
> program
> is to communicate with somebody else -- e.g. when one wants to program
> that
> interface to an external format. In this case one wants
> fully-specified
> types, and compiler warnings if those types are unavailable or
> uneconomical
> on a particular platform.
Again, you state the obvious.
> Languages that try to do both experience a severe tension between
> conflicting
> type requirements -- witness the horrible zoo of C integer types, and
> the
> tension between implicit types like "int", "short", "long" and explicit
> types
> like int_32 -- and this does not even address issues like Endianness or
> bit
> fields.
Oh my. Life is hard. The language in question is not C.
> For my part, I prefer to code in assembler -- true WYSIWYG programming,
> at
> least for the platforms I use. (I know that there are "smart"
> assemblers out
> there that can be just as pernicious as High-Level language compilers.)
So you agree ... such a language is possible: pointers and ISA independent.
You might not use it, I might not use it, but creating one is simple.
--
... Hank
http://home.earthlink.net/~horedson
http://home.earthlink.net/~w0rli
.
- References:
- ISA-independent programming language
- From: mihai cartoaje
- Re: ISA-independent programming language
- From: Hank Oredson
- Re: ISA-independent programming language
- From: Michel Hack
- ISA-independent programming language
- Prev by Date: Re: ISA-independent programming language
- Next by Date: Re: Non Power of 2 Cache Sizes
- Previous by thread: Re: ISA-independent programming language
- Next by thread: Re: ISA-independent programming language
- Index(es):
Relevant Pages
|