comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP>
Subject: Re: Five Years After
Date: Wed, 24 Jan 2018 19:06:50 -0000 (UTC)
Date: 2018-01-24T19:06:50+00:00	[thread overview]
Message-ID: <p4alg9$ec0$1@dont-email.me> (raw)
In-Reply-To: e3955ef4-6ddb-4fd2-96c3-1a0ee5b69f43@googlegroups.com

On 2018-01-24, Shark8 <onewingedshark@gmail.com> wrote:
> On Wednesday, January 24, 2018 at 8:12:51 AM UTC-7, Mehdi Saada wrote:
>> > There's serious potential for a good small language that could serve
>> > as an easily implemented C language replacement. It's possible that
>> > a subset of Ada with just the core features implemented and hence
>> > without vast amounts of required runtime library support could
>> > serve that purpose.
>>  
>> > Think of something that had the kind of functionality of a beefed up
>> > version of Oberon with all of the Ada type safety features imported
>> > into it for example.
>> 
>> I'm a  in position to talk, and I know peanuts about Oberon, but can I ask you something... What is "core" for you ? Is tasking part of it ? Full-featured generics ? Support for exceptions or clause representations ? Class-wide programming and interfaces ? Or what do you not feel as essential ?
>> I'm sure there's a bunch others would deem essential and "core". But I am sure too, those things put together already make for a big piece of work for compiler designers.
>> Remove any of it, Ada will feel hollow... Or I just found myself a purist :-P
>> Plus, if it's only for having a safer and nicer equivalent to D or Rust, it's not worth the effort, and I doubt people will even consider.
>
> I rather agree; but if there was a small "core" replacement for C, I think it would have to be (1) representation clauses, (2) tasking, and (3) generics.

Tasking is a really big problem here - it requires a lot of RTL/OS support.

The overall goal for me would be to bring the advantages of Ada to areas
where it is not currently used for various reasons. That means a number
of practical tradeoffs need to be made.

The language is great but the compiler situation is absolutely _horrible_.

The compilers are only available for a limited number of platforms,
code written in the freely available Adacore compiler (not FSF compiler)
is subject to mandatory licencing under the GPL, and the full language
is so heavy that writing a full Ada compiler from scratch is a massive
undertaking.

There is however a small core in the Ada language that could bring
benefits elsewhere but without all the overhead of a full blown
Ada implementation.

When talking about a C replacement, you need:

1) Something that can easily generate code to run on bare metal without
OS support and on a wide range of targets in general.

2) Compilers that are easily portable to a wide range of environments.
[Note that the environment the compiler runs on may not be the same as
the environment it generates code for so this is different from 1) above.]

3) Compilers that are a lot easier to write than a current Ada compiler is.

4) The ability to write library code without the caller needing to know
that it is calling code written in Ada.

5) There must be no licence restrictions on what the user can do with
the generated code.

Notice that none of the above items talk about the language features.
They do however talk about some of the various practical reasons why
Ada is not used more than it currently is.

Oh, and about item (4). Apart from needing to call adainit/adafinal,
there's this little gem taken from:

https://gcc.gnu.org/onlinedocs/gnat_ugn/Binding-with-Non-Ada-Main-Programs.html

|Currently the GNAT run time requires a FPU using 80 bits mode precision. Under
|targets where this is not the default it is required to call
|GNAT.Float_Control.Reset before using floating point numbers (this include
|float computation, float input and output) in the Ada code. A side effect is
|that this could be the wrong mode for the foreign code where floating point
|computation could be broken after this call. 

Simon.

-- 
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980s technology to a 21st century world

  reply	other threads:[~2018-01-24 19:06 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-13 12:36 Five Years After Jeffrey R. Carter
2018-01-13 16:45 ` Jacob Sparre Andersen
2018-01-13 17:22 ` gautier_niouzes
2018-01-13 19:45 ` Nasser M. Abbasi
2018-01-13 21:15   ` Jeffrey R. Carter
2018-01-14 19:13 ` Luke A. Guest
2018-01-23  4:35   ` Robert Eachus
2018-01-23  5:23     ` Luke A. Guest
2018-01-23  6:26       ` bozovic.bojan
2018-01-24 13:16       ` Nasser M. Abbasi
2018-01-24 13:39         ` Dmitry A. Kazakov
2018-01-25  2:44           ` Randy Brukardt
2018-01-24 13:50       ` Simon Clubley
2018-01-24 13:55         ` Björn Lundin
2018-01-24 19:07           ` Simon Clubley
2018-01-24 15:12         ` Mehdi Saada
2018-01-24 16:04           ` Shark8
2018-01-24 19:06             ` Simon Clubley [this message]
2018-01-24 20:34               ` Lucretia
2018-01-25  0:29                 ` Simon Clubley
2018-01-25 20:14                   ` Lucretia
2018-01-26 21:25                 ` Shark8
2018-01-27  0:07                   ` Dennis Lee Bieber
2018-01-27  1:52                   ` Nasser M. Abbasi
2018-01-25  0:43               ` Robert Eachus
2018-01-25  2:51               ` Randy Brukardt
2018-01-24 16:05         ` Dennis Lee Bieber
2018-01-24 17:07         ` Robert Eachus
2018-01-24 18:43           ` Dennis Lee Bieber
2018-01-24 17:55         ` Jeffrey R. Carter
2018-01-24 18:44           ` Dennis Lee Bieber
2018-01-24 20:17         ` Lucretia
2018-01-25  0:14           ` Simon Clubley
2018-01-23 21:57     ` Maciej Sobczak
2018-01-24 18:14       ` G. B.
2018-01-25  3:09       ` Randy Brukardt
2018-01-25 21:09         ` Maciej Sobczak
2018-01-25 23:07           ` Robert Eachus
2018-01-26  4:28           ` Randy Brukardt
2018-01-24 20:41 ` Mehdi Saada
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox