Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I did misread your post, but I will also say that generics are a double edged sword when it comes to readability. Needing to declare genetic types in function signatures can add irrelevant detail and heavy syntax. For example, look at the interpreter interface in this typescript file:

https://github.com/gcanti/io-ts/blob/master/src/Schema.ts#L2...

Granted, genetics don't need to be done that way, but it is among the more common and popular approaches. The type information is tangled up in the implementation, making focusing on either more challenging. Perhaps we need modes for syntax highlighting- one for types, one for implementation?



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: