Jakob Praher wrote:
> I was stumbling over X10 recently. I have some questions:
>
> * What are your plans with the c++ backend? Do you aim at a two level 
> integration also w/ legacy code? What was the rationale for directly 
> generating C++ code?
>   
(Dave is away on vacation this week, so let me step in and respond.)

The C/C++ back-end is the main back-end for the statically compiled, 
high-performance implemenation of X10. (We currently generate C++, but 
may generate C in the future.)

Integration with legacy code is already possible. X10 can call C++ 
through @Native and @NativeRep annotations. For C++ to call X10, the 
programmer has to know the kind of code generated. We are working to 
stabilize that and fix the interface so that this will be possible.

Compiling to C/C++ is a fairly common strategy for high-level languages. 
The upside is that it gives you working implementations with decent 
performance quickly on a variety of architectures. The downside is that 
you have to rely on a longer tool chain (a native C/C++ compiler, like 
gcc and xlc) which does not know anything about X10 semantics. So you 
have to be careful to compile to a subset of C/C++ which you can 
reasonably expect the native compilers to treat the same way.

We are continuing with code development for (enhanced) JVMs. I feel that 
VMs are ripe for a significant round of revision to better handle 
concurrency, distribution and heterogeneity. Stay tuned for more 
announcements around this in the coming months.

> * Since I am a little bit experienced in Scala, I would also like to ask 
> why the 1.7 version changed the synatx, especially why do you fork the 
> Scala syntax in certain nuisances? What I mean is scala uses for instance
>
> object X {
>     def main(args: Array[String]) {
>         Console.println("hello world!");
>     }
> }
>
> to deonte a single instance static class whereas in X10 you use:
>
> class X {
>     public static def main(args : Rail[String]) {
>       Console.OUT.println("hello world!");
>     }
> }
>
> What were the decisions for this differences?
>   
The decision to change the order of types in variable declarations was 
one of the biggest changes in 1.7 over 1.5, and was made with an eye to 
the future.

We had a very simple reason for changing the syntax in 1.7 over 1.5. 
Functions play a much bigger role in 1.7. Second, static types can lead 
to much bigger expressions in X10 than (say Java 1.5/1.6). So we felt 
supporting some form of type-definitions was important. Similarly most 
of the types that a programmer is forced to write down in Java 1.5/1.6 
can in fact be readily inferred through local inference -- so we need a 
syntax that makes it easy for the programmer to elide types (e.g. for 
local variables with initializers). Finally, method parameters may occur 
in the return type of the method -- and we wanted to follow the basic 
principle of modern OO languages that variables should be defined 
syntactically prior to use.

Hence we moved to a syntax in which the type occurs after the entity 
being defined, and is separated from it with a colon. In certain 
situations where the type can be inferred locally, the ": Type" can be 
dropped.

Our goal continues to be to develop a simple, clean modern OO language 
for concurrency, distribution and heterogeneity. To this end we are 
innovating in areas that we feel we absolutely must in order to support 
our basic goal, while remaining fairly conservative in areas that we 
feel are now established and non-controversial. In particular we have 
chosen to stay with the single inheritance/multiple implementation OO 
structure of Java -- though many changes are coming in 2.0 to support 
structs. Similarly, we have chosen to stay with the static members of Java.

Best,
Vijay





------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
X10-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to