News for hackers. Stuff that matters.
Re:Why should I have written ZeroMQ in C, not C++ (part II) by kombine on Thursday August 30, 2012 @12:49PM (#4455501)
Well, incapsulating algorithms is great. But incapsulating of the data is not always. Languages like Haskell completely go away without it.
Re:Why should I have written ZeroMQ in C, not C++ (part II) by bunderbunder on Thursday August 30, 2012 @01:13PM (#4455636)
The two are not separable. If people can monkey around with the data structures that your algorithm relies on, then the algorithm is not encapsulated.

Languages like Haskell rely on it as heavily as any other well-crafted system. Imagine Data.HashTable it were originally implemented using linear probing, and someone wanted to modify (upgrade?) it to use cuckoo hashing or hopscotch hashing instead. It wouldn't be possible to do without breaking existing software if users were permitted to directly access the underlying data structures.

Re:Why should I have written ZeroMQ in C, not C++ (part II) by heretohelp on Thursday August 30, 2012 @01:40PM (#4455772)
Incapsulating, in this context, isn't a word.

You want encapsulate. Encapsulation. Encapsulating.

The "en" prefix means put into or on something. You're saying you're putting something into a capsule or "isolating it".

The "in" prefix in English usually is the negative, or "not".

Intolerable: not tolerable.

Re:Why should I have written ZeroMQ in C, not C++ (part II) by kombine on Thursday August 30, 2012 @03:04PM (#4456202)
Thanks for correction. I am not a native English speaker and in Russian(my native language) the word Encapsulation starts with Cyrillic "и" to which the closest analogue in Latin is "i" - hence the confusion!
Re:Why should I have written ZeroMQ in C, not C++ (part II) by heretohelp on Thursday August 30, 2012 @03:08PM (#4456223)
> I am not a native English speaker and in Russian(my native language) the word Encapsulation starts with Cyrillic "и" to which the closest analogue in Latin is "i" - hence the confusion!

I figured, I'm a native English speaker learning Russian, as it happens.

Будем здоровы