Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
willtim
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
72 ms
·
871.
▲
by
willtim
9y ago
You are offering a one-sided argument with regard to strict versus lazy! Lazy evaluation can make space usage difficult to reason about, but time complexity should be unchanged. Lazy evaluation, by default, is also a huge benefit to Haskell
872.
▲
by
willtim
9y ago
Both Erlang anr Elixir, while safer than C/C++, are still far from ideal for any critical system, since they lack any kind of static typing.
873.
▲
by
willtim
9y ago
Thanks for the references. It looks like "gradual typing" is about trying to retrofit types to dynamic languages. That is certainly harder than starting with a statically-typed system and adding dynamic types (my preference). The
874.
▲
by
willtim
9y ago
I did not mention GHC's Dynamic type. I mentioned GHC's deferred-type errors as an alternative technique to "gradual typing". I believe there were plans to implement a polymorphic version of Dynamic, but it obviously was
875.
▲
by
willtim
9y ago
> Dart's choice of an unsound type system doesn't actually matter for those gradual typing problems we were talking about. I think you are getting too caught up in that point. I was trying to show that "gradual typing&qu
876.
▲
by
willtim
9y ago
I respectfully disagree. The "right membrane" around any untyped value is a Variant type. A static type system would then stop you making any assumptions without unpacking and asserting its type. If we don't want variants an
877.
▲
by
willtim
9y ago
I assume that my downvoters do not believe this can be done in a conventional static type system. So I will try to explain further. > The problem munificent was talking about is that for more complex types you cannot write that type che
878.
▲
by
willtim
9y ago
I still do not understand why this cannot be done via a Variant type. Also it doesn't explain why Dart 2 has a similar feature.
879.
▲
by
willtim
9y ago
Of course variants would need to tag their payload, but this is what all dynamic languages need to do anyway. My point was that such dynamic behaviour can be done without resorting to an unsound "optional type system".
880.
▲
by
willtim
9y ago
> To keep the guarantees you expect inside your typed code, you have to figure out how to handle untyped data that flows into it. This would be solved in a conventional static type system by forcing the user to eliminate the variant,
881.
▲
by
willtim
9y ago
In Haskell (and I believe Scala), one can use pragma hints to specify to the compiler when to specialise, if performance becomes a problem. So I don't see this as an argument against parametric polymorphism.
882.
▲
by
willtim
9y ago
As a far as I can tell, an "optional type system" is just an unsound type system with a marketing name. Any decent static type system would allow one to progressively increase the level of typing, the weakest form being using a Va
883.
▲
by
willtim
9y ago
C++ is not "strongly typed" when compared to almost any other statically-typed language, e.g. Ada, OCaml, Haskell or Rust. This is a big part of why it is so insecure.
884.
▲
by
willtim
9y ago
Yes it reads like satire. MirageOS, having been written in OCaml, would have a better claim to being written with security in mind.
885.
▲
by
willtim
9y ago
Haskell is used for critical projects in production at Standard Chartered, Barclays and Facebook. There are also numerous startups. For both parallelism and concurrency, Haskell has a particularly good story. There's now even an O'
886.
▲
by
willtim
9y ago
I'm aware of TBB, but IMHO C++ is not the future of parallel and concurrent programming, or at least not the future I am hoping for.
887.
▲
by
willtim
9y ago
Linux support
888.
▲
by
willtim
9y ago
I use shortcuts for these, which I guess is what you must be doing.
889.
▲
by
willtim
9y ago
Given that the sustainability of Intel's profit margins are dependent on it, I am surprised they do not put more effort into making parallel programming easier. For example, GHC Haskell has a very promising parallelism/concurrency
890.
▲
by
willtim
9y ago
> Shouldn't the paradigm shift factor into the calculation of the simplicity? Not at all. You sound like you're looking for excuses not to learn something new!
891.
▲
by
willtim
9y ago
> This Java you talk about, is still in the top 1-3 languages by programmers, is it not? I'm disappointed that you appear to judge technology based on popularity. By this argument, JavaScript trumps Java. > And supposedly Hask
892.
▲
by
willtim
9y ago
Who are these people, were they professional programmers? How hard were they trying? Perhaps they just wanted a better Java? Where I work we do have some business people successfully writing Haskell. I've worked on very large codebases
893.
▲
by
willtim
9y ago
Ignoring all the abstractions and concepts (made possible by underlying simplicity), Haskell is absolutely a simpler language than C++ or Java with Generics. EDIT: my point was that subtyping is controversial, I assume the downvotes are for
894.
▲
by
willtim
9y ago
Subtyping adds huge amounts of complexity to type systems and type inference. Dart even chose to have an unsound type system because subtyping and parametric polymorphism (generics in Java) were deemed too hard for Google programmers to und
895.
▲
by
willtim
9y ago
Trees can be modelled with sum types, the mathematical dual of product types (records). Java doesn't have sum types and so inheritance has to be used to encode them.
896.
▲
by
willtim
9y ago
The guitar suffered one of its biggest losses with the recent passing of Allan Holdsworth.
897.
▲
by
willtim
9y ago
It's not easy summarising it in one sentence, but 'auto batching' and 'caching' is what I meant by optimising the data retrieval. EDIT: the Haxl docs describe it as "a library and EDSL for efficient scheduling
898.
▲
by
willtim
9y ago
It isn't the slightest bit similar to those! Haxl is a high-level library for specifying (and optimising) concurrent data retrieval.
899.
▲
by
willtim
9y ago
The only significant shortcoming of the Nix language is the lack of static types. Guix doesn't fix this. In fact there isn't an existing language in common use that offers statically-typed extensible records, which IMHO vindicates
900.
▲
by
willtim
9y ago
Most problems arise from using linked-lists in inappropriate situations. This includes using the default String type. Both the list and string syntax have been overloadable for a while, so using alternatives when necessary shouldn't be
More ›