Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #1071

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

From Martin Ward <martin@gkc.org.uk>
Newsgroups comp.compilers
Subject Re: Implementation dependent behaviour (WAS: Re: Programming language and IDE design)
Date 2014-01-06 19:32 +0000
Organization Compilers Central
Message-ID <14-01-004@comp.compilers> (permalink)
References <13-11-025@comp.compilers> <13-12-009@comp.compilers>

Show all headers | View raw


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

Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Implementation dependent behaviour (WAS: Re: Programming language and IDE design) Martin Ward <martin@gkc.org.uk> - 2013-11-20 10:29 +0000
  Re: Implementation dependent behaviour (WAS: Re: Programming language and IDE design) Joshua Cranmer 🐧 <Pidgeot18@verizon.net> - 2013-11-23 01:06 -0600
    Re: Implementation dependent behaviour (WAS: Re: Programming language and IDE design) glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2013-11-24 21:51 +0000
    Re: Implementation dependent behaviour (WAS: Re: Programming language and IDE design) Martin Ward <martin@gkc.org.uk> - 2014-01-06 19:23 +0000
  Re: Implementation dependent behaviour (WAS: Re: Programming language and IDE design) Kaz Kylheku <kaz@kylheku.com> - 2013-12-17 23:07 +0000
    Re: Implementation dependent behaviour (WAS: Re: Programming language and IDE design) Martin Ward <martin@gkc.org.uk> - 2014-01-06 19:32 +0000
  Re: Implementation dependent behaviour (WAS: Re: Programming language and IDE design) Ivan Godard <ivan@ootbcomp.com> - 2014-01-08 09:02 -0800
    Re: Implementation dependent behaviour (WAS: Re: Programming language and IDE design) Kaz Kylheku <kaz@kylheku.com> - 2014-01-08 18:21 +0000
      Re: Implementation dependent behaviour (WAS: Re: Programming language and IDE design) Ivan Godard <ivan@ootbcomp.com> - 2014-01-10 09:11 -0800
      Re: Implementation dependent behaviour (WAS: Re: Programming language and IDE design) glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2014-01-10 23:08 +0000
        Re: Implementation dependent behaviour (WAS: Re: Programming language and IDE design) Ivan Godard <ivan@ootbcomp.com> - 2014-01-13 12:47 -0800
        Re: Implementation dependent behaviour (WAS: Re: Programming language and IDE design) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-01-14 14:16 +0000

csiph-web