diff --git a/docs/modules/language-reference/pages/index.adoc b/docs/modules/language-reference/pages/index.adoc index 403f27b3..d877539c 100644 --- a/docs/modules/language-reference/pages/index.adoc +++ b/docs/modules/language-reference/pages/index.adoc @@ -2035,6 +2035,12 @@ greeting2 = greetPigeon(parrot) // <4> <3> Call instance method on `pigeon`. <4> Call module method (on `this`). +NOTE: Methods do not support named parameters or default parameter values. +The xref:blog:ROOT:class-as-a-function.adoc[Class-as-a-function] pattern may be a suitable replacement. + +TIP: In most cases, methods without parameters should not be defined. +Instead, use <> on the module or class. + [[modules]] == Modules @@ -5161,8 +5167,8 @@ It is defined by the presence of a `PklProject` file that amends the standard li Defining a project serves the following purposes: 1. It allows defining common evaluator settings for Pkl modules within a logical project. -2. It helps with managing <> dependencies for Pkl modules within a logical project. -3. It enables packaging and sharing the contents of the project as a <>. +2. It helps with managing <> dependencies for Pkl modules within a logical project. +3. It enables packaging and sharing the contents of the project as a <>. 4. It allows importing packages via dependency notation. [[project-dependencies]]