What other languages have a similar concept to Chapel config variables
1 answer
The width of all different chapel config
-s is really unmatched:
config var VAR = 1; // --VAR=10 sets other value from cmdline
// --VAR 20 sets other value too
config const RHO = 1.23456; // --RHO=0.123456 sets other value from cmdline
// --RHO 0.2468 sets other value too
// --RHO=0.39*VAR sets other value for COMPILER
// based on VAR
config param DBG = false; // -s DBG=true sets other value from cmdline
config type B = uint(8); // -sB='uint(16)' sets other value from cmdline
// -sB='if DBG then uint(32) else uint(16)'
// sets other value for COMPILER
// based on DBG
While there is still a need to have typical typing for compilation, which is a definite limitation (for strongly typed, compiled languages, both obvious and natural), there is still the flexibility to use these constructs to customize adaptive runtime, custom behavior is large and difficult to parallel in other languages / compilers.
+2
source to share