5 ms·
Pipeline operator is often superfluous if proper object oriented programming is used. "hello".capitalize (ruby style) "implicit 'it'" is my favorite: strings.f
by singularity2001 9y ago
Pipeline operator is often superfluous if proper object oriented programming is used.
"hello".capitalize (ruby style)
"implicit 'it'" is my favorite:
strings.filter{ it.length == 5 }
And Cascade operator
buttons..hidden=true
Automatic currying is dangerous
Method extensions are not 'new' but nice
- Sean1708 9y ago> Automatic currying is dangerous Why?
- tpxl 9y agoYou can accidentally leave out a parameter and end up with a function instead of the result.
- hood_syntax 9y agoThat's an issue when there's no type checking, but a lot of languages with currying by default have type systems
- Sean1708 9y agoAre there any dynamic languages that have automatic currying? I agree that that would be dangerous, but it's also something that I've literally never seen.
- tpxl 9y agoI don't know, but that's the first thing that popped into my mind after "this is cool". It would generally be a non-issue with good development tools.
- marcosdumay 9y ago> Pipeline operator is often superfluous if proper object oriented programming is used. Well, I have just replied to somebody asking about the differences: https://news.ycombinator.com/item?id=15669886 https://news.ycombinator.com/item?id=15669886 > Automatic currying is dangerous On languages that don't enforce numbers of arguments. That's Javascript, Python, and I don't think there's any other.
- wiml 9y agoThe "implicit it" is called anaphor in Lisp (though using that term for a programming language feature I think only goes back to the 1990s; the idea itself is older). (The word "anaphor" here comes from the study of grammar in natural languages.)
- kazinator 9y agoThe usage goes back to Paul Graham and his macros with the implicit it. Which appear in Arc. In which this site is developed.