bad language design ideas I just made:

assignment sometimes means the same thing as array.append

it's because the format of a flag is like:
$variable="value"
$variable2=#FF00FF

shape{
$color
}

but one of the special variables is the "name" and a flag can have multiple names. So... you just assign the variable more than once! and it remembers all of them!

this is because things like the classic rainbow flag are known as "gay", "rainbow", and "rainbow1979"

it may be the first language where "thick" is a reserved word, though

OH ALL RIGHT I took out the magic syntax for assignment vs array.append.

it just makes lists slightly more complicated now. So instead of:

$name="gay"
$name="rainbow"
$name="rainbow1979"

you now write:

$name=["gay", "rainbow", "rainbow1979"]

it just required ONE person to accuse this of being "perl-like semantics" to shame me into changing the language.

Follow

@foone This almost looks like PHP, only the ; are missing.
Also, in php, they have '$name[] = "meow";' for append.

· · Web · 2 · 0 · 0

@DPA @foone wait, does perl even support this kind of thing? from what i understand you have to call push or unshift to add stuff to an array, rather than using a special version of the assignment syntax

i don't have that much perl experience so there might be like, a deprecated syntax that technically works as an alternative to calling the array manipulation builtins? but i did a quick search and found nothing about it :blobcatgooglyshrug:

this absolutely works in php though yes

Sign in to participate in the conversation
Awoo Space

Awoo.space is a Mastodon instance where members can rely on a team of moderators to help resolve conflict, and limits federation with other instances using a specific access list to minimize abuse.

While mature content is allowed here, we strongly believe in being able to choose to engage with content on your own terms, so please make sure to put mature and potentially sensitive content behind the CW feature with enough description that people know what it's about.

Before signing up, please read our community guidelines. While it's a very broad swath of topics it covers, please do your best! We believe that as long as you're putting forth genuine effort to limit harm you might cause – even if you haven't read the document – you'll be okay!