How do languages with Maybe types instead of nulls handle edge conditions?
Eric Lippert made a very interesting point in his discussion of why C# uses a null
rather than a Maybe<T>
type:
Interface hierarchy design for separate domains
There are businesses and people. People could be liked and businesses could be commented on:
If Scheme is untyped, how can it have numbers and lists?
Scheme is said to be just an extension of the Untyped Lambda Calculus (correct me if I am wrong). If that is the case, how can it have Lists and Numbers? Those, to me, look like 2 base types. So I’d say Racket is actually an extension of the Simply Typed Lambda Calculus. No?
What is the evidence that an API has exceeded its orthogonality in the context of types?
Wikipedia defines software orthogonality as:
A question about static types
How would you statically type the following JavaScript program
A question about static types
How would you statically type the following JavaScript program
Type inference in Golang/Haskell
I’ve read that Go doesn’t actually have true type inference in the sense that functional languages such as ML or Haskell have, but I haven’t been able to find a simple to understand comparison of the two versions. Could someone explain in basic terms how type inference in Go differs from type inference in Haskell, and the pros/cons of each?
When is type testing OK?
Assuming a language with some inherent type safety (e.g., not JavaScript):
Why is type inference useful?
I read code way more often than I write code, and I’m assuming that most of the programmers working on industrial software do this. The advantage of type inference I assume is less verbosity and less written code. But on the other hand if you read code more often, you’ll probably want readable code.
Why is type inference useful?
I read code way more often than I write code, and I’m assuming that most of the programmers working on industrial software do this. The advantage of type inference I assume is less verbosity and less written code. But on the other hand if you read code more often, you’ll probably want readable code.