E
E
e_asphyx2014-11-22 21:25:34
Programming
e_asphyx, 2014-11-22 21:25:34

What is a good and bad type system in PL?

Actually, the question is in the title. There is a lot of talk about this in the context of discussing new PLs. I understand what type safety is, but why, for example, does Rust have a "good type system" and Go has a "bad" type system, even though both are technically type safe?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Sergey, 2014-11-22
Protko @Fesor

There is no such concept. There is a subjective opinion of the majority that Rust implemented the type system in a very beautiful and elegant way. There is also a widespread belief that Go is a poorly designed language and generally ugly, making pretty good arguments, but sometimes weird ones. Someone complains that there are no generics in go, someone complains about the syntax .... in a word ... subjectivity.

S
Stroy71, 2014-11-23
@Stroy71

The stricter the type declaration (for example, C++ is strong typing and JavaScript is not strong), the better for debugging the program and the more difficult it is for the developer.

P
Puma Thailand, 2014-11-23
@opium

And what's stopping you from just going into languages ​​and looking?

I
index0h, 2015-01-03
@index0h

People usually reject what is not implemented as they think it should be))
There are a lot of attacks on JS with their prototype oops, most often with phrases like "how to make a protected thread there?" - the answer is "there is no need for it."
At the expense of types in Go - they are really powerful, but there is no generally accepted type inheritance, there are no classes, but instead there is an order of magnitude more convenient embedding / aggregation mechanism. Interfaces (from my personal point of view) are generally better implemented than a bunch of other languages.
Specifically on type safety - what's the problem then? Don't like interface{} - use a hard type specification, everyone will be happy.
I won’t say anything about Rust, I don’t know

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question