Module:Unimplemented/doc: Difference between revisions

From Rosetta Code
Content added Content deleted
m (→‎Example: Fix example text)
m (Update introduction and remove example output.)
 
Line 1: Line 1:
[[Module:Unimplemented]] builds lists of links to programming tasks that have not yet been implemented in a programming language. This module is invoked from [[Template:Unimpl_Page]].
[[Module:Unimplemented]] attempts to work around [https://www.semantic-mediawiki.org/wiki/Help:Selecting_pages Semantic MediaWiki's limitations]

We work around [https://www.semantic-mediawiki.org/wiki/Help:Selecting_pages Semantic MediaWiki's limitations]
by deriving a list of unimplemented tasks from multiple SMW [https://www.semantic-mediawiki.org/wiki/Help:Inline_queries inline queries].
by deriving a list of unimplemented tasks from multiple SMW [https://www.semantic-mediawiki.org/wiki/Help:Inline_queries inline queries].
This script could then be invoked from a suitable [https://www.mediawiki.org/wiki/Help:Templates template].


== Usage ==
== Usage ==
Line 34: Line 35:


See [https://www.mediawiki.org/wiki/Help:Templates#Control_template_inclusion Control template inclusion] for more information.
See [https://www.mediawiki.org/wiki/Help:Templates#Control_template_inclusion Control template inclusion] for more information.

== Example ==

The following example shows the output of the <code>page</code> function for the [[Go]] language.

<pre>
<nowiki>{{#invoke:</nowiki>Unimplemented|page|Go}}
</pre>

{{#invoke:Unimplemented|page|Go}}

Latest revision as of 13:19, 23 January 2024

Module:Unimplemented builds lists of links to programming tasks that have not yet been implemented in a programming language. This module is invoked from Template:Unimpl_Page.

We work around Semantic MediaWiki's limitations by deriving a list of unimplemented tasks from multiple SMW inline queries.

Usage

Invoke Module:Unimplemented with one of the tasks, drafts or omitted functions and the target language. Here we've used TypeScript as the example language.

{{#invoke:Unimplemented|tasks|TypeScript}}
{{#invoke:Unimplemented|drafts|TypeScript}}
{{#invoke:Unimplemented|omitted|TypeScript}}

Combined unimplemented task page

Unimplemented|page|<language> combines unimplemented tasks, draft tasks and omitted tasks into one function call. It includes sub headings for each list and formats those lists grouped by the first character in a task's title.

{{#invoke:Unimplemented|page|TypeScript}}

Invoking from a template

When invoking Module:Unimplemented from a template and using template parameters as arguments, it is probably a good idea to wrap each call to #invoke in <includeonly></includeonly>. This should prevent unnecessary function calls and improve page load times when viewing the template page directly.

See Control template inclusion for more information.