Return-Path: X-Original-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E0B4D9E9C for ; Sun, 19 Feb 2012 21:46:51 +0000 (UTC) Received: (qmail 72940 invoked by uid 500); 19 Feb 2012 21:46:51 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 72915 invoked by uid 500); 19 Feb 2012 21:46:51 -0000 Mailing-List: contact flex-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: flex-dev@incubator.apache.org Delivered-To: mailing list flex-dev@incubator.apache.org Received: (qmail 72907 invoked by uid 99); 19 Feb 2012 21:46:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 Feb 2012 21:46:51 +0000 X-ASF-Spam-Status: No, hits=0.3 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of david@davidarno.org does not designate 74.125.82.41 as permitted sender) Received: from [74.125.82.41] (HELO mail-ww0-f41.google.com) (74.125.82.41) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 Feb 2012 21:46:45 +0000 Received: by wgbdt11 with SMTP id dt11so3212919wgb.0 for ; Sun, 19 Feb 2012 13:46:23 -0800 (PST) Received-SPF: pass (google.com: domain of david@davidarno.org designates 10.180.78.98 as permitted sender) client-ip=10.180.78.98; Authentication-Results: mr.google.com; spf=pass (google.com: domain of david@davidarno.org designates 10.180.78.98 as permitted sender) smtp.mail=david@davidarno.org Received: from mr.google.com ([10.180.78.98]) by 10.180.78.98 with SMTP id a2mr12189426wix.17.1329687983875 (num_hops = 1); Sun, 19 Feb 2012 13:46:23 -0800 (PST) Received: by 10.180.78.98 with SMTP id a2mr10209044wix.17.1329687983811; Sun, 19 Feb 2012 13:46:23 -0800 (PST) Received: from [192.168.1.134] (188-220-92-24.zone11.bethere.co.uk. [188.220.92.24]) by mx.google.com with ESMTPS id er8sm29952303wib.1.2012.02.19.13.46.22 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 19 Feb 2012 13:46:22 -0800 (PST) Message-ID: <1329687982.3272.39.camel@lapsang> Subject: [gosh] Goshhawk language choices and more [Was: Adobe / Apache / Spoon Flex Tour] From: David Arno To: flex-dev@incubator.apache.org Date: Sun, 19 Feb 2012 21:46:22 +0000 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.2- Content-Transfer-Encoding: 7bit Mime-Version: 1.0 X-Gm-Message-State: ALoCoQm1pDWdqzSgbQi+SMp7jZFs8HV11qhEdQjNgGEeb3R9RgUDMAXYh+TXz7BSvGKfwY4rGwyj On Sat, 2012-02-18 at 21:48 +0200, Left Right wrote: > First of all. Why Java (JVM)? The JVM gives us many advantages: 1. Java - which whilst long in the tooth is well known and well supported and - a point that is difficult to overstate - its the language that Flash Builder and FDT and IntelliJ are all written in. Dismissing Java as "corporative neo-COBOL" is a little silly. 2. It offers easy-cross platform support. Making something that runs on Windows and Linux and OS X, without caring about the target OS, is very easy with JVM-targeted languages. 3. It's a fast, universally available, well supported, will understood managed memory environment. Sure it has disadvantages (the seriously crap need to tell the application how much maximum memory its allowed to use via obscure command line options being the worst in my view,) but I'd contend that the benefits outweigh those disadvantages. However, if you think that people with no interest in Flex will come flooding on to this project to help write a compiler if we propose writing it in in a technology that doesn't target the JVM, then I'm more than happy to go with a different language. > Go - the Fortran-like (or, if you prefer, C-like) language. A kind of an > effort to fix long-standing Java problems. It is not an ideal language, but > it is a good replacement for Java for people who grew on Java. What benefits exactly would Go offer? How many compilers have been written in Go? Surely Go is just one of Google's many many projects that they frequently throw at the wall to see which stick. Go didn't stick as far as I know. > Haskell - a beautiful language! Bonus points, it has developed tools for > parsing code using formal grammar. It might be beautiful if you have a degree in maths. To most programmers, it's incomprehensible gibberish :p By all means feel free to write a Haskell-based compiler, but count me out if you do. Life is too short for me to waste it on a language so complex, no one seems to be able to explain what a monad is in less than a one hour talk... > C - no-bullcrap, plain old C if you want to squeeze the last bit of > performance. Ha ha. This made me laugh. You call Java a Cobol-like language, then drag up a language I used to have to write on VT100's some 25 years ago! :) Seriously, C should be a language of last-resort. It's really not very nice. > Common Lisp (One (day (we (may (all (have (to (learn (to (use (Lisp (but (until (then (I'd (prefer (to (pretend (it (died (40 (years (ago, (buried (under (its (own (insane (syntax))))))))))))))))))))))))))))) > Any variant of ML/Miranda-like language (be it CaML or Erlang, I've > mentioned Haskell already) simply because you have a very good compiler > implemented in CaML (HaXe, which is very similar to AS), and you could've > borrowed certain ideas from it. haXe is written in OCaML. As a result, one person maintains the compiler, because no one else knows it... > AS3 per se has no formal grammar definition,... I reckon http://svn.badgers-in-foil.co.uk/metaas/trunk/src/main/antlr/org/asdt/core/internal/antlr/AS3.g would form at least a good starting point for this non-existent formal grammar. > JavaScript related stuff - first of all why bother? :) Because we don't have any choice. Whilst it is a huge pile of steaming shit, and I'd love to punch Brendan Eich in the face for being so proud of inflicting such an awful mess upon humanity, it's here to stay and is the future of programming for the foreseeable future. > Alright, that's just > my opinion. But wouldn't it be better to generate some common intermediate > language, Yes, that's why I suggested the front-end and back-end separation of Goshawk. The front-end will be written using something like ANTLR and so will be programming-language agnostic. It will save its results as lib files, which will be target-agnostic. The back-ends then can take that common form and turn it into target-specific output. We can't use something like LLVM though as we are not simply creating a language compiler: we are creating a framework compiler. We can't just compiler AS3 code to JavaScript, for we need to handle rendering in a language-specific fashion. JavaScript for example will likely need skin "classes" written directly in JavaScript that need to be stitched in to the output by the JavaScript back-end. > SWC - is not only a code repository, it's essentially a way to store > whatever you might have in the project. I think it would be wise to reuse > this idea. I think you are wrong. SWC's are just SWF's wrapped up in a ZIP file. They are target-specific and thus next-to useless to a multi-target compiler solution. If people really want Goshawk to output SWC's, then it will happen. I just think it's a short-sighted idea. > Static analysis - will the new compiler be an optimizing compiler? That will depend on the back-end. Each target will likely want optimising in different ways, so it will be up to each target-specific back-end to optimise as required. The front-end of course will do no optimisation at all. David.