Skip to content

Instantly share code, notes, and snippets.

View 2colours's full-sized avatar

Márton Polgár 2colours

  • Budapest, Hungary
View GitHub Profile
@2colours
2colours / for-otherwise.md
Last active September 26, 2023 11:50
Responding to for-otherwise and the Itch.scratch article

This was originally meant to be posted at rakudo/rakudo#5390. Since I have put effort into it and I do think there is thought in it, I decided to preserve it despite the blockade thrown into the way.

Anyways. There's the blog post and the discussion. The fact that Slang::Otherwise has 5 stars on Github is some indication that the repo is appreciated by some people at least.

I'm not arguing against the existence of a slang. I'm arguing against throwing it into the core language, let alone by a mere PR. I don't think the discussion even looks so clear and one-sided from a neutral point of view, and I think I have seen this article before.

I would like to respond to the article itself in this comment... that will be enough for now I think.

First example

Dear Ralph,

I'm sorry that you get frustrated but this is still for all intents and purposes a technical discussion so I don't think it does any good to be vocal about it. There are good points and bad points, arguments and counter-arguments. I can also get upset when I feel indifference or dishonesty in a response that's meant to be an argument but I think a thread like this should read like valuable technical content to an "outsider".

you cannot reasonably indicate for an array that it doesn't have valid content, as opposed to being empty by chance If you mean indicate it's undefined, then here's one way:

my @array;
say @array.elems;      # 0
say @array.so;         # False
Ambiguous call to 'encode-to-text(Protocol::Postgres::Type::Default: Str)'; these signatures all match:
(Protocol::Postgres::Type::Default: Str(Any:D) $input, *%_)
(Protocol::Postgres::Type::Default: Str(Any:D) $input, *%_)
in method encode at /opt/homebrew/Cellar/rakudo-star/2022.12/share/perl6/site/sources/4ABF3661E73A0A176F3A6DC0D272BA3FF21FF959 (Protocol::Postgres) line 780
in sub type-encode at /opt/homebrew/Cellar/rakudo-star/2022.12/share/perl6/site/sources/4ABF3661E73A0A176F3A6DC0D272BA3FF21FF959 (Protocol::Postgres) line 792
in method execute-prepared at /opt/homebrew/Cellar/rakudo-star/2022.12/share/perl6/site/sources/4ABF3661E73A0A176F3A6DC0D272BA3FF21FF959 (Protocol::Postgres) line 1386
in method execute at /opt/homebrew/Cellar/rakudo-star/2022.12/share/perl6/site/sources/4ABF3661E73A0A176F3A6DC0D272BA3FF21FF959 (Protocol::Postgres) line 1150
in sub MAIN at ./ncsp-changelog line 41
in block <unit> at ./ncsp-changelog line 3