Hi Daniel -- Answering on the list so that others may add their thoughts...


   I had a few questions about how some features of C++ translate to x10.

   First, are there features such as "const" or "typedef" in x10.  As
   far as I understand they exist in C++ to aid efficiency by allowing
   the preprocessor to do certain types of inlining.  Does the x10
   compiler infer these things automatically or are there keywords I
   can use for the sake of such efficiency.  Also, how does inlining a
   function work in x10?


There is a typedef in X10 -- see Sec 4.4 in http://x10.sourceforge.net/documentation/languagespec/x10-latest.pdf

There is no support for C++ const.

You can instruct the compiler to inline by marking methods as @Inline, after importing x10.compiler.Inline.

   Secondly, I saw that there is a "vec" class in the standard
   libraries.  Is this an x10 vector class or something else?  If not,
   is there a standard x10 vector class or would I need to create one?

See x10.util.ArrayList, and x10.util.Vec.


   Finally, I wanted to know how I could figure these things out for
   myself in general.  I am used to a language like Java where I can
   just google the term I am interested in and usually find something
   relevant.  However, for x10 it is very hard to get useful results
   for google (for example googling "x10 vector class" gives me results
   about where I can but the Vector X10 bike").  I am able to find some
   of the basic stuff at x10-lang.org <http://x10-lang.org> but I
   struggle to find answers to specific questions like these.

One important thing to do is use X10DT. When you create an X10 project, you will see an "X10 Runtime Container" in the Package Explorer view. Click it open. You will see an x10.runtime jar. Open it. You will see source code for the X10 runtime packages: x10.array, x10.compiler, x10.lang, x10.util etc. Open some of these packages and study the classes -- their exposed APIs and the code used to implement the methods.

Otherwise -- use this list! There are several people who respond fairly quickly. (You may want to sign up for the list first at http://x10-lang.org/x10-community/mailing-lists.html

Best,
Vijay

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to