News for hackers. Stuff that matters.
Re:Lisp and Smalltalk are dead: It’s C all the way down by haberman on Sunday August 16, 2009 @05:52PM (#766829)
Your initial claims were much broader than that ("I think that people talk about C as an important language because it is difficult to write programs in.", "Every year that goes by, C becomes less useful. How is this a good language to teach students?"), but let's go with your current claim.

Part of me sees the benefits of teaching computational complexity using a high-level language like Python. But part of me still can't buy into it, because what is the computational complexity of this excerpt of Python, in terms of n?

  strings = ["X"] * n
  concatenated = ""
  for s in strings:
    concatenated += s
The answer is that it depends on the implementation of Python!
Re:Lisp and Smalltalk are dead: It’s C all the way down by foldr on Sunday August 16, 2009 @05:54PM (#766831)
Well yeah, and the computational complexity of a program which calls a function in the C standard library depends on the implementation of C.
Re:Lisp and Smalltalk are dead: It’s C all the way down by haberman on Sunday August 16, 2009 @08:56PM (#767105)
You don't need the C standard library to write algorithms in C. Therefore you can do computational complexity analysis that is independent of the C language implementation.

(I don't actually think you could name a function from the ISO C standard library that differs in complexity across implementations, but it's besides the point).

Re:Lisp and Smalltalk are dead: It’s C all the way down by foldr on Sunday August 16, 2009 @11:11PM (#767260)
You don't need malloc, then? Please explain.
Re:Lisp and Smalltalk are dead: It’s C all the way down by haberman on Monday August 17, 2009 @03:44AM (#767571)
If you're analyzing complexity and your algorithm needs malloc(), then you implement and analyze malloc(). For example, see Knuth section 2.5.

By the way, do you have a point to make, or do you just enjoy being brusque?

Re:Lisp and Smalltalk are dead: It’s C all the way down by foldr on Monday August 17, 2009 @12:25PM (#768435)
I don't understand you here. If you write an algorithm in C that uses malloc, it will perform differently on different C implementations. This is exactly parallel to the fashion in which your python program will perform differently on different python implementations.