Hacker News new | ask | show | jobs
by rramadass 806 days ago
A better example is the Oz programming language and the Mozart programming system (https://en.wikipedia.org/wiki/Oz_(programming_language)) explained in the book Concepts, Techniques, and Models of Computer Programing by Peter Van Roy and Seif Haridi.
1 comments

Not necessarily. Oz was created as poster child to multi-paradigm language design. The book shows this. Each paradigm gets its own chapter and Oz examples to program in each are shown. This is similar to the cirricula structure author mentions. In contrast the article makes a case for programming without paradigm distinction and mixing elements across styles.

Since Oz's Wikipedia page was linked, Wikipedia apparently has a page (https://en.wikipedia.org/wiki/Comparison_of_multi-paradigm_p...) comparing multi-paradigm languages (though can be argued all languages nowadays are multi-paradigm). A summary table for some of those (partial support isn't considered):

           |   Paradigms supported     |  
  Language  Native  Libs  Others  Total
  Wolfram      14     0       1     15
  Oz           11     0       0     11
  Raku         10     1       3     14
  Racket       10     0       1     11
  Julia         9     5       3     17
  Scala         9     0       0      9
  Haskell       8     5       2     15
  Perl          8     1       0      9
  CLisp         7     8       2     17
  C++           7     7       1     15
  Python        6     4       0     10
  Java          6     2       0      8
  Rust          6     0       1      7
  JS            4     3       2      8
  Fortran       4     1       0      5
  OCaml         4     0       0      0
  Go            4     0       0      0
  Lua           3     0       0      0
Interesting ones will be Wolfram supporting the most basic (not in others) natively, CLisp the only one supporting all the basic considering libraries, and Julia that alongside CLisp support the most considering extra (in others). Moreover CLisp alongside C++ show that thanks to libraries supported can be greatly extended (doubled in those two). To also compare to article, another will be Haskell supporting more paradigms (even only considering native ones) than Rust. Sadly Nim and Gleam aren't in list.
The original article did not actually make much sense to me since there can be no "Programming beyond Paradigms" by virtue of the fact that all languages allow solving problems in at least one "default" Paradigm (the computation model embodied by its abstract machine). Thus the correct term is "Multi Paradigm" and current day languages do this to varying levels of ease by providing appropriate syntactic features mapping to abstract machines. In that regard Mozart/Oz is the poster child since unlike other languages that is its stated goal.

The author states "I believe that programming paradigms are now best understood as a style of programming, rather than as an exclusive set of features." which is not correct. A "Style of Programming" is not a "Paradigm" unless that style embodies a specific computation/abstract machine model. The relevant syntactic features could be used in a mix-and-match manner to increase the design expression space. A good example is the template features in C++; originally designed as an alternative to macros to implement containers until some smart people figured out that it was much more powerful and could be used for programming in the "Functional Paradigm" (with some additional extensions).

My impression is that the Wolfram language is not particularly object-oriented and that it does not support OOP. Am I wrong? It has certain features that are enablers for libraries supporting OOP.

OTOH Java has a defined language standard (independent of implementations), which describes classes/fields/methods/dynamic dispatch/inheritance/hiding/constructors, ... ( https://docs.oracle.com/javase/specs/jls/se22/html/jls-8.htm... ).

I fail to find a similar language definition of OOP for Wolfram. That could be me.

Not sure either. Could exist but don't know about it and sadly Wolfram lacks a formal specification. After bit of searching though found there're few[0] packages to enable object-oriented programming. So can probably assume there isn't native support for it. Seems the Wikipedia page needs more thorough research.

[0]: https://raw.githubusercontent.com/antononcube/MathematicaFor...