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

D vs JavaScript

Name: Anonymous 2012-02-22 16:35

whoever wins, /prog/ loses

Name: Anonymous 2012-02-22 17:11

I decided I'd learn a bit of D.

There's a tutorial online (http://www.informit.com/articles/article.aspx?p=1381876&seqNum=4). A couple sentences stuck out at me.

Unlike C arrays, D arrays know their own length, accessible as arr.length for any array arr. Assigning to arr.length reallocates the array. Array accesses are bounds checked; code that enjoys risking buffer overruns can scare the pointer out of the array (by using arr.ptr) and then use unchecked pointer arithmetic.
1. Assigning to arr.length?!
2. Why on earth would you talk that way?
3. Andrei Alexandrescu... Isn't this guy the vice president of D or something? Does that mean his weird ideas are a direct influence on the language?

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