Hongbo Zhang

Results 181 comments of Hongbo Zhang

@IwanKaramazow An in-complete list of cost: - It breaks existing code which use the word. - It add more cognitive load even for people who dont use such feature, because...

Assert without else will abort as before. With else it will go the other branch. This matches the semantics of ‘guard if’ where else is an uncommon path

note if we can figure out a better syntax without introducing a new keyword, I would be happy to see it. The assert seems to be the best candidate here

Ah, what I proposed is a generalized assert. I will write down the semantics later

Here is my proposal of generalized assert. In the language, only `asssert false` is treated specially and it can be unified with any type in the type system. - special...

> Is the keyword else { } really needed? It is `keyword predicate else {}`. The negative is used to explain that the assertion is a generalised concept which is...

@cknitt The `assert` is already a keyword in both ReScript and OCaml. The type checker even have a special treatment for `assert false`. As I said, it is a high...

ping? This seems a serious bug

IIUC, this is a bug only in printing, in rescript syntax, all parameters should be named, is it correct?

I hit a bug when doing the formatting, the function get broken is below: ```ocaml let rec add x data = function Empty -> Node(Empty, x, data, Empty, 1) |...