The March of Progress (in programming language syntax :)

For the Compleat Fan

The March of Progress (in programming language syntax :)

Postby xytroxon » Sat May 12, 2012 7:02 pm

From Hacker News:
http://alan.dipert.org/post/153430634/the-march-of-progress

Comments:
http://news.ycombinator.com/item?id=3963541

--------------------

The March of Progress

* 1980: C

printf("%10.2f", x);

* 1988: C++

cout << setw(10) << setprecision(2) << showpoint << x;

* 1996: Java

java.text.NumberFormat formatter = java.text.NumberFormat.getNumberInstance(); formatter.setMinimumFractionDigits(2); formatter.setMaximumFractionDigits(2); String s = formatter.format(x); for (int i = s.length(); i < 10; i++) System.out.print(' '); System.out.print(s);

* 2004: Java

System.out.printf("%10.2f", x);

* 2008: Scala and Groovy

printf("%10.2f", x)

------------------

-- xytroxon ;o)
"Many computers can print only capital letters, so we shall not use lowercase letters."
-- Let's Talk Lisp (c) 1976
xytroxon
 
Posts: 296
Joined: Tue Nov 06, 2007 3:59 pm

Return to Anything else we might add?

Who is online

Users browsing this forum: No registered users and 1 guest

cron