HN user

oconnor0

980 karma
Posts14
Comments295
View on HN

I think that makes it the second (production-ready) language to have a primarily-structural type system

I assume we are talking about a static type system here? Many common "scripting" languages are structurally typed - what Python calls duck typing.

Would you be willing to explain why explicit asynchrony is superior to implicit cooperative threading? Rather than simply engaging in more namecalling.

and not so good at floating point computations

What does this mean? I was under the impression the OCaml compiler did a decent number of floating point specific optimizations, like unboxed arrays and what not.

No customization presents a simple tool that, hopefully, just works and can be accepted with its flaws and limitations. Once customization starts being added in, it's easier to see annoyances and "why isn't this feature present".

The Sile PDF says

There is no shortcut for boldface, because boldface isn’t good typographic practice and so we don’t want to make it easy for you to make bad books.

Where/what is that from? Like is that common "knowledge"?

Additionally, the compilers can and do replace algorithms if users let them. Most users don't want it, even if it makes code faster.

What compilers do this? With what algorithms?

I think one of the issues here is what compiler optimizations encompass. In a language like C or C++, you may be able to write optimal algorithms but end up with poor performance because of memory access. An unoptimized compile puts almost everything on the stack - a = b + c involves two loads, one add, and one store in an unoptimized compile. All of that extra memory access is going to kill performance; even if you have optimal data structures and algorithms.

I see "optimizations are bad/unnecessary/problematic/whatever" in my job writing a compiler. The underlying issue is almost never "I don't want optimizations" - even when someone thinks that's what they want; it's "I don't want optimizations that produce unexpected behavior".

Using a sequence instead of a map is fine if you know it will never be more than some small number of entries, but so often we are wrong about how many entries will be in a table that the N-squared use of a sequence as a map kills performance unexpectedly.