News for hackers. Stuff that matters.
Re:Tamgu, a functional, imperative, logical programming lang... by zimbatm on Wednesday July 24, 2019 @05:33AM (#20513535)
Automatic conversion hides type mismatches in all the program, even the parts that are not concerned with input validation and cleanup. So that makes static typing a bit less useful.

As a source code reader I would much prefer to see at least a keyword or function call to make the casting explicit.

string s = cast 10; s += cast 20;

(I had the same reaction as the parent and think the language looks really cool otherwise)

Re:Tamgu, a functional, imperative, logical programming lang... by clauderoux on Wednesday July 24, 2019 @07:54AM (#20514232)
Thank you for your comments. Actually, it is possible in Tamgu to have an explicit cast:

i = int(s)+10;

Each type can be used as a "function" to create the object you like, which is basically what a cast is...