News for hackers. Stuff that matters.
Re:How I Built Zig-SQLite by metadat on Friday May 27, 2022 @07:39PM (#31536173)
Is `.{"somevalue"}` a string array of length 1?

The dot seems quite superfluous and quite the silly quirk (in an unintuitive way). How do Python and Go get by without such a mystery sigil?

Re:How I Built Zig-SQLite by throwawaymaths on Friday May 27, 2022 @08:29PM (#31536473)
It's a tuple of length one with an array of u8. A tuple is an anonymous struct with special fields that are numerical, note that also tuples can be accessed by index syntax. Some distinction from empty braces is necessary because "naked" empty braces are for code blocks. It's only unintuitive to you because it's different and you're not used to it yet.