News for hackers. Stuff that matters.
Re:Want cleaner code? Use the rule of six by xigoi on Saturday September 24, 2022 @12:47PM (#32964350)
Nim, D, VimScript and other languages have “uniform function call syntax”, which allows you to chain arbitrary functions like this (not just the ones that the author decided to declare as methods, like in Ruby and other class-oriented languages).
Re:Want cleaner code? Use the rule of six by irq-1 on Saturday September 24, 2022 @03:04PM (#32965608)
I wonder how much of Go's simplicity comes from having "package.function" syntax that doesn't allow you to put too many functions in a single line? People complain about Java because of the length of the names. Do they complain about to many functions in line? Maybe with ( ? : ) Lisp has )))))) which seems like a stupid complaint, but maybe that's tied to people having to remember too much?