Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typ Aliase (typedefs) #45

Open
bafto opened this issue Dec 19, 2023 · 0 comments
Open

Typ Aliase (typedefs) #45

bafto opened this issue Dec 19, 2023 · 0 comments
Labels
Vorschlag: Feature Neuer Feature
Milestone

Comments

@bafto
Copy link
Member

bafto commented Dec 19, 2023

Typdefs sind ein nettes Feature, welches von vielen Sprachen (C, C++, Go, Scala, ...) unterstützt wird.
In DDP ist es zwar nicht zwingend notwendig, aber doch sehr nützlich und spätestens mit der Einführung von Generics essenziell.

Die Syntax könnte so aussehen:

Wir nennen ein(e/en) <Typname> ein(e/en) <Typalias>.

[Beispiele]
Wir nennen eine Zahl eine Postleitzahl.
Wir nennen einen Wahrheitswert einen Boolean.

[Beispiel für einen Vektor mit Typparameter T]
Wir nennen einen Vektor mit T gleich Zahl einen ZahlenVektor.
Wir nennen einen Vektor mit T gleich Kommazahl einen KommazahlenVektor.
@NotLe0n NotLe0n added the Vorschlag: Feature Neuer Feature label Dec 23, 2023
@NotLe0n NotLe0n added this to the beta release milestone Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Vorschlag: Feature Neuer Feature
Projects
None yet
Development

No branches or pull requests

2 participants