Top tag
Next privilege 200 Rep.
See reduced ads
~2k people reached

  • 0 posts edited
  • 0 helpful flags
  • 22 votes cast
comment What's the shortest generating one-way hash algorithm?
TL;DR It can't be done.
comment What are appropriate metaphors for the pieces of a word processor?
Decent word processors try to approximate TeX, with varying levels of success. It makes no sense to provide an "abstraction" that doesn't cover the basics of text layout that have been practiced for hundreds of years. You're not talking about an editor, you're talking about a word processor. If all you want is TeX output, then LyX is there, no need to reinvent the wheel. If all you want is an editor, then look at various abstractions present in editor toolkits.
comment Interview question “What is virtual function”
Of course it's not quite so: virtual or not, you still retain access to all accessible methods. You simply explicitly which one you want: A::method or B::method. Otherwise there'd be no way to call the base class's method in a derived one :)
comment What are appropriate metaphors for the pieces of a word processor?
Abstractions #3 and #4 are your own fantasy, I'm afraid. You cannot lay out anything that resembles good looking text while limiting yourself just to one line at a time, or one paragraph, or even one page. A document has to be laid out in entirety, where content on any page can potentially impact any other page in the document, and it is device dependent so screen and paper will differ if readability is at stake. To have an idea about what it takes to lay out good looking text, just look at how TeX does it.
comment Why is sizeof called a compile-time operator?
@MichaelT: The size of an instance of a type can certainly change -- there's class polymorphism, after all. I'd argue that sizeof(polymorphic_ptr*) being constant is quite counter-intuitive and just silly. Yeah, it's the C++ way, but silly nevertheless.
comment Why do some programmers think there is a contrast between theory and practice?
@FBG: Brilliantly said.