I like the # within "" - No Fluff Just Stuff

I like the # within ""

Posted by: Venkat Subramaniam on July 6, 2005

If like the C#/VB.NET feature:

Console.writeLine("f({0}) is {1}", x, f(x))

and I like this Ruby fature:

puts "f(#{x}) is #{f(x)}"

Neat. A #{} within a double quote is evaluated before it is sent to the puts.
Of course, you would not want to put some complicated expression within the
double quote... As with any feature, we have to use our judgment.

I hear you saying, "It does not take a whole lot to get Venkat excited." :)

Actually, I have been putting of blogging about another feature that is new to C# that I really like.
It is in Ruby and looks a lot better in Ruby than in C#. What is it?!

Venkat Subramaniam

About Venkat Subramaniam

Dr. Venkat Subramaniam is an award-winning author, founder of Agile Developer, Inc., creator of agilelearner.com, and an instructional professor at the University of Houston.

He has trained and mentored thousands of software developers in the US, Canada, Europe, and Asia, and is a regularly-invited speaker at several international conferences. Venkat helps his clients effectively apply and succeed with sustainable agile practices on their software projects.

Venkat is a (co)author of multiple technical books, including the 2007 Jolt Productivity award winning book Practices of an Agile Developer. You can find a list of his books at agiledeveloper.com. You can reach him by email at venkats@agiledeveloper.com or on twitter at @venkat_s.

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Languages on the JVM: Scala, Groovy, Clojure
  • Enterprise Java
  • Core Java, Java 8
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 4
  • Cloud
  • Automation Tools: Gradle, Git, Jenkins, Sonar
  • HTML5, CSS3, AngularJS, jQuery, Usability
  • Mobile Apps - iPhone and Android
  • More...
Learn More »