4,485 karma · joined Jun 30, 2015 (11y ago) · 2,043 submissions
comment 7y ago · link · parent
comment 7y ago · link · parent
comment 7y ago · link · parent
Go and Haskell are really at different ends of a spectrum. Haskell is a very high level language, which makes building and reasoning about very complex software much easier (at the expense of a learning curve and fine control of space usage).
Go is a low-level language with no learning curve and a very limited facility to abstract (by design it seems).
Personally I would have written something like Kubenetes in Haskell or OCaml, with perhaps the odd performance critical section in C or Rust.
comment 7y ago · link · parent
I did say vtable dispatch was efficient, but I might not want to split my logic across classes. A chain of if-else is a linear scan and not efficient. Switch in its current form is too limited.
It is well known that Java has no value types (there is a JSR). Even for a primitive type, the collection libraries need to box all values in order to abstract the element type. Every HFT user on Wall Street has had to write their own collections library using custom code generation to work around this.
comment 7y ago · link · parent
comment 8y ago · link · parent
comment 8y ago · link · parent
comment 8y ago · link · parent
For example, one can already introduce all the fields of a record as local bindings, e.g.
let {..} = import "List.x"
or just a subset using, e.g.
let {reverse} = import "List.x"
Similarly for function argument bindings, e.g.
f {x, y} = x - y
The above is just syntactic sugar for:
f r = r.x - r.y
Such named arguments of course prevent arguments with the same type being passed in the wrong order, e.g.
f {x=2, y=1}
There is still some minor work to be done to better support inline type annotations on such patterns to make them more usable.
Your idea of unifying bindings with records is interesting and not something I have considered.
comment 8y ago · link · parent
comment 8y ago · link · parent
The Apple keyboards were designed to be thin at the expense of everything else, reliability, maintainence, longevity, and comfort.
comment 8y ago · link · parent
A functor could also be a computation whose output can be mapped. So although these concepts can be explained by examples from programming, one has to keep in mind that these are examples and not definitions. For definitions, better to use category theory.
comment 8y ago · link · parent
I recently tried the latest noise cancelling headphones by Sony (1000XM3). The noise cancelling was excellent, but the bass was +5db overblown, boomy and drowned out most of the mids, the treble was dark to hide the NC hiss. It was unlistenable for jazz and classical without EQ. But the mainstream tech press think they are wonderful, even "WhatHifi" gave them 5 stars. An Audiophile is simply someone that cares about sound quality, most people don't.
comment 8y ago · link · parent
Every tool has a sweet spot and large code bases and maintenance is well outside the sweet spot of any dynamic language.
comment 8y ago · link · parent
In practice, despite the features Java can support, it's typically too much work to define a new type for safety reasons. Strings are used everywhere, instead of more domain specific types. Even the designers made compareTo return an Int!