[…]
x = construct_object()
ObjectContainer.Add(x)
…
//End of block - ‘x’ is automatically… oops!
That’s why you have refcounting or similar.
That indeed has a bunch of issues, but it’s quite handy if you want
deterministic behavior and minimal “garbage collection” delays for optimal
memory footprint.
[…]
More useless typing. Even more useless typing if you want a pointer to
a pointer, or a pointer to an array, or an array of pointers, or a
pointer to an array of pointers, etc…I’m sorry, but that’s extremely vague and sounds more like ranting than
anything useful. How is writing out information that makes a program
easier to read when you come back to it (or when someone else has
to maintain it) “useless”?
+1
(Not that I’m a Delphi fan specifically - although I have developed Delphi
applications, and I don’t think the language is all that horrible; just mildly
annoying, mostly because I’m so used to C and C++…
I’m really not a fan of nonsensically wordy syntax, but being able to clearly
express your intentions is very useful, both for trapping things at compile
time, and for making the code more human readable. Even some redundancy to
help catch typos can be warranted at times.
Why?
Because most of us spend much more time messing with existing code (fixing
bugs, adding features, reusing old code in new projects etc), than writing
brand new code. Some extra typing may cost a second or two per line, but if it
can save hours down the road, can you really afford to “save” those
seconds…?
[…]
(And it definitely makes reading good code easier. You can’t say that
about anything from the C family.)
That might, to some extent, be an effect of “us” C/C++ programmers taking
pride in writing “clever” code. ;-)On Thursday 08 April 2010, at 23.14.43, Mason Wheeler wrote:
–
//David Olofson - Developer, Artist, Open Source Advocate
.— Games, examples, libraries, scripting, sound, music, graphics —.
| http://olofson.net http://kobodeluxe.com http://audiality.org |
| http://eel.olofson.net http://zeespace.net http://reologica.se |
’---------------------------------------------------------------------’