News for hackers. Stuff that matters.
Re:The Neat Programming Language by FeepingCreature on Monday December 25, 2023 @04:23PM (#38766246)
I tried, I failed, now it's too late. Just gonna hope not many people remember that other language.

Not sure what you mean with `[]`?

Re:The Neat Programming Language by dianeb on Monday December 25, 2023 @04:38PM (#38766376)
This construct: string longestLine = [ argmax(line.strip.length) line for line in text.split("\n")]; print(longestLine);

looks problematic to me -- are the brackets indicating scope? an array? something else?

As far as the naming is concerned, you'll probably have to put up with remarks such as "neat code is messy" because that's the way people are with something new. Don't let that dishearten you!

Re:The Neat Programming Language by FeepingCreature on Monday December 25, 2023 @05:00PM (#38766545)
Yeah that's a macro (`std.macro.listcomprehension`), you can copy that file and change it to be whatever syntax you like. It's indeed inspired by Python's syntax.
Re:The Neat Programming Language by AeroNotix on Monday December 25, 2023 @04:47PM (#38766448)
It looks like what python calls a list comprehension. An expression which builds up each element of a sequence, potentially from another sequence.