The Artima Developer Community
Sponsored Link

Weblogs Forum
Heron.NET or JHeron?

22 replies on 2 pages. Most recent reply: Dec 25, 2004 12:38 PM by Alastair Patrick

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 22 replies on 2 pages [ « | 1 2 ]
Aaron F Stanton

Posts: 2
Nickname: afstanton
Registered: Dec, 2004

Re: Heron.NET or JHeron? Posted: Dec 13, 2004 3:07 PM
Reply to this message Reply
Advertisement
Chris -

As someone planning on targeting a compiler to the JVM and having studied it a fair amount, I'd like to point out that it's not very flexible. The types it supports are pretty limited and would be pretty difficult to extend value types and make it work properly. Also, all objects must derive ultimately from System.Object. Primitives are always passed by value, everything is always passed by reference. As far as I can figure, this stuff is hard coded into the VM itself, and violating the VM semantics winds up with the VM rejecting the binary.

Admittedly, a lot of language have been ported to the JVM (see http://www.robert-tolksdorf.de/vmlanguages.html for a lengthy list), but it seems tricky at best.

Thanks!

Christopher Diggins

Posts: 1215
Nickname: cdiggins
Registered: Feb, 2004

Re: Heron.NET or JHeron? Posted: Dec 13, 2004 4:07 PM
Reply to this message Reply
> Chris -
>
> As someone planning on targeting a compiler to the JVM and
> having studied it a fair amount, I'd like to point out
> that it's not very flexible. The types it supports are
> pretty limited and would be pretty difficult to extend
> value types and make it work properly. Also, all objects
> must derive ultimately from System.Object. Primitives are
> always passed by value, everything is always passed by
> reference. As far as I can figure, this stuff is hard
> coded into the VM itself, and violating the VM semantics
> winds up with the VM rejecting the binary.

Hi Aaron,

I appreciate the concern, but I have studied the JVM at great length as well. Like any kind of port / translation, the obstacles can always be overcome (i.e. by generating utility classes or by creating an emulator). It is simply that the mapping is non-trivial. This is the case for translating Heron to any target, and was the same for even porting it to C and C++, despite the syntactic resemblance.

In other news, the YARD parser is now online at http://www.codeproject.com/useritems/yard-tokenizer.asp

- Christopher

Aaron F Stanton

Posts: 2
Nickname: afstanton
Registered: Dec, 2004

Re: Heron.NET or JHeron? Posted: Dec 13, 2004 7:59 PM
Reply to this message Reply
Chris -

I figured you had studied it, too. I realize it can be done - after all, it's a Turing machine, isn't it? ;) Helper classes and emulation certainly is one route - but I personally find the idea of an emulator running on top of a virtual machine to be a little aesthetically ugly.

Joe

Posts: 24
Nickname: larson
Registered: Nov, 2004

Re: Heron.NET or JHeron? Posted: Dec 14, 2004 4:14 PM
Reply to this message Reply
> (1) A new Huron2.Jvm?
> or (2) A huron compiler. Which, yes, is a huge
> undertaking. Something of at least two years work.

>
> Glen

How can a guy that misspells the programming language make an assumption on how long it takes to rewrite it's compiler :)

Glen Ritchie

Posts: 12
Nickname: gmanndsu
Registered: Dec, 2004

Re: Heron.NET or JHeron? Posted: Dec 15, 2004 9:17 PM
Reply to this message Reply
> > (1) A new Huron2.Jvm?
> > or (2) A huron compiler. Which, yes, is a huge
> > undertaking. Something of at least two years work.

> >
> > Glen
>
> How can a guy that misspells the programming language make
> an assumption on how long it takes to rewrite it's
> compiler :)


Yep, you got me there Joe. It is Heron. Named after a Greek Mathematician. (I was thinking of the lake, for some reason.)

(Obviously) I'm not the expert. Never said I was.

Glen Ritchie

Posts: 12
Nickname: gmanndsu
Registered: Dec, 2004

Re: Heron.NET or JHeron? Posted: Dec 15, 2004 9:21 PM
Reply to this message Reply
Chris, your URL has changed.

You mean this one? It seems.

http://www.codeproject.com/cpp/yard-tokenizer.asp

Glen

Christopher Diggins

Posts: 1215
Nickname: cdiggins
Registered: Feb, 2004

Re: Heron.NET or JHeron? Posted: Dec 15, 2004 10:01 PM
Reply to this message Reply
> Chris, your URL has changed.
>
> You mean this one? It seems.
>
> http://www.codeproject.com/cpp/yard-tokenizer.asp

Thanks for pointing that out, CodeProject.com recently relocated it there.

Alastair Patrick

Posts: 3
Nickname: alpatrick
Registered: Dec, 2004

Re: Heron.NET or JHeron? Posted: Dec 25, 2004 12:38 PM
Reply to this message Reply
I looked briefly through the Heron spec. I am trying to get a feel for the kind of space you want Heron to fill. It seems that you are not writing Heron to solve any specific problem. Rather you are writing a language that appeals to you but you want to ensure that it lands in a useful problem domain.

It will fill an intereresting space because, in many ways, it is at the level of C++, i.e., a "system language", while some of its features are "higher-level" than C++. You mention performance and efficiency in many of your posts so I am guessing that your rationale is a language that exceeds the expressiveness of C++ without sacrificing performance?

The alternative back-ends that you propose: JVM, .NET and C/C++ are all potentially useful. My feeling is that targetting C++ will not be as useful as JVM or .NET. I am not sure if you are going to be able to achieve clean bindings between existing C or C++ code and Heron code. Also, I'm making an awful generalization here, but I think many C++ programmers are going to be quite resistent to making the leap to a language like this.

JVM would be an option but I think the way the JVM works will make it hard to get the performance you are looking for. And without the performance it might be difficult to justify some of the Heron language design.

Heron.NET really interests me. The .NET VM differs from the JVM in that it is naturally capable of running code for a C++-like language. That's how it is able to run Managed C++ code. Microsoft is going to replace Managed C++ with C++/CLI, which I suggest you look into if you haven't already. A language that could go head-to-head with C++/CLI in terms of performance but could also fill the "higher-level" space of C# would be interesting. The CLS could solve the Heron to other language binding problem.

Flat View: This topic has 22 replies on 2 pages [ « | 1  2 ]
Topic: Another Sprinkling of JavaPolis Previous Topic   Next Topic Topic: Event Driven Programming using Template Specializations in C++

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use