Hacker News new | ask | show | jobs
by dianeb 903 days ago
Once upon a time, NCR's mainframe language was called Neat (the version I briefly used was called Neat/3 which was a low-to-mid-level language if memory serves. I was writing compilers.) My memories of a language with that name are unpleasant.

This is probably the least useful of all comments, but please think of another name. My quibble with the language has to do with the use of '[' .. ']' pairs. I'm not confident that refactoring will be straight-forward. I could be wrong.

1 comments

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 `[]`?

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!

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.
It looks like what python calls a list comprehension. An expression which builds up each element of a sequence, potentially from another sequence.