Generics syntax in different languages

I think we can all agree that reverse<String> is a function that takes a List<String> and returns a List<String>

Wait, what? Where's the List in reverse<String>? Is this another Java reference?

So what's reverse by itself? It's something that takes a type and returns a list reversal function

Are you still talking about Java? I'd expect reverse<String> to reverse the characters within a string, and reverse<List> to reverse the elements within a list. I'd also expect reverse to be some sort of generic routine to perform that task, although having parentheses here is more common.

various programming languages have their own takes on this which sometimes ignore the work done by academics, either intentionally or otherwise

I'm sure they have their own reasons why they might choose to create a language that can be understood by everyone not just boffins!

I seem to stumbled into the wrong part of the thread so I'm going to bail out.

My own stuff is much more prosaic; my own reverse function will reverse the elements of any object type for which [] indexing is defined.

/r/ProgrammingLanguages Thread Parent