4 ms·
For context: I come from a mathematical background. I didn't particularly appreciate that most programming languages use the word "function" for something that
by stared 4y ago
For context: I come from a mathematical background. I didn't particularly appreciate that most programming languages use the word "function" for something that is not a mathematical function (e.g. has side effects). Well, then I got used to it that sometimes it is practical.
> This doesn't sound like engineering.
It is precisely engineering. As opposed to pure science and art. (I consider mathematics to be, above all, art.)
Based on the post itself, you come with a theoretical mindset.
You may consider purity to be more important than practical applications. Yet, if people write software to be used, they focus on the latter. Sometimes it results in hacky code even within an already hacky language. There are no extra points for purity.
Purity itself is a double-edged sword. Sometimes it makes the code more reliable. Other times - it generates a lot of abstract nonsense, which makes it harder to reason about the piece of software or change it.
On the positive side, look at the Rust language (and community!). While it has lovely abstractions and safety guarantees, it is a practical language - performant for writing and execution.
- rep_movsd 4y agoRust is pretty hard to write, its not "practical" in any sense
- stared 4y agoPractical as there is already a lot of software written (or rewritten) to Rust. Sometimes for safety, sometimes - purely for performance. I don't claim it is an easy language or a universal solution. Compare and contrast with pure languages that are less versatile. Sure, Haskell has its practical uses. From a popular example - Pandoc. Yet, I know many programmers who have been preaching it is the best language but could not write a performant program that solves a given task that does not focus on algorithmics. By contrast, PHP or early JavaScript were not pure by any sane standard. Yet, they conquered the web. (Fortunately, ES6 and TypeScript made the JavaScript environment much saner.)
- sirwhinesalot 4y agoIt has multiple safety-release-valves, programmable builds and full blown procedural macros. It's very practical. What it is is "unwieldy", as in, annoying to use.
- davidatbu 4y ago"Rust is pretty hard to write" is an opinion. FWIW, I happen to have the opposite opinion. I find Rust easier to write than, say, Ruby or JS, because it is statically typed, has enums and great pattern matching, and traits are great.
- alpaca128 4y agoRust can be cumbersome when you don't want to worry about structure and design beforehand, yes. But for writing reliable software, I think it's actually the other way around - I prefer having warnings about `unwrap()` over hunting down a missing null check or typo in a variable name.
- quickthrower2 4y agoIt is a function that maps global state to global state!!
- stared 4y agoSo is the Universe, when sliced by time.
- quickthrower2 4y agoActually probably not, since clocks are always local
- karmakaze 4y agoWe can replace 'time' clocks with vector clocks ordering causality.