5 ms·
Ask HN: What language features have particularly appealed to you?
What language features have you come across that particularly appealed to you?
This isn't a "which is your favourite language?" question but rather which feature of a language most appealed to you. I was thinking the other day of which features of various languages most appealed to me and came up with the following list:
* Erlang's Pattern Matching
* Lisps Macros
* The ADTs in ML Variants
* Go's Interfaces
* Clojures Protocols
* Tail Recursion in various Functional languages.
What would make your list?
- arethuza 16y agoPretty much all of CLOS: - Multimethods - :before, :after and :around methods - The concept of a Meta Object Protocol
- mdg 16y agoREPL
- adambyrtek 16y agoList comprehensions. Because the syntax is powerful, concise and readable at the same time. It closely reassembles mathematical set notation, making it fairly easy to grasp. Moreover many interesting problems can be expressed in terms of list comprehensions (like the Norvig's spelling corrector[1]). [1] http://norvig.com/spell-correct.html http://norvig.com/spell-correct.html
- mathgladiator 16y agoAnything languages that enables full closures is good for me. Anything less and the boilerplate code drags me into an oblivion of my own depression to think I may need to use sed to fix bugs.
- sz 16y agoTypeclasses in Haskell.
- jclemenson 16y agoeval blocks and define_method in ruby
- cheald 16y agoRuby blocks make the top of my list. I sorely, sorely miss them when I'm working in other languages.