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 22:27

I'll start with >>67.
https://en.wikipedia.org/wiki/S-expression
S-expressions are just syntax. Code and data both, indeed. S-expressions are atoms and lists of S-expressions. A list is delimited by parentheses. That is all there is to it.
The s-expression is the let form!
Not yet. That is a list of three S-expressions; starting with the atom let.
It just so happens that this form represents a valid program (for whatever implementation of Lisp this is that doesn't require double-parenthesised let bindings).
To compare, (let my ass) is also a valid S-expression, but not a valid program.
The let form will be part of the AST. The pipeline involved in parsing a valid Lisp program: characters -> tokens -> S-expressions -> AST.

>>65
Your error is less egregious.
This is obviously unhomogenous: not every form is a s-exp anymore
Much like '(a b c) is syntactic sugar for (quote a b c), so too is [a b c] sugar for (vector a b c). There being values other than plain lists and atoms does not imply un-homoiconicity (which I believe is the term you were looking for).
For example, (let [args (vector x 5)] (eval `(let ,args (+ x 1)))) would be equivalent to (let [x 5] (+ x 1)) (I think; I am tired).
Like quote, unquote, and quasiquote, the square brackets don't remove homoiconicity. They just add convenience.

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