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 gives to the makers of compilers. I think undefined behavior is giving C a reputation worse than it deserves.
HN user
markslicker
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 to sign off so that the copyright is assigned to a single entity, that makes relicensing easy. With an open source project like Zig it might be complicated to relicense since you have many contributors.
It seems that Zig should maintain a contributors file since they have chosen the joint copyright model with the MIT license. They could then refer to that in a copyright notice, which could be a single line per file.
On the Zen side however there seems to be a gross misunderstanding of copyright. Just because you make some changes to a source file (or no changes at all) does not allow you to completely reasign the copyright to yourself.
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 they are not subject to copyright, so the least they could do is provide the original LICENSE file from Zig and make clear what their own contributions are and what license applies to them.
On the Zig side it would be better to include copyright notices with the files and maybe consider relicensing to GPL to avoid these situtations in the first place. Unfortunately many authors today are choosing non-copy left licences which might go against their intentions and probably their interests as well as software creators.
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 pattern matching, of course Haskell does something similar.
The Rust syntax seems to emulate functional programming, but inconsistently since -> is not used purely as a type constructor or term constructor something like a mix of both in the defintion of functions, also it doesn't seem to support currying.
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
is nonsense, because '->' is a type constructer in OCaml (a function from types to types) not part of an ad-hoc syntax for function declarations (like Rust).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 '->' (arrow) to denote a return type (like Rust) is nonsense in a functional language and kind of butchering the functional inherited syntax IMHO.
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 syntax, whereas '->' (arrow) is a function type constructor in functional programming with 'A -> B' denoting a function from A to B. The type of add by itself in a language like Haskell would be:add :: (int, int) -> int
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 free software and the GPL because of the association with Stallman.
This is entirely wrongheaded, you can agree with the concept of free software and the GPL and disagree with the political views of Stallman. Personally I don't agree with Stallman's political views but he is right on the issues of software freedom and without that I don't think we would be where we are today, having legally protected operating systems, compilers and so forth free for anyone to use, study, or improve upon.