Re: Implementation dependent behaviour (WAS: Re: Programming language and IDE design)

Martin Ward <martin@gkc.org.uk>
Mon, 6 Jan 2014 19:32:31 +0000

          From comp.compilers

Related articles
Implementation dependent behaviour (WAS: Re: Programming language and martin@gkc.org.uk (Martin Ward) (2013-11-20)
Re: Implementation dependent behaviour (WAS: Re: Programming language Pidgeot18@verizon.net (=?UTF-8?B?Sm9zaHVhIENyYW5tZXIg8J+Qpw==?=) (2013-11-23)
Re: Implementation dependent behaviour (WAS: Re: Programming language gah@ugcs.caltech.edu (glen herrmannsfeldt) (2013-11-24)
Re: Implementation dependent behaviour (WAS: Re: Programming language kaz@kylheku.com (Kaz Kylheku) (2013-12-17)
Re: Implementation dependent behaviour (WAS: Re: Programming language martin@gkc.org.uk (Martin Ward) (2014-01-06)
Re: Implementation dependent behaviour (WAS: Re: Programming language martin@gkc.org.uk (Martin Ward) (2014-01-06)
Re: Implementation dependent behaviour (WAS: Re: Programming language ivan@ootbcomp.com (Ivan Godard) (2014-01-08)
Re: Implementation dependent behaviour (WAS: Re: Programming language kaz@kylheku.com (Kaz Kylheku) (2014-01-08)
Re: Implementation dependent behaviour (WAS: Re: Programming language ivan@ootbcomp.com (Ivan Godard) (2014-01-10)
Re: Implementation dependent behaviour (WAS: Re: Programming language gah@ugcs.caltech.edu (glen herrmannsfeldt) (2014-01-10)
Re: Implementation dependent behaviour (WAS: Re: Programming language ivan@ootbcomp.com (Ivan Godard) (2014-01-13)
Re: Implementation dependent behaviour (WAS: Re: Programming language anton@mips.complang.tuwien.ac.at (2014-01-14)
| List of all articles for this month |

From: Martin Ward <martin@gkc.org.uk>
Newsgroups: comp.compilers
Date: Mon, 6 Jan 2014 19:32:31 +0000
Organization: Compilers Central
References: 13-11-025 13-12-009
Keywords: design
Posted-Date: 08 Jan 2014 00:55:52 EST

On Tuesday 17 Dec 2013 at 23:07, Kaz Kylheku <kaz@kylheku.com> wrote:
> Since highly portable programs that produce bit-exact results on multiple
> platforms can be written in languages that have implementation-defined
> behaviors, there is no reason why languages cannot themselves provide this,
> at least with regard to their internal data structures.
>
> There are practical concerns that stand in the way, at least one of
> which is damning of the idea, however.


Kaz gives two examples, the first is floating point, which I have
already discussed.


The second is operating system interfacing: specifically text file
representations. Here, the issue is that the program is not operating
on a set of bits but on a higher-level structure called a "text file".
The same program should produce identical text files on any operating
system (with any version of the compiler). The exact representation of
the text file in each operating system is a different issue. This
means than on opening a file the language needs to specify whether
this is a binary or text file (or a file containing some other type of
data) and if it is text. what encoding to use (ASCII, Unicode, EBCDIC
etc.)


This means that the same program should generate the same text file
(which may well be a different binary file) on an ASCII or EBCDIC
system, for example.
--
Martin


Dr Martin Ward STRL Principal Lecturer and Reader in Software Engineering
martin@gkc.org.uk http://www.cse.dmu.ac.uk/~mward/ Erdos number: 4
G.K.Chesterton web site: http://www.cse.dmu.ac.uk/~mward/gkc/
Mirrors: http://www.gkc.org.uk and http://www.gkc.org.uk/gkc


Post a followup to this message

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