Toot

Written by Stephann V. on 2025-01-24 at 15:40

A great feature from Crystal lang is its method arguments.

In this example, I don't need to choose if I want positional args or keywords args, or mixed.

I can define external names for my args, in this code, "to" is the argument external name, and "buffer" is the internal name.

More details: https://crystal-lang.org/reference/1.15/syntax_and_semantics/default_values_named_arguments_splats_tuples_and_overloading.html

[#]crystallang #crystal

=> View attached media

=> More informations about this toot | View the thread | More toots from ste@ruby.social

Mentions

Tags

=> View crystallang tag | View crystal tag

Proxy Information
Original URL
gemini://mastogem.picasoft.net/toot/113884086057525439
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
232.100456 milliseconds
Gemini-to-HTML Time
1.100485 milliseconds

This content has been proxied by September (3851b).