I really hope at some point this entire universe gets liberated from Python at some point. Even R would be more palatable. Both these examples are awful, error prone, obfuscated, and beholden to Python's difficulties with large sums of data.
I really hope at some point this entire universe gets liberated from Python at some point. Even R would be more palatable. Both these examples are awful, error prone, obfuscated, and beholden to Python's difficulties with large sums of data.
I tried to do so myself and couldn't come up with anything significantly better, but I've been writing Python for a long time and might just be stuck in a local minimum :)
Another comment has already pointed out that Julia framework. I'll relink it for completeness: https://fluxml.github.io
You can also look at Haskell's Grenade examples: https://github.com/HuwCampbell/grenade
Fundamentally different because the notion of what the compiler should be doing is fundamentally different, and the notion of how data should be input is somewhat different.
In julia
But it is productive to say, "An excessively declarative style has been considered bad in programming for over thirty years."
That is reminding people this is a largely solved problem that the industry refuses to embrace because our legacy rube-goldberg contraption of software refuses to accept ever abandoning anything in favor of simplicity.
A great example: Why are both of these examples using the error prone pattern of explicit bounds iteration?
But I'd even take Scala at this point, and you could do worse than Clojure.
Python code isn't especially "ugly" as in line noise. It's ugly in the sense that it's a deluge of outdated and ineffective programming paradigms that maximize the difficulty of writing code.
It's early days but so far F# it ticks all my boxes and I'm finding it an extremely nice language to write in. It is just as terse as Python (due to type inference) but statically typed, and there is a great plugin Ionide for VSCode which makes for a really polished development environment.
Plan is to use Microsoft's CNTK for ML/DL stuff.
For anyone frustrated with Python's duck typing, I highly recommend you check out F#.