Re: ISA-independent programming language



"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


.



Relevant Pages

  • Re: any regex gurus out there?
    ... > No matter what number or combination of backslashes I used it didn't work. ... - The compiler wouldn't take it otherwise. ... or escape each backslash with a backslash, ... > French language, the letter A may have three different accents. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: ISA-independent programming language
    ... the compiler takes care of it. ... But who wants a programming language ...
    (comp.arch)
  • Re: ISA-independent programming language
    ... the compiler takes care of it. ... >>>or two representations for zero should not matter to me. ... if the language supports bitwise operations on integers. ...
    (comp.arch)
  • Re: c / c++ : is it end of era ?
    ... Only "conscious design decisions", like trigraphs... ... the rules of the language itself, that is not the fault of the ... You are also free to use a compiler for something other than ... LESS to care about ...
    (comp.lang.c)
  • Re: ISA-independent programming language
    ... >>I believe it is possible for a programming language to have pointers, ... the compiler takes care of it. ...
    (comp.arch)