4,485 karma · joined Jun 30, 2015 (11y ago) · 2,043 submissions
comment 4y ago · link · parent
It affects the language very much, awkward currying and tupling, needing to wrap methods in objects. Subtyping also has many complex consequences. There is limited type inference and tail call optimisation versus functional-first languages.
> Scala isn't simply an evolution of Java. It offers a type system that goes beyond what you can do in F# or OCaml.
It offers higher-kinded types, but F# has units of measure, OCaml has polymorphic variants. Each has advanced features not offered by the other.
> The fact it's multi-paradigm and plays nice with Java's OO model doesn't make it less functional than these two.
It was not designed as a functional programming language first and foremost, that is my point.
comment 4y ago · link · parent
The underlying issue is that it's a complex language with many experimental and interacting features, which can and do cause a lot of distraction. This is not the fault of functional programming. Have a go at OCaml or F#, which are nice practical sweet spots.
comment 4y ago · link · parent
This is not true in my experience; and I have been professionally writing Haskell for over a decade. It is well understood that Haskell is excellent for reasoning about program correctness, but rather poor for reasoning about program performance/efficiency, especially memory usage. What Haskell programmers might get frustrated about is less suitable tools used for domains for which Haskell would be an excellent fit (smart contracts?). There are many domains for which correctness and productivity are important, but performance/efficiency less so. Haskell is still much more performant than many dynamic languages are.
OCaml is a nice middle ground, lots of functional goodness and type safety with a much more predictable runtime.
comment 4y ago · link · parent
No, you were wrong with the statement "This also glosses over that commercial Unices weren't superior technology.". The context was Linux killing off the (technically superior) competition, a process that took decades.
There are many other technologies that Solaris had years before Linux, e.g. decent SMP, Zones (containers), ZMF management and many other features that Linux still does not have. QNX had realtime features and a microkernel.
> I figure in your mind it has to do something with micro-architecture rather than vendors not giving a flying fart, so I'll bite.
The situation is more complex than "vendors not giving a flying fart". Linux does not have a stable module ABI, in fact, it doesn't even guarantee a stable API. This is all part of "kernel architecture" and highly relevant. Regarding microkernels, security concerns will eventually force this design on future operating systems (e.g. Google's Fuschia)
comment 4y ago · link · parent
However Linux is free, and we have all benefited enormously from that, myself included and the tech giants.
comment 4y ago · link · parent
I accept that it's a huge improvement over many mainstream languages (certainly bash!), but I find e.g. OCaml/F#/ML code far easier to reason about. These languages are also hybrid imperative and so there is no need to use monads, they can be used just like Python.
comment 4y ago · link · parent
As an academic, it must be soul destroying to see the world dominated by ad-hoc efforts like Python. Just like Linux, it was one persons hobby project that repeated old mistakes and now threatens the existence of argubly better technology.
comment 4y ago · link · parent
comment 4y ago · link · parent
Was there any democratic process when "Solidity" was designed? Unfortunately, it does not appear to me that the right experts have been involved and that there was peer review. It looks like it was thrown over a wall, much like JavaScript was.
comment 4y ago · link · parent
comment 4y ago · link · parent
Macros can analyse/manipulate the abstract syntax tree of their inputs, so I think of them as extending the compiler.
comment 4y ago · link · parent
But I don't think this is a bad example at all, I tend to think of macros as "extending the language/compiler", since they have access to the abstract syntax tree of their inputs, which is what is being done here.
comment 4y ago · link · parent
Yes, apologies, my example was wrong and I was probably confusing Dvorak with another layout. I would like to see some better statistics on hand alternation though, because qwerty is quite good at this (as Wikipedia states) and it would be interesting to see where it actually sits relative to the other layouts.
comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
Modern C++ compilers are not necessarily available on all platforms. For example, Solaris, AIX or old RedHat versions. Go doesn't have this problem yet, but it will.