Hi Greg - See below...
On 5/26/15, 11:42 AM, "Greg Kreider" <[email protected]> wrote: > >Hi, > >We've been learning and playing around with Chapel the last >month and have come up with a long list of questions and >comments (and some bugs that we'll post to chapel-bugs). It >might be best to split them into several different e-mails >so it wouldn't be overwhelming, and we'll submit them over >the next few days. OK, thanks for your interest and feedback! >About the language and spec: > >1. Is it possible to have the select statement warn or raise > an error if all the members of an enum aren't handled? I (personally) think that it should do that. It's probably worth double-checking that it doesn't and filing a bug (or feature request) in our test system. See below... > >2. Why does the select .. otherwise case only allow a single > statement? (We've had to use an if..then chain a few times > because of this.) Are you using curly braces within the otherwise block? This program works for me as I would expect: config const x = 1; select x { when 1 { writeln("found 1"); writeln("yay!"); } otherwise { writeln("found something else"); writeln("the value found was ", x); } } > >3. Can you access the size of a tuple with a query? Something > like > proc p(pt : ?ndim * int) { > writeln("dimensionality of point is ", ndim); > } > doesn't compile with the message "syntax error: near '*'". Sounds like a bug (or at least future work). I don't think there's any reason we wouldn't support such things. In the mean time, you can use pt.size if you know that pt is a tuple... I believe you could write the equivalent thing with something like proc p(pt : ?t ) where isHomogeneousTuple(t) && t(1).type == int {...} although I haven't checked that compiles... >4. Does a domain slice form a subdomain? It's not clear in the > spec. I'm going to let somebody else answer that one. >5. Are constants in a class only accessible from an instance > (which the spec seems to say is the case)? We were looking > for something like a static class member in Java, but there > was an instance available in the code at that point to get > the constant values. Right now we don't have anything equivalent to Java's static class members. I (personally) think it would be nice to add at some point. Can you use a global in your situation? BTW, if you are going to have a long list of these requests, it would probably be best if you can file them in our testing system yourself. The outline of what you would need to do: * sign a contributor agreement (see http://chapel.cray.com/developers.html) * create e.g. mytest.chpl and mytest.good with the expected output, along with mytest.future explaining what you're requesting/what isn't working now. * use util/start_test to verify that your tests run as expected (which probably means that they are "failing futures") * create a pull request for the GitHub project with these cases It still makes sense to bring them up on a mailing list for discussion in any case. Cheers, -michael ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Chapel-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/chapel-users
