Does anybody else feel this way about @spec (visually overpowering)?

That feeling may simply be informed by your previous personal experience.

For example someone who has worked primarily with dynamically typed languages may not attach a lot of importance to explicitly declared types.

It does not enforce types in the function, and as far as I know it does not change anything about the function when compiled and is not part of the function execution.

The specs are an input for success typing so they actually go beyond “mere” documentation. But viewing syntax highlighted code in an editor is entirely for the benefit of the human reader anyway.

I for one consider the intended types to be important and useful information regardless whether the actual code requires them or not - so I appreciate the additional emphasis even against the “real code” (the whole “thinking in types” thing).

But obviously that is a YMMV issue that can to be controlled via configuration of the viewing/editing tools.

2 Likes