I've often mentioned the idea of changing application programming so more responsibility is offloaded to "The System" (or "The Framework") for managing invalidation. What I'm suggesting isn't quite as pathological as "Completely recompute the layout of every page in Microsoft Word on each keystroke". But I do think that programmers could express
(
Read more... )
Comments 7
Reply
What I was messing with here really does have a lot in common with functional programming, and increasingly I saw that it needed its own language. People have enough trouble closing files that they open, so when you ask for them to write stylized C++, it's kind of a lost cause. I had come up with a few tricks, which can be simplified a bit to demonstrate what I'm talking about:
class TreeNode
{
...
private: // can't call constructors explicitly
TreeNode();
TreeNode(std::string data);
public:
static std::auto_ptr Create(std::string data); // use this instead
...
public:
TreeNode* InsertChild(std::auto_ptr child);
std::auto_ptr Detach();
...
};Then, I was using protected inheritance to make derived classes with no data members that ( ... )
Reply
Reply
IT SHOULD SAY: std::auto_ptr
Reply
I've personally become disillusioned with C++, so I would write
TreeNode* GetParentMaybeNull
but call it simply GetParent() and expect a NULL if there is no parent.
And std confuses me. :-P
Reply
Reply
[IMG]http://www.sedonarapidweightloss.com/weightloss-diet/34/b/happy.gif[/IMG]
Reply
Leave a comment