...
responsible for making sure that the reference count is always correct and, if the
reference counter drops to zero, to delete the pointer. Therefore, you must overload
those functions for your ... Often, it
makes sense to parameterize these functions, and simply forward to member
functions of the managed type to do the work (for example, calling add_ref and
release). If the referen...
... technical questions about this book, send email to:
bookquestions@oreilly.com
For information about books, conferences, Resource Centers, and the O'Reilly
Network, see the O'Reilly ... favorite
technology book, it means the book is available online through the O'Reilly
Network Safari Bookshel
f.
Safari offers a solution that's better than e-books. It's a...
... complex for no good reason.
.3. Typing
One of the most fiercely debated topics in programming languages is the benefit of
strong, static typing strategies. Java's strategy opts for ... a type is enforced, or interpreted. In a
weakly typed language (like C), variables can be coerced easily, or interpreted as
something else. A strongly typed language strictly enforces comp...
...
The type is bound to the object. Therefore, the type of containers can change. An
imperfect rule of thumb is that static languages force you to declare variables, but
dynamic languages ... different, and convert objects that aren't. The
extra syntax provides valuethe compiler has more information to catch bugs
earlier. There's a cost, too. Static typing makes you work harder...
... on information in a variable's type. You can't always get the same contextual
information out of a Ruby or Smalltalk IDE.
4
http://www.agiledeveloper.com/articles/GenericsInJavaPartI.pdf, ... ever opt for strong, static typing. There are at least two compelling reasons
to do so. Static typing reduces certain types of errors (like misspelled variable
names), and provides mo...
... that I interviewed for
this book recognized that static typing limits productivity for application
development dramatically, though some said they were willing to pay the cost for
certain types ... Static typing enforces typing rules at compile time, when they are least
expensive to fix.
Static interfaces make it easier to enforce a protocol across important
boundaries. For...
... same syntactic sugar for hashes as for arrays.
Code blocks make iteration tighter and easier.
If you're a big Java collections user who's used a dynamic language before, you
probably ... 10) = = = 5
=> true
You get more convenient syntactic sugar. Now, a for loop turns into this:
irb(main):021:0> for c in 'g' 'k'
irb(main):022:1> puts...
...
always take lessons learned into account),
partially due to a lack of performance tuning
on the original stack, but mostly due to the
fact that the performance gains with Rails are
easy to achieve. ...
surprised at the level of performance I was
able to achieve. The Rails version of the app
was fast, and faster even than the original
Java version. That's partially due to a bette...
... approach often makes it much easier to design and
refactor complex web screens. For example, here's the rendering for the shopping
cart:
html divNamed: 'cart' with: [
html small: ...
block, so links don't get out of sync. The framework manages them for you.
Seaside is modal. This is the author's word for a continuation server
ap
proach. Seaside lets...
... the primary reasons for its success, but sometimes
also a formidable source of headaches because of the complexity of certain parts of
the language. For instance, the rules for numeric conversions ... the resource still exists. If it doesn't,
accessing it wreaks havoc. With weak_ptrs, the information that the shared
resource has been destroyed is propagated to all weak_ptrs o...