How to pronounce type variables such as' a

In OCaml, type variables are written as 'aor 'betc:

instead of choosing one specific type, OCaml introduced a type variable 'ato express that the type is generic. (You can specify a type variable with a single quotation mark.)

( Source )

I would be grateful for guidance on how to pronounce these type variables, ideally referring to official documentation or recorded conversations by the creators of the language.

The closest I have found so far is this third-party proposal, which is far from final:

I pronounce them as the closest Greek letter, for example. 'alike alpha, 'blike beta, etc .; I do not know how common this is in the OCaml community, but it is common in books and functional programming books.

+4
source share
2 answers

Pronounce them as Greek letters very often, at least from people in the academic community. But pronouncing them as simple letters, ignoring them ', is also fine. A variable type with longer names is used very rarely. If they occur, you can also simply declare them as this.

+5
source

Nothing official with me.

I usually ignore the quote label during pronunciation.

I pronounce them as the closest Greek letter, for example. 'alike alpha, 'blike beta, etc .; I do not know how common this is in the OCaml community, but it is common in books and functional programming books.

, . , ,

type ('key,'elem) map

- , 'alpha, 'beta ..

0

Source: https://habr.com/ru/post/1668689/


All Articles