Which are your favorite programming language gadgets?

Posted by FerranB on Stack Overflow See other posts from Stack Overflow or by FerranB
Published on 2008-12-08T11:09:39Z Indexed on 2010/03/15 22:29 UTC
Read the original article Hit count: 324

There are some gadgets/features for programming languages that I like a lot because they save a lot of coding or simply because they are magical or nice.

Some of my favorites are:

  • C++ increment/decrement operator: my_array[++c];
  • C++ assign and sum or substract (...): a += b
  • C# yield return: yield return 1;
  • C# foreach: foreach (MyClass x in MyCollection)
  • PLSQL for loop: for c in (select col1, col2 from mytable)
  • PLSQL pipe row: for i in 1..x loop pipe row(i); end loop;
  • Python Array access operator: a[:1]
  • PLSQL ref cursors.

Which are yours?

© Stack Overflow or respective owner

Related posts about programming-languages

Related posts about favorites