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
=> More informations about this toot | View the thread | More toots from ste@ruby.social
=> View crystallang tag | View crystal tag This content has been proxied by September (3851b).Proxy Information
text/gemini