Live data from Hacker News

Ask HN: What's with all the new languages?

news.ycombinator.com

61–68 of 68 posts

Re: Ask HN: What's with all the new languages?

#61
A couple thoughts on C++ vs Objective C...

When I learned c++, it was sold as a better/safer version of C. You had function prototypes, const, inline functions, improved compiler warnings, etc. Some of those improvements made it into later versions of the C standard. I hope C89+ is more popular than K&R C for new code. You could slowly ease into and benefit from day one without ever using a class.

Objective C is strictly the classes and runtime so there's no benefit unless you jump right in.

Re: Ask HN: What's with all the new languages?

#62

Earlier quoted context omitted.

There's a lot more to an actual Lisp than lambda calculus. No Lisp ships with just lambda – that would be absurd and unusable. So there are design choices: choices of standard functions like "car", "cdr", "set" – and what kind of scoping "set" implements. The Common Lisp and Scheme specs are literally lists of design choices.

If you don't already know, there is a Church encoding for singly-linked lists that is in the lambda calculus. We can already implement some of the operations you have listed with just lambdas: (defun cons (x y) (lambda (z) (z x y))) (defun car (l) (l (lambda (x y) x))) (defun cdr (l) (l (lambda (x y) y))) It's not like a lisp with 'just lambda' would be 'absurd and unusable'. I just showed you, we can implement cons,…

Brainfuck is Turing-complete too. That doesn't make it usable.

Re: Ask HN: What's with all the new languages?

#64

Earlier quoted context omitted.

If you don't already know, there is a Church encoding for singly-linked lists that is in the lambda calculus. We can already implement some of the operations you have listed with just lambdas: (defun cons (x y) (lambda (z) (z x y))) (defun car (l) (l (lambda (x y) x))) (defun cdr (l) (l (lambda (x y) y))) It's not like a lisp with 'just lambda' would be 'absurd and unusable'. I just showed you, we can implement cons,…

Brainfuck is Turing-complete too. That doesn't make it usable.

[gratimax shows you how to implement car, cdr and cons in brainfuck]

Re: Ask HN: What's with all the new languages?

#66

Earlier quoted context omitted.

If you don't already know, there is a Church encoding for singly-linked lists that is in the lambda calculus. We can already implement some of the operations you have listed with just lambdas: (defun cons (x y) (lambda (z) (z x y))) (defun car (l) (l (lambda (x y) x))) (defun cdr (l) (l (lambda (x y) y))) It's not like a lisp with 'just lambda' would be 'absurd and unusable'. I just showed you, we can implement cons,…

Why does everyone think they're the only person who knows about lambda calculus? No kidding, lambda is turing complete, so yes, you can implement car and cdr with it. But just because you can do everything with lambda doesn't mean that it's actually done that way.

Would you call scheme unusable? Of course not, people use it every day. It has 12 'fundamental forms' that cannot be implemented within the language itself without a compiler. Every other library function(except low-level IO ones) is defined in terms of these forms. From the language designers, "we realized that the lambda calculus—a small, simple formalism—could serve as the core of a powerful and expressive programming language."

Re: Ask HN: What's with all the new languages?

#67

Earlier quoted context omitted.

Why does everyone think they're the only person who knows about lambda calculus? No kidding, lambda is turing complete, so yes, you can implement car and cdr with it. But just because you can do everything with lambda doesn't mean that it's actually done that way.

Would you call scheme unusable? Of course not, people use it every day. It has 12 'fundamental forms' that cannot be implemented within the language itself without a compiler. Every other library function(except low-level IO ones) is defined in terms of these forms. From the language designers, "we realized that the lambda calculus—a small, simple formalism—could serve as the core of a powerful and expressive program…

The meat of the S6RS spec is 55 pages [1]. This proves my point rather than refuting it: there's a lot more to Scheme than lambda – 55 pages of design decisions more.

[1] http://www.r6rs.org/final/r6rs.pdf

Re: Ask HN: What's with all the new languages?

#68

Earlier quoted context omitted.

[gratimax shows you how to implement car, cdr and cons in brainfuck]

brainfuck has no procedures, so no can do. :)

Since Brainfuck is turing complete, this is untrue – you can emulate procedures and then define car, cdr and cons as emulation-level procedures.
Post reply on HN