HaxeFoundation / HaxeFoundation/HaxeManual

Optional arguments vs default values

Open
#307 1 comment 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
Haxe
Stars
225
Forks
156
Avg merge
5h 16m
Merged PRs (30d)
1

Description

I find the pages on [optional arguments](https://haxe.org/manual/types-function-optional-arguments.html) and [default values](https://haxe.org/manual/types-function-default-values.html) a bit confusing. They fail to mention that optional arguments are just syntactic sugar for a default value of `null` / that `?param:SomeType` is the same as `param:Null = null`. To somebody that doesn't know that, it can read like optional arguments and default values are entirely different things.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.