4 ms·
Pretty wacky syntax. I'm not a Julia fanboy, but I don't quite see the point of something like this over it. From the "basis function regression" example:
by sfpotter 3y ago
Pretty wacky syntax. I'm not a Julia fanboy, but I don't quite see the point of something like this over it.
From the "basis function regression" example:
struct SolverState(n|Ix) =
x : n=>Float
r : n=>Float
p : n=>Float
Why not just "Float[n]" or even "Float^n" if we're trying to get fancy? The syntax "n=>Float" suggests "n" is being mapped to "Float", which isn't what is happening.
Further on in the implementation of CG:
r0 = b - (mat **. x0)
Matrix multiplication is "**."? I thought Python's "@" was bad, but this is certainly worse... is the goal to confuse MATLAB programmers and Python programmers simultaneously? Also, are the parentheses necessary to get the associativity correct? If so, Dex has some quite interesting operator precedence rules!
Further down:
x' = s.x + alpha .* p
For scalar multiplication, we need ".*", with the "." on the left now? What's with the inconsistency?
This is leaving aside how much sense:
result = apply_n(n_iter, SolverState(x0, r0, r0)) \s.
...
makes... is this really an improvement over a for loop? What's with the backslash and period?
There just seems to be a lot of syntactic noise with this language. Sorry to be so disparaging, but I just wonder if there's some motivation for it.
The reason languages like MATLAB and Julia have hewed to a fairly conservative syntax for array programming is because there's significant precedent for it. Fortran was widely used for a long time and stuck to a syntax which is sensible for engineers and mathematicians. Fortran is in fact still widely used---and this is fine! It has its place! MATLAB directly inherited Fortran's syntax. Julia deliberately copied MATLAB's syntax. There is a whole culture of programmers who are oriented around this syntactical approach. What's the point in choosing such a syntax which the majority of these programmers will find obtuse and unfriendly?