From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.ada Subject: Re: Ada->Javascript? Date: Tue, 20 Jan 2015 14:33:20 -0800 Organization: A noiseless patient Spider Message-ID: <87y4ox9j67.fsf@jester.gateway.sonic.net> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="9be1734e45595b2e29ecbdd3ce926380"; logging-data="22502"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+1ra1I+Jov1s0zurcHUZpv" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:rPqzpQVnEJFe4PxdrYuy1KVH0yc= sha1:Qjre2BhQAF2X2SbDnfrSME/dWog= Xref: news.eternal-september.org comp.lang.ada:24650 Date: 2015-01-20T14:33:20-08:00 List-Id: tmoran@acm.org writes: > Does there exist any kind of Ada to Javascript translator? Even > something that took compilable, but not runnable, simple Ada to > Javascript. Having an Ada compiler check for typos, type errors, etc, > and handle enumeration types, non-zero array'first, etc etc would be a > great help. In principle you could do this with an Ada-to-C translator (several exist) followed by Emscripten. If the idea is just to get a strongly typed language to run in the browser though, there are much better alternatives. I've been looking at Purescript (purescript.org) which is Haskell-like, while others like Dart are a bit more mainstream. The thing to keep in mind is that Javascript is a managed, garbage collected language, a design that trades off real-time and bounded-memory capabilities for a lot more programming convenience. An Ada front end would give up the convenience without getting the Ada capabilities back. So something like Purescript is a better match.