Hi,
Is the use of
[ i in SOMETHING ] statement;
truly a list comprehension in say the Python sense or does it have
limitations. Fortran's implied DO loop is a list comprehension in an
extremely limited sense and then, only within READ/WRITE statements.
Also, in the interests of succinct code, are there any plans to support in
Chapel a ternary operator like the '?' of C/C++ or the ternary 'if' of
ython, i.e. respectively
x = condition ? resultA : resultB; // C/C++ (Java)
or
x = resultA if condition else resultB; // Python (since V2.6??)
or the more general (and supperior) use of if/then/else within an
assignment.
variable := ( if condition then resultA else resultB );
of Algol68 and (MetalLua??). I think BCPL has the concept of a conditional
expression
E1 -> E2, E3
which evaluates and provides as an Rvalue E2 or E3 respectively if E1 is
true or false.
Thanks - Damian
Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here
Views & opinions here are mine and not those of any past or present employer
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users