1. 54
  1.  

  2. 3

    I’d be interested in seeing the Python one that uses a lot of metaprogramming. Speaking of which, does anyone know a project with good Python code that makes extensive use of metaprogramming that I could read?

    1. 3

      Lines of code counted with wc -l seems far less interesting to me than the one group who found corner cases that nobody else did.

      1. 2

        Tend to agree, as lines of code don’t convey too much information. What I was hoping to see in addition is the number of external dependencies, ways of handling them, as well as the true metric of robustness of the system – time to do modifications when requirements change.

        1. 2

          What I was hoping to see in addition is the number of external dependencies,

          That number was given. The answer is zero. From the post:

          No libraries other than the standard library were allowed, and no parsing helpers even if they’re in the standard library.

          1. 1

            I know and I misspoke – what I wanted to write is: I was hoping to see a comparison that lists all the above. The project done in the article seems pretty nice – there are several teams implementing a complex project in different languages. That is something that could provide a lot of good insight into differences between various languages. However, no matter how cool are the compilers, they usually come without any external dependencies, and student projects never come with changing requirements.

            1. 2

              student projects never come with changing requirements.

              They could. Some probably should.

              However, no matter how cool are the compilers, they usually come without any external dependencies

              Huh, wat?

              The students were writing a program from scratch. As should any comparison between languages should. External dependencies, if any, can only be pulled in during the project (possibly as early as the design phase).

              But imagine for a minute that students can not only chose the language (they have to if we want to compare languages), but also are allowed to pull in external libraries. Now how can we possibly compare the languages? What used to depend on just the syntax, semantics, and standard library now depends on the quality, ease of use, and power of the dependency itself!

              Let’s say the students were implementing a web scrapper. If they’re allowed to use external dependencies, the end result is very likely to depend more on the HTTP and HTML libraries they are using than the qualities of the language they are using (what we want to compare), or their own skills (what the teacher wants to compare).

              Could you describe how you would go about comparing programming languages experimentally, given unlimited budget?

              1. 2

                But imagine for a minute that students can not only chose the language (they have to if we want to compare languages), but also are allowed to pull in external libraries. Now how can we possibly compare the languages? What used to depend on just the syntax, semantics, and standard library now depends on the quality, ease of use, and power of the dependency itself!

                But wouldn’t that be one of strong signals when choosing a language – the power of the ecosystem? We can’t write everything always from scratch, especially if it’s not the core business problem, thus we bring in external dependencies. Wouldn’t you want to pick up the language that has richer ecosystem, allowing you to quickly decide what you will bring in and not worry much about problems that might come, as opposed to a language with half-finished libraries for many of the common problems, or a language that has poor standard library?

                1. 1

                  For the languages in the discussion, I think we can assume the ecosystem question is sufficiently answered. I know this to be true of Haskell, Python, and Scala, and I am making assumptions about the others. I think @Loup-Vaillant’s point is reasonable — if the task is to implement a web scraper, it’s trivial enough to just include a Haskell library like scalpel, which then negates the value of the language juxtaposition.

                  1. 1

                    But wouldn’t that be one of strong signals when choosing a language – the power of the ecosystem?

                    It would be. When you choose a language, everything around the language is very important. When you make a language however, you don’t give a damn about the ecosystem: there is none to begin with.

                    Another point: if your project is big enough (or just innovative enough), the language might be more important than the ecosystem, perhaps even available expertise: the team can learn the language, make whatever is missing, and if the language is sufficiently miraculous, it may be cheaper to compensate for the lack of ecosystem than to chose a more mainstream alternative.

                    There are also all the middle ground. Say your application is unusually suited for the Java ecosystem. Plus, your team is well versed in Java. Except Java the language kinda suck. There are a number of concerns that it just doesn’t address very well. Well, a language specialist might just tweak the language a little bit, make a Java++ prototype in a week, and voilà, your proprietary additions to the language help everyone be a tiny bit more productive (which should compensate for that couple weeks of work).

                    From Jon Rossie

                    When a significant software project requires a database, database specialists are called in; when networking solutions are needed, networking specialists are called in; when special demands are placed on the operating system, operating systems specialists are called in. But the one thing on which every significant project makes special demands is programming languages. Every successful significant project I have seen has called in a languages specialist to adress these special needs.

                    Good luck convincing your boss that a language specialist might help, however.

        2. 1

          scc[1] or polyglot[2] instead of “wc -l” would probably make much more sence.

          [1] https://github.com/boyter/scc

          [2] https://github.com/vmchale/polyglot

          1. -5

            Everything here can totally be ignored IMO.

            1. 2

              Why’s that?