C++, D: Dinosaurs?

Nick Sabalausky a at a.a
Tue Nov 4 14:10:40 PST 2008


"Danny Wilson" <bluezenix at gmail.com> wrote in message 
news:op.uj36sqczbmuhq1 at danny-wilsons-ep45-ds4.local...
> Op Tue, 04 Nov 2008 21:36:23 +0100 schreef Nick Sabalausky <a at a.a>:
>
>> That looks pretty good (I've come across it once before), but what I had 
>> in
>> mind was a little more universal (and perhaps, more experimental or even
>> naive ;) ). What I'm planing to experiment with is having a basic
>> compiler/translator program which accepts language plugins that describe
>> both how to parse the language and how to output it. Then the tool would 
>> go
>> something like "Input HLL -> Input AST -> Intermediate AST -> Output 
>> ST  ->
>> Output HLL". Toss in a whole bunch of language plugins and, assuming it
>> could actually be pulled off, what you'd have is something like HaXe 
>> except:
>
> Except it isn't a language anymore, but more like a complete compiler 
> framework ;-)
>

Yes, but I consider that a good thing because I view the goals of 
"create/choose a good language" and "allow an alternate language for a 
particular platform" to be separate problems that, ideally, should have 
separate (but compatible) solutions. HaXe mixes the two: it lets you choose 
an alternate language for browser-scripting, Flash, and web 
server-scripting, but only if the language you choose is the one language 
that the HaXe project provides for you.

Granted, I'm not saying HaXe is a bad thing. I'm quite tempted to use it in 
the meantime before my project actually bears any fruit (*if* it ever does), 
particularly if ASP/VBScript, ASP.NET/VB.NET, and ASP.NET/C# backends are 
ever created for it.

>
>> - ASP would be supported (important for me, a lot of clients are MS 
>> houses).
>>
>> - The programmer (or tech lead, if applicable) could chose what they
>> consider a sensible language (For instance, HaXe does look pretty good 
>> from
>> what I've seen, but I prefer C-style variable declarations over HaXe's
>> ECMAScript3/4-style declarations (though I could certainly live with 
>> them)).
>>
>> - HLLs and platforms, in general, would be much more divorced than they 
>> are
>> today. Much less chance of the choice in platform forcing/limiting your 
>> hand
>> in the choice of language. HaXe just simply gives you one extra choice, 
>> and
>> even then, only when you're targeting ECMAScript, Flash, PHP or some rare
>> system that actually has Neko.
>>
>
> Well PHP is a pretty recent addition. Someone has been working on MSIL 
> output to target .NET (and thus Silverlight aswell). Someone else has 
> announced he's working on C++ output aswell.
> The compiler is written in OCaml and very fast. Due to haXe's nature of 
> targetting different platforms, it is already setup pretty pluggable.

Good to know :)

>
> But yea I'd like some additions to haXe myself, like a stronger template 
> system (yay D!) for starters. :-)
>
>
>> - It would have a name that isn't mixed case and isn't inconsistent 
>> between
>> spelling and pronunciation ;)
>>
>
> But at least its fairly unique. Unlike some single letter which also 
> happens to be the first letter of my name .. hehe.
>

Very true!





More information about the Digitalmars-d mailing list