User loginNavigation |
archivesVariation of C's inline conditionalThe C language has an inline conditional statement, in the form: I'm looking for a form of the inline conditional that doesn't repeat the "somebigexpression" in the above situation, without assigning it to an intermediate variable. I was thinking something along the lines of this syntax: So two questions... 1) Would this be useful enough in practice to bother adding it to a language (i.e., does it make the code more clear v.s. assigning the original expression to a temp variable)? and 2) Does another language already have a syntax that accomplishes the same thing that I can borrow from? Thanks. Languages best suited for scientific computing?I work in a field where the standard for high-performance scientific computing is still Fortran (albeit Fortran 95 nowadays). The array-based nature of Fortran provides a relatively clean and intuitive syntax for solving the systems of equations often involved in numerical simulations. The simplicity of Fortran has also facilitated highly efficient Fortran compiler implementations. However I'm searching for a more modern and general purpose scientific computing language. Fortran is probably not the ideal language for writing networked graphical applications, neither I would argue is MATLAB or IDL. SciPy has deservedly gained traction amongst scientists recently and it is certainly a very attractive option. Unfortunately "CPython" can exhibit underwhelming performance characteristics requiring inconvenient work-arounds for CPU intensive code (see here for an example). I'm of the belief that the ideal language should also be functional and open-source. Some contenders I've tried:
Any suggestions in my quest for a better language are welcome. And yes I'm aware of hacks in C++ (Blitz) and Java (JScience); neither of these are very promising going forward IMHO! |
Browse archivesActive forum topics |
Recent comments
22 weeks 1 day ago
22 weeks 1 day ago
22 weeks 1 day ago
44 weeks 3 days ago
48 weeks 5 days ago
50 weeks 2 days ago
50 weeks 2 days ago
1 year 6 days ago
1 year 5 weeks ago
1 year 5 weeks ago