Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: What language features have particularly appealed to you?
8 points by zaphar on Nov 5, 2010 | hide | past | favorite | 9 comments
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?



List 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


Pretty much all of CLOS:

- Multimethods

- :before, :after and :around methods

- The concept of a Meta Object Protocol


Been wrapping my head around CLOS recently and has been really making me realize how OO can be done.


I remember a quote something like "CLOS is best thought of as being implemented in CLOS" - which pretty much sums it up for me. :-)


Anything 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.


Ruby blocks make the top of my list. I sorely, sorely miss them when I'm working in other languages.


Typeclasses in Haskell.


eval

blocks and define_method in ruby


REPL




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: