What is Science?
Posted Jun 30, 2012 8:44 UTC (Sat) by Cyberax
(✭ supporter ✭
In reply to: What is Science?
Parent article: Why learn C? (O'Reilly Radar)
Uhm. Why classes are 'buzzword'? They are, like, 30 years old buzzword.
In fact, even in languages like Java/C# architects now try to separate data from functionality (Fowler calls that 'anemic domain model').
And I don't understand that bit about 'useless abstractions'. For example, this kind of code:
void add_point(double x, double y, double z)
point_callback=boost::bind(&dist_summator::add_point, &sum, _1, _2, 123.0d);
Is worse than something like this:
(void)(void*, int, int) point_callback;
void * point_callback_ctx;
typedef struct _dist_summator_with_fixed_z_ctx
void sum_x_y(void *ctx_ptr, int x, int y)
ctx->sum+=sqrt(x*x+y*y+ctx->z*ctx->z); //Whoopsie, forgot about ints here!
point_callback = &sum_x_y;
point_callback_ctx = &ctx;
to post comments)