Skip to content

Comment on Orange: A simple systems programming language

Comments

What are the pros of leaving out the type identifier when declaring a generic type? I understand that it's viable to not provide some "Type" identifier to denote a generic type, but I feel like it's better to have it for clarity. What happens when you have a function that accepts two kinds of generic types? This inconsistency doesn't seem worth it to me

Each parameter in a function without a type identifier is a unique generic type. This means any function with two typeless parameters already accepts two different kinds of generic types.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.