Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?

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."
This discussion has been archived. No new comments can be posted.

Interviews: Ask Alexander Stepanov and Daniel E. Rose a Question

Comments Filter:
  • by eldavojohn ( 898314 ) * <eldavojohnNO@SPAMgmail.com> on Monday January 05, 2015 @02:17PM (#48738403) Journal
    Alexander Stepanov, I have never had a chance to ask someone as qualified as you about this topic. I grew up on the opposite side of the Iron Curtain and have constantly wondered if (surely there must have been) alternative computing solutions developed in the USSR prior to Elbrus and SPARC. So my question is whether or not you know of any hardware or instruction set alternatives that died on the vine or were never mass fabricated in Soviet times? I don't expect to you to reveal some super advanced or future predicting instruction set but it has always disturbed me that these things aren't documented somewhere -- as you likely know failures can provide more fruit than successes. Failing that, could you offer us any tails of early computing that only seem to run in Russian circles?

    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.
    • by sconeu ( 64226 )

      Back in the day, Byte did some reporting on the state of Soviet microcomputing.

  • by TWX ( 665546 ) on Monday January 05, 2015 @02:32PM (#48738585)
    This is more for Daniel Roseis, but to what do you attribute the seeming decline in the quality of search results? I used Digital's Alta Vista search engine when it was fairly new and it seemed revolutionary and seemed to provide me with exactly what I wanted. Over time that declined and Alta Vista as it was ceased to be, and Google initially also seemed to provide me with exactly what I wanted. Now it seems like I have to put a whole lot of thought into faking Google into performing a somewhat-boolean-style search for me, and normal boolean expressions themselves no longer seem to work.

    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.
    • by itzly ( 3699663 )
      Could also be the result of companies trying to tune their web pages for search results.
      • by TWX ( 665546 )
        If it were companies that'd be one thing, but I get explicit search terms that do not appear in the resultant pages, nor do quoted expressions work as well as they used to.
    • 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

    • It might just be that the ratio of crap to cream on the internet is worse. In 1998, generally you didn't have a web site without something important to say. Or, if it was a personal web site on GeoCities or Angelfire, the nature of the site would be obvious from the URL, not to mention the content and layout. Computing power has been improving, but that doesn't mean search results improve. That requires a better search algorithm which is a different thing entirely.

      For my two cents, I haven't noticed any re
      • I think it's mostly a problem of sites repeating each other. So much of the web is just aggregators aggregating other aggregators, adding nothing of value. From the traditional search perspective they look extremely relevant, since they're all in agreement, when in reality they are all equally useless.
        • That's one of the major things I had in mind when thinking about "crap" - also auto-generated pages with zero content but lots of search keywords. Try to find lyrics or tabs of some obscure song on the internet, and you'll get a million pages titled "Rainbow Ffolly - Labour Exchange lyrics", all of them saying something like "We don't have lyrics for this song yet..."
  • by MouseR ( 3264 ) on Monday January 05, 2015 @02:36PM (#48738617) Homepage

    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)

    by serviscope_minor ( 664417 ) on Monday January 05, 2015 @03:17PM (#48739023) Journal

    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?

    • 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?

      • 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.

        • 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.)

          • 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 :)

        • 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?

          • The iterators use inheritance to distinguish between forward, backward and random_access iterators.

            The generic algorithms rely on that distinction.

            • by catf00d ( 451699 )
              Ah, you're referring to the inheritance relationships between the iterator tags, not the iterators themselves. The tags are metadata, not objects. The inheritance is a trick used in the guts of the algorithm implementations because C++ doesn't let you overload functions on concepts. You can't use that to claim the STL is object-oriented. You never have to inherit from anything to use the STL, even if you write your own custom iterators.
              • 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

        • 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.

          • 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.

  • I remember reading you settled on C++ back in the 90s to implement STL.
    Why the choice for an existing language and not craft your own language?
    • The first implementation was in Ada. It wasn't the full STL as we know and love it today, of course.

    • He actually did try creating at least one language: look for "Tecton" on http://www.stepanovpapers.com/ (it's in more than one section).

      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).
  • How to achieve excellence in programming and design ? I am working as a programmer for a year now. but I don't know what i am doing
  • 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:

    • Is this true?
    • If so, is it a case of the crème de la crème, say the top 20 best Russian hackers, being much smarter than the top 20 hackers from the rest of the world? Or is it a case of there being many more smart people in general in Russia, compared to other countries?
    • If true, would you attribute it
  • 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

    • by epine ( 68316 )

      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.

  • by mlheur ( 212082 ) on Monday January 05, 2015 @06:11PM (#48740707)

    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?

  • How difficult would it be to eliminate heap overflows, buffer overruns & stack exploits on the current x86 PC compatible architecture?
  • Heheh... well, designing c++ templates, in my mind, ranks as low as Java genetics design....
  • 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

  • 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?

  • 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?

  • Is there a domain that is better for generic programming than others? When Alexander talks about efficiency in "Elements of Programming", it seems that generic programming is specifically targeted for writing libraries. So, are there areas that benefit more from generic programming (like libraries) and areas that benefit less, such as user interfaces?
  • What is your current view on Dijkstra classic claim:
        "go to statement considered harmful"
    in Communications of the ACM / March 1968

  • The STL is about three decades old. In that time, we've seen both OS and hardware evolution. What is the impact of these changes on how the STL should be used? How would the STL be different if it where implemented targeting modern environments?
  • Mr Stepanov, do you follow the ongoing efforts to standardise Concepts as a language feature in iso c++? If so, how do you think it's going? Would you do anything differently? To what extent do you think the standard library should provide Concepts? I recall learning about Concepts from the SGI STL doc many years ago and being very surprised to find that things like ForwardIterator weren't part of the iso spec.
  • 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

  • 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?

  • 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

  • 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?

  • 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

  • In your book you mention Euclid's Elements. It is the oldest continuously use textbook in history, but is it really relevant to a computer science education?
  • The STL iterator approach as proven very successful for data structures like lists/vectors/tree/etc. Yet for data structures that have a segmented structure such as deque, hash tables, sub-matrices, B-trees, STL has a high abstraction cost for iterators, forcing you to make extra unnecessary checks when comparing two iterators. (see for example Matthew H. Austern's paper "Segmented Iterators and Hierarchical Algorithms": http://lafstern.org/matt/segme... [lafstern.org]) Do you believe STL should be extended with an addit
  • Eric Niebler recently proposed a major TS (https://github.com/ericniebler/range-v3) that aims to refactor STL to introduce ranges. It also breaks compatibility in minor ways (e.g. by allowing for two iterators specifying first and last positions to be of different types), so it will likely be introduced as a new additional library to eventually replace the existing STL, while being very close to compatible. Given that such a rewrite is open to making some changes that break compatibility, are there any oth

Research is what I'm doing when I don't know what I'm doing. -- Wernher von Braun