Hacker News new | ask | show | jobs
by russellsprouts 2991 days ago
I can't remember the name, but there is a language with type-named parameters. It's an object-oriented language inspired by Java.

It doesn't use "the" -- it's clear from context whether something is a type name or reference, so you just use "Node". To handle multiple variables of the same type, you can use Node, Node', Node'', etc.

It also supports phrasal methods, where arguments can appear in the middle of the method name. For example, what would be divide(x, y) could be defined as divide(x)By(y) instead.

1 comments

I believe Swift (I think) uses this idea, where the 2nd and subsequent parameters are often named prepositions:

    divideInto(x, by:y, mod:z)