Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Why is C++...

Name: Anonymous 2011-12-07 12:06

...so bad? Why does it have such a bad reputation?

I'm an experienced C++ programmer and, while the language has warts, I can't understand the reason for the enormous amount of criticism against the language.

I'd like to hear the honest opinions of /prog/rammers in this regard.

Name: Anonymous 2011-12-18 17:52

>>256
First, both CL and Scheme have more than one data structure, Scheme has strings, vectors, and conses, and most implementations have more, like Racket and hashes.

#(1 2 3) is not syntactic sugar for (vector 1 2 3). It's just a vector. Both at compile time and run time. It does NOT become irrelevant after a few levels of macros, because they're always there and they would be there even if they were some kind of crippled data structure.
#hash[eq[v]]((x . 1) (y . 2)) is an hash (in Racket). See why there are 12 of them in >>258. Immutable hashes are backed by Red-black trees (IIRC), to achieve sharing. I agree the syntax for them is a little (too much) heavyweight. It also has box literals, regexp/perl-compatible-regexp literals, and bytestring literals. What Racket is really missing is set literals, I wish it had them on {}.

CL has #An() literals for arrays. They really are arrays and blah blah blah. I can't talk much for CL since I don't use it.

Conses are mutable both in CL and Scheme, so that's not why they are used for homoiconicity, but because conses can make trees, and Lisp source code is, well, an abstract syntax tree.
Being defined in terms of a data structure doesn't mean forcing it on lambda-lists (i.e. on fn and let).
Do you want vector lambda-lists? It's ok:
(define-syntax-rule (fn #(x ...) bd ...)
  (lambda (x ...) bd ...))

((fn #(x y) (+ x y)) 2 3) ; => 5
(vector? #()) ; => #t

Why aren't vectors used in macros? Because there's no point to use them instead of lists.

So, you want hash literals so much to renounce to call/cc? That's too bad, because I have both. Now stop posting these uninformed idiocies on Scheme and Lisp in general.

Clojure has a better support for sequence abstraction than most Schemes (that I know), though. CL and Racket are ok in this regard, but Racket's feels kind of unnatural. Maybe it's just me.

>>257
set! and pseudo object systems are not idiomatic Scheme, except when writing those pseudo object systems (like SICP's).

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List