Interviews: Ask Alexander Stepanov and Daniel E. Rose a Question 80
An anonymous reader writes "Alexander Stepanov studied mathematics at Moscow State University and has been programming since 1972. His work on foundations of programming has been supported by GE, Brooklyn Polytechnic, AT&T, HP, SGI, and, since 2002, Adobe. In 1995 he received the Dr. Dobb's Journal Excellence in Programming Award for the design of the C++ Standard Template Library. Currently, he is the Senior Principal Engineer at A9.com. Daniel E. Rose is a programmer and research scientist who has held management positions at Apple, AltaVista, Xigo, Yahoo, and is the Chief Scientist for Search at A9.com. His research focuses on all aspects of search technology, ranging from low-level algorithms for index compression to human-computer interaction issues in web search. Rose led the team at Apple that created desktop search for the Macintosh. In addition to working together, the pair have recently written a book, From Mathematics to Generic Programming. Alexander and Daniel have agreed to answer any questions you may have about their book, their work, or programming in general. As usual, ask as many as you'd like, but please, one per post."
Early Soviet Computing? (Score:5, Interesting)
If you can suggest references (preferably in English) I would be most appreciative. I know of only one book [sigcis.org] and it seems to be a singular point of view.
Re: (Score:2)
Back in the day, Byte did some reporting on the state of Soviet microcomputing.
Re: (Score:3)
My question is similar: when will programming evolve to use subject-predicate syntax, rather than function-argument?
Function-argument goes back (at least) to Frege, and his prejudices against subject-predicate syntax (which dominates natural languages). But isn't changePassword(a,b) more ambiguous than "change the password from a to b"? Don't we get an "information gain" effect from using a syntax we are familiar with outside of programming? When you first come to a function-argument command such as (in Oz,
Re: (Score:1)
Some "real world" programming languages already have that feature. The foremost is Objective C, widely used for programming Apple products, which I believe inherited it from Smalltalk. Compare this Objective C fragment:
myColor = [UIColor colorWithRed: 127 green:127 blue:127 alpha:1];
with the equivalent Java code:
myColor = new Color(127, 127, 127, 255);
A singular feature of Objective C, as compared with other languages, is that the method signature is composed of all the intermediate words (adverbs o
Re: (Score:2)
javac references imported classes from the .class(es) rather than, say, a plaintext header file. Java bytecode doesn't typically preserve parameter names*. Hence the only information the compiler sees for Color is a constructor with 4 int parameters.
* (apparently if you compile with the -g option, for debugging, that info is preserved. Or with -parameters with Java 8)
Search seemingly getting worse over time (Score:3)
Is this the result of attempting to dumb-down the interface for tailored results, or something else or more insidious? Obviously the amount of content on the Internet is growing, but the computing power to process through all of it is growing too, so I would expect it wouldn't be getting this much worse, this quickly.
Re: (Score:3)
Re: (Score:3)
Re: (Score:2)
I was wondering something similar. Often times recent news tends to overshadow search results.
Let me give a practical example. Grand Jury. proceedings have undergone serious reform since the 70s. In some states a target can demand to appear before the Grand Jury. In some states a No Bill precludes the State from representing the case. In others there must be clear new evidence before a case can be represented. I know one state has a three striges rules for GJ proceedings ( sorry don't remember which).
The da
Re: (Score:3)
Re: (Score:2)
Re: (Score:2)
I just played with boolean searches on google yesterday or the day before: they did not work at all! (And there is no help available on google indicating that they should work).
Re: (Score:2)
For my two cents, I haven't noticed any re
Re: (Score:2)
Re: (Score:2)
Alexander Stepanov's STL (Score:3, Insightful)
Have you had regret nightmares since unleashing STL?
Re: (Score:2, Redundant)
Why would he have nightmares? The idea of concepts and separating algorithms and data in that way was completely revoloutionary.
STL (Score:4, Interesting)
I'm a huge fan of the STL, and I think the design has stood the test of time amazingly well.
That said, you now hae a bunch of hindsight. What would you do differently knowing what you know now.
Also if you were doing it today and using today's languages, how do you think it would differ?
Re: (Score:2)
Related question: C++ was originally conceived as "C + Simula", but something that is interesting about the STL is how non-object-oriented it is, in particular using no inheritance.
If we were designing a new "better C" today, one that you'd be happy to implement a STL-like system in, knowing what we know now, would we bother with Simula-style objects at all?
Re: (Score:2)
First of all the STL is very object oriented, after all everything is capsuled into a class. Second: ofc it also uses inheritance! Look at iterators e.g.
Re: (Score:2)
Merely using information hiding doesn't make something object-oriented. There is virtually no OOAD in the STL.
(Pun intended; grep for virtual in the C++ standard library some time.)
Re: (Score:2)
What has virtual vs non virtual to do with that? :)
Regarding OOAD I'm of the opposte opinion, seperation of concerns is IMHO one of the most important aspects os OOAD and that one is certainly met.
Inheritance and virtual methods are not the only aspects nor the most important ones
Re: STL (Score:1)
Don't let Stepanov hear you say the STL is object-oriented. He has famously trashed OO, very publicly. Also, where do the iterator's use inheritance?
Re: (Score:2)
The iterators use inheritance to distinguish between forward, backward and random_access iterators.
The generic algorithms rely on that distinction.
Re: (Score:1)
Re: (Score:2)
Inheritance is not required to make something object oriented.
Everything in the STL is a class, so _it is_ object oriented. Even if it mainly where structs it would be.
Having to inherit to use something also is no definition of object oriented. However you can inherit, if you see so fit.
I don't use C++ anymore (regularily) ... so perhaps the implementation of the STL has changed. When it was new it used inheritance in the iterator area as there was no other way to make an generic algorithm to accept only ce
Re: (Score:2)
STL is actually object-based, rather than object oriented. STL uses classes for encapsulation, but doesn't really use inheritance, and and definitely doesn't use virtual functions, which is what classically means object-oriented. Whatever inheritance is used are more for refinement of concepts rather than object oriented programming.
Re: (Score:2)
An implementation can not be object based :D
It is a language that is either object based or object oriented.
The lack of usage of a language feature is "interesting" but does not define the implementation.
Also keep in mind that the iterators in the STL _use_ inheritance! Alebit no virtual functions/methods.
I strongly disagree that virtual methods and/or inheritance makes a system "object" oriented and the lack of it makes it non object oriented. But perhaps that is mainly an academic stand point.
Re: (Score:1)
C++ (Score:2)
Why the choice for an existing language and not craft your own language?
Re: (Score:2)
The first implementation was in Ada. It wasn't the full STL as we know and love it today, of course.
Re: (Score:1)
He also worked in Scheme and Ada before picking C++. He dabbled with early versions of Java, but (I believe) he had already decided "object orientedness is almost as much of a hoax as Artificial Intelligence" so that didn't go anywhere ( http://www.stlport.org/resources/StepanovUSA.html for the quote).
Good programmer (Score:2)
Russian smarts (Score:1)
Russian programmers and hackers are famous for being extremely smart. This is also a fame your fellow countryman hold from Chess tournaments and other competitions of the mind.
In your opinion:
GotW #50: vector is not a container (Score:2)
Alex: I regard my first encounter with the STL (very shortly after its first public release) as one of the great eye-opening moments in my software development career. Unfortunately, as I'm sure you well know, quality of implementation issues in compiler support for the C++ template idiom cultified (i.e. made cult-like) the deeper principles for at least five (if not ten) years thereafter.
GotW #50 [www.gotw.ca]
I've long regarded the criticism against vector[bool]—I'm not going to fugger with angle brace entities
Re: (Score:2)
Self reply:
I see in my post that IDLV mutated into IDVL and I mangled an mdash entity into a real mdash in one sentence. Pardon my sloppiness, but I didn't want to miss this opportunty despite feeling a bit rushed.
What's your time like? (Score:3, Interesting)
How much of your time do you dedicate to computing vs doing other things; what are your other hobbies or is the work you do also your play time?
Memory exploitation and countermeasures .. (Score:1)
c++ templates design (Score:1)
Why is Generic Programming often second class? (Score:1)
We see many programming languages with at least some support for Generics, but usually as a second class citizen, and often added as an afterthought in later releases, and subordinate to some other programming paradigm. Java is primarily OO, with generics added later. C# is also primarily OO, though with generic support. It took C++ several iterations to get generics, and C++ is "multi paradigm". Go doesn't have generics, and doesn't seem like it will not a while.
It seems to me like generic programming
What is the results of your programming teaching? (Score:1)
Alex, I saw some of interesting programming lecture video at A9 lab. What is the outcome of your teaching? Do you think the audiences applied your methodologies in daily programming work?
Indexing for regular expressions. (Score:2)
Often times I search for something and I want to search for a regular expression. Is there any technique that allows for indices on such?
Re: Opinion on Boost (Score:1)
Anyone can tell you Boost is a mixed bag. It was begun as an incubator for future std libraries, and it's succeeded: most of the new libraries in C++11 were Boost libraries first. Shared_ptr, chrono, random, regex... all good libraries. That's not to say all the Boost libraries should be in the standard, or are fit for that.
Is Generic Programming Domain Specific? (Score:1)
goto considered harmful (Score:1)
What is your current view on Dijkstra classic claim:
"go to statement considered harmful"
in Communications of the ACM / March 1968
Hardware evolution (Score:1)
Standardisation of Concepts (Score:2)
History of standardization of STL (Score:2)
STL was a pretty radical departure from the way classes and libraries were designed pre-STL. I am very keen to know a bit about the history of STL’s inclusion into the standard.
When you originally proposed STL for adoption into the C ++ standard, how receptive / enthusiastic was the C++ committee towards STL? What design decisions / compromises did you have to make to get it accepted? How much resistance did you face?
For example, you have noted that it took a major effort to convince the committee tha
Success of STL (Score:2)
STL has been wildly successful and has pretty much completely changed the way libraries are designed not just in C++ but also in in other languages. Most mainstream languages have added facilities to write generic code.
When designing and proposing STL for inclusion into the standard, did you expect it to be this successful? Why do you think it has been this successful?
Concepts in C++ (Score:2)
In you book "Elements of Programming", you spend a lot of time on concepts. The paper "A Concept Design for the STL", the basis of the latest concept design for C++, references your book extensively. You of course co-authored that paper. I am therefore quite keen to hear your views on C++ Concepts.
Do you think that language support for concepts (or equivalent constructs like Haskell typeclasses) is important for writing generic code? How deeply are you involved in the effort to get concepts into the C++ sta
Deficiencies in C++ (Score:2)
As we all know, C++ is far from perfect. There are several features which you discuss in your books and papers, like concepts and UNDERLYING_TYPE, which C++ is currently missing but proposed for C++17 (e.g. destructive move). However there are things you have criticized before, like the memory allocation interface, which are still as they were 25 years back.
What do you dislike the most about C++? What would you change or add to the language to make it better?
Limitations of STL Design (Score:2)
The iterator based approach of STL works very elegantly for 1 dimensional data structures but fails to generalize cleanly for higher dimensional structures. For example, there is no easily defined way of iterating over a 2d array or a graph. Also, the notion of regular types, discussed in your book Elements of Programming, also fails to generalize for 2 or higher dimensional types, like complex numbers and matrices. They lack the total ordering property.
Of course, you can artificially define an ordering, sa
Eudlid's Elements (Score:1)
segmented iterators (Score:1)
STL, ranges, and C++17 (Score:1)