Advertisement
Nickname
noecasas
Registered since:
February 1, 2009
Short bio:
 
Home page:
 
Total posts:
14

Forum posts by noe casas:

1 page [ 1 ]
Posted in All Buzz Forum, Sep 24, 2009, 10:55 PM
Much has been said about C++ generic programming, some things good, some things not. In this post, which is the first in a series devoted to C++ generic programming, I would like to dig in the role templates play in the C++ programmer toolset.C++ is a multi-paradigm language, supporting procedural, object oriented and generic programming, but...
Posted in Java Buzz Forum, Sep 24, 2009, 10:55 PM
Much has been said about C++ generic programming, some things good, some things not. In this post, which is the first in a series devoted to C++ generic programming, I would like to dig in the role templates play in the C++ programmer toolset.C++ is a multi-paradigm language, supporting procedural, object oriented and generic programming, but...
Posted in All Buzz Forum, Feb 28, 2009, 7:26 PM
I really like garbage collected languages, they make you feel safe, confident for not having to explicitly manage memory...but at some price: expressiveness on object ownership and lack of control of objects lifecycle; when an instance of a class is created, no one but the garbage collector is responsible for taking care of that object. We are...
Posted in Java Buzz Forum, Feb 28, 2009, 7:26 PM
I really like garbage collected languages, they make you feel safe, confident for not having to explicitly manage memory...but at some price: expressiveness on object ownership and lack of control of objects lifecycle; when an instance of a class is created, no one but the garbage collector is responsible for taking care of that object. We are...
Posted in All Buzz Forum, Feb 14, 2009, 1:26 PM
This is the first piece of C++ code many programmers wrote:std::cout.operator<<("hello world!").operator<<(std::endl);Don't believe me? Let's reorganize it a little bit:std::cout << "Hello world!" << std::endl;More familiar now, isn't it?The dark feature that makes it possible for the latter to be equivalent to the...
Posted in Java Buzz Forum, Feb 14, 2009, 1:26 PM
This is the first piece of C++ code many programmers wrote:std::cout.operator<<("hello world!").operator<<(std::endl);Don't believe me? Let's reorganize it a little bit:std::cout << "Hello world!" << std::endl;More familiar now, isn't it?The dark feature that makes it possible for the latter to be equivalent to the...
Posted in All Buzz Forum, Feb 2, 2009, 3:03 AM
Short version:In C++, if an implementation of operator->() returns something different than a raw pointer, operator->() will be invoked on that return value; this will happen again and again until at some point a raw pointer is returned.Lil' longer version:One of the operators C++ allows to be overloaded is "->" . This enables syntactic...
Posted in Java Buzz Forum, Feb 2, 2009, 3:03 AM
Short version:In C++, if an implementation of operator->() returns something different than a raw pointer, operator->() will be invoked on that return value; this will happen again and again until at some point a raw pointer is returned.Lil' longer version:One of the operators C++ allows to be overloaded is "->" . This enables syntactic...
Posted in All Buzz Forum, Feb 2, 2009, 1:01 AM
Short version:Read, compile and run the following piece of C++ source code:#include <iostream>class Smi { public: static Smi* fromInt(int value) { return reinterpret_cast<Smi*>(value); } int value() { return reinterpret_cast<int>(this); } void sayHello() { std::cout value() }};int main(void) { Smi* five = Smi::fromInt(5); Smi*...
Posted in Java Buzz Forum, Feb 2, 2009, 1:01 AM
Short version:Read, compile and run the following piece of C++ source code:#include <iostream>class Smi { public: static Smi* fromInt(int value) { return reinterpret_cast<Smi*>(value); } int value() { return reinterpret_cast<int>(this); } void sayHello() { std::cout value() }};int main(void) { Smi* five = Smi::fromInt(5); Smi*...
Posted in All Buzz Forum, Feb 1, 2009, 11:01 PM
Short version:Some forms of defensive programming hide bugs, YOUR bugs.Other forms enforce design-by-contract style enhancing both quality and maintainability of the software.Choose wisely...Lil' longer version:Of course you know what "defensive programming" is, but perhaps you haven't heard it being called so until now; let's see it in...
Posted in Java Buzz Forum, Feb 1, 2009, 11:01 PM
Short version:Some forms of defensive programming hide bugs, YOUR bugs.Other forms enforce design-by-contract style enhancing both quality and maintainability of the software.Choose wisely...Lil' longer version:Of course you know what "defensive programming" is, but perhaps you haven't heard it being called so until now; let's see it in...
Posted in All Buzz Forum, Feb 1, 2009, 9:01 PM
Short version:Implementation inheritance breaks encapsulation and leads to the Fragile Base Class (FBC) problem.Lil' longer version:Here is the list of buzzwords I'm going to use along this post: implementation inheritance, method precondition, method postcondition, class invariant, encapsulation, Liskov substitution principle. Let us give some...
Posted in Java Buzz Forum, Feb 1, 2009, 9:01 PM
Short version:Implementation inheritance breaks encapsulation and leads to the Fragile Base Class (FBC) problem.Lil' longer version:Here is the list of buzzwords I'm going to use along this post: implementation inheritance, method precondition, method postcondition, class invariant, encapsulation, Liskov substitution principle. Let us give some...
1 page [ 1 ]
Advertisement