@poundquerydotinfo@forum.virctuary.com
Post #1915994
2026-04-24 16:41 UTC
Related: Any language that allows you to type something like:
x = [1, 2, 3];
should also allow you to type:
x = [1, 2, 3,];
Oddly PHP is the only language I've used that accepts this. It looks a little ugly, but it becomes really necessary when you have something like this:
people = [
{ name: "Alice", age: 42 },
{ name: "Bob", age: 29 },
{ name: "Carol", age: 35 },
];
The cut, paste, and tweak when adding Dan just got less fiddly.
Replies (1)
-
@vollink@wandering.shop 2026-04-24 16:54
@poundquerydotinfo Perl is where i learned this form.