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

[C++] delete considered harmful

Name: Anonymous 2016-01-02 14:13

The unbridled use of the delete statement has as an immediate consequence that it becomes terribly hard to find a meaningful set of coordinates in which to describe the process progress. ... The delete statement as it stands is just too primitive, it is too much an invitation to make a mess of one's program.

Never use delete, use smart pointers, memory pools, stack allocations. Don't break RAII.

Name: Anonymous 2016-01-08 12:09

>>64
I'm using my own definitions because I'm smart unlike you.

Yes, in Common Lisp every form is a s-exp. The stuff you're wondering about like vectors are actually atoms, which makes them s-exps (although not every s-exp is an atom - is your pea-brain sufficient to understand this point?).

It is obviously not the same in Clojure. For instance the following is correct syntax there:

(let (x 5) (+ x 1))
(let ((x 5)) (+ x 1))


Instead, it forces you to use something that is not a s-exp:

(let [x 5] (+ x 1))

The creators of Clojure call it "extending the code-as-data system beyond parenthesized lists (s-expressions) to vectors and maps". This is obviously unhomogenous: not every form is a s-exp anymore, which is in stark contrast to Common Lisp and Scheme.

To learn more about Clojure, visit http://clojure.org/lisp

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