Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
markslicker
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
markslicker
5y ago
The main problem with undefined behavior is that the compiler does not produce any warning to that effect (in my case gcc). I've been caught by bugs that were truly puzzling until I understood undefined behavior, and the licensee it gi
2.
▲
by
markslicker
7y ago
A copyright notice could be a single line in a source file, just mentioning the authors and the license that applies. It gets a bit complicated when you have many authors all contributing to a github repo. Some projects require the authors
3.
▲
by
markslicker
7y ago
I took a look. IANAL, however it is clear that they lift library sources and substitute their own LICENSE file to claim a copyright with different license terms. Just because the Zig sources don't carry a copyright notice does not mean
4.
▲
by
markslicker
7y ago
The above usage of -> is a syntax error in OCaml, -> can be used in the left hand side of a let expression, but only as part of a type expression. As you say the other usage is used to construct terms (clauses) that are used in patter
5.
▲
by
markslicker
7y ago
It is quite common in SML/ML code I've encountered, probably not as common in modern OCaml. BTW, in OCaml let add ((a:int), (b:int)) : int = a + b Works just fine, whereas: let add ((a:int), (b:int)) -> int = a + b
6.
▲
by
markslicker
7y ago
You can certaintly have tupled function arguments in SML/Ocaml, in fact that seems to have been the more common style there, whereas Haskell uses curried functions more commonly. As far as the original sugestion, using '->'
7.
▲
by
markslicker
7y ago
In functional programming (the origin of this syntax), add(a: int, b: int): int can be read as a function 'add' when applied to the parameter tuple (a: int, b: int) has type int, I believe Ocaml, SML, actually support this
8.
▲
by
markslicker
7y ago
My other comment was censored, I just strongly disagree with the cancel culture that led to Stallman's resignation. The person Sarah Mei seems to be leading this fight against Stallman even going so far as renouncing the concept of fre