Does scheme serve as a filter for TeXmacs extension submissions much like LaTeX does for paper submissions in math/CS?

Indeed I just agreed with you that we are neither using a functional language.
What I see is that everybody is using its own language: Google has Go, Apple has Swift and Microsoft has .NET-based languages, then there are languages on the JVM like Scala and Clojure (this last very similar to Lisp), then Game industry uses C++ (as far as I know) and maybe Lua for scripting. Finance companies also use OCAML or Haskell, Erlang is used for server side code in some cases:

This is what one of the creators of Julia says of Lisp:
" This is what I do for fun, because it is the exact opposite of the kind of thing people will pay for: an obscure implementation of a programming language everybody hates."
(https://github.com/JeffBezanson/femtolisp)

I agree that Scheme is not “purely functional”. However, given that the term was used here in reference to the use of Scheme, one could assume that the other common, perhaps less well defined, use of the term was implied, meaning a language whose syntax and functionality makes it convenient to use functions as arguments and return values from other functions (as e.g. is done in Scheme’s Wikipedia article, this blog post, or in The Jolly Writer,Sec. 14.1.3). In this sense, it is not a matter of putting langues in “cases” and I understand that languages can support multiple paradigms (as many languages do these days). I would then also say that TeXmacs relies heavily on many paradigms: functional methods, contextual overloading, macro’s and perhaps more.

Using this definition, I don’t see any evidence for statements that it’s the functional paradigm that would be turning people away from certain languages.

By the way, by “multiple dispatch”, I would understand this Julia-style behaviour in TeXmacs:

(tm-define (square x)
  (:require (number? x))
  (* x x))

(tm-define (square x)
  (:require (string? x))
  (string-append x x))

Scheme]  (square "hello ")
"hello hello "

Scheme]  (square 2)
4

while TeXmacs’ contextual overloading mechanism seems much more general than this.

Anyhow, that’s just a matter of terminology, which is maybe not that interesting to discuss :slight_smile:

What is more interesting to me is what properties make Scheme so uniquely suited to defining a new programming sub-language. What functionality is needed for that? Wouldn’t this be possible using Julia’s meta-programming features as well?

You are right, I was using “multiple dispatch” in a somewhat generalised sense (that is why I took care to put in parenthesis what was I actually meaning).

As for Julia macros they seems to be as powerful as Scheme macros. However note that in Scheme (and not in Julia) macros can be used to redefine any language construct, that is you can build a completely different language, e.g. by redefining “if”, “define”, etc… so there is no difference between the Scheme language and the modifications the programmer can make to it. This is a good and bad side, whichever you choose.

TeXmacs is written in a sublanguage of C++ and a sublanguage of Scheme. We do not use any of the new fancy features of C++ nor libraries or of the complex datatype in a modern Scheme. We use strings, integers, classes without many virtual methods, etc… This allow the project to be robust and live long, you do not have to be an expert in C++ or in Scheme to write code for TeXmacs. You learn what you need along the way. Programming TeXmacs is a lot of fun, also for this reason.

I do not even get the main critique of @amichail, any CS student can put Python in his curriculum, but to stand out you need to show that your curriculum is different, that you are familiar with many different languages, since you do not know what will be needed in 5 years.

1 Like

The first thing is to find somebody implementing such, which is highly nontrivial. TeXmacs supports scheme because it is partly based on that.

Plugins should be something similar to macros in Microsoft Office. As far I know, MS Office has not yet supported Python macros? I know that LibreOffice supports that.