Re:Streem – a new programming language from Matz
by nightpool on Thursday December 11, 2014 @03:05PM
(#8736781)
it's also non-idomatic in that is uses string-multiplication and ==0 where an "if not" ternary expression would be much cleaner.
[ Parent
| on HN ]
Re:Streem – a new programming language from Matz
by SwellJoe on Thursday December 11, 2014 @04:12PM
(#8737087)
Yes, a ternary would be clearer, to me. I wasn't sure what was happening with the * (and thought maybe it was some use of the "whatever star" in Perl 6, when I was thinking it might be Perl 6, though it doesn't look like any use of the whatever star I've seen), but I just assumed it made sense to someone who knew the language well. It's been a decade since I worked in Python with any regularity.
Re:Streem – a new programming language from Matz
by nostrademons on Thursday December 11, 2014 @04:23PM
(#8737129)
I would probably use a named function call in real code, but the 'text * (expr == 0)' idiom is pretty clear to me as a way to conditionally include text based on whether a condition is true or not.