News for hackers. Stuff that matters.
Re:Type Systems (2004) [pdf] by rurban on Friday September 01, 2017 @07:02AM (#15147432)
Most of them are type hints. Perl6 and cperl have a similar distinction. Hard types and compiler hints. In an FFI context it's a hard type, with arrays or structs also, with primitives the compiler may ignore it or allow otherwise permitted temporary casts.
Re:Type Systems (2004) [pdf] by catnaroek on Friday September 01, 2017 @08:36AM (#15147836)
> Most of them are type hints. Perl6 and cperl have a similar distinction.

Why are so-called “type hints” interesting in? The real value in a type system is:

(0) Not having to worry about large classes of mistakes. They just don't happen in a legal program.

(1) Enforcing abstractions, i.e., not allowing library users to make decisions based on library implementation details.

(2) Managing the verification effort. Proving that a program meets its specification becomes much easier when components are guaranteed not to violate the assumptions made in each other's design.

A “type system” that can't do any of these is just a waste of engineering effort.

Re:Type Systems (2004) [pdf] by rurban on Wednesday September 06, 2017 @10:06AM (#15183753)
Yes, and much more. types also allows lowering generic ops to fast ops, which is typically 10x faster then without types.
Re:Type Systems (2004) [pdf] by catnaroek on Saturday September 09, 2017 @05:14PM (#15209187)
I'd love to read about how you can use so-called “type hints” to mechanically rule out programs that inspect the internal representation of abstractions provided by third parties.