pillar-markup / Microdown

Microdown is a cleaned and simpler markdown but with more powerful features such as extensions.
Other
39 stars 30 forks source link

Table strange situation #893

Open Ducasse opened 6 hours ago

Ducasse commented 6 hours ago
#### Some existing Object Pattern Matching Languages

We studied existing pattern-matching languages to understand what features they offer. 
The goal of our matching language will be to offer all these features. 
We limited ourselves to Object Oriented GPLs. 
We considered the top OO languages used in 2022 according to [Github](https://octoverse.github.com/2022/top-programming-languages): C#, C++, Java, Javascript, Python, Ruby, Typescript (three more languages are not OO: C, PHP, Shell). 
We added Rust and Scala that are well known for their pattern matching capabilities. 
And we added a library in Pharo (`RBParseTreeSearcher`) because this is the language we are working with.

@tabobjectLanguagesTable
|Characteristics        |  C#  |  Java |   Pharo (4) |  Python |  Ruby |  Rust | Scala
| --------------------- | ---- | ----- | ----------- | ------- | ----- | ----- | -----
|_Paradigm_           |  D&I |   D&I |     I       |  D&I    |  D&I  |  D&I  |   D
|_Path traversal_     |      |       |             |    x    |       |   x   |   x
|_Recursive traversal_|      |       |      x      |         |       |       |      
|_Repeated search_    |      |       |      x      |         |       |       |
|_Object matching_    |   x  |  \(1\)|     \(5\)   |    x    |   x   |   x   |   x
|_Wildcard_           |   x  |   x   |      x      |    x    |   x   |   x   |   x
|_Structural pattern_ |   x  |   x   |      x      |    x    |   x   |   x   |   x
|_Complex lists_      |   x  |  \(2\)|      x      |         |   x   |       | 
|_Literals_           |   x  |   x   |      x      |    x    |   x   |   x   |   x
|_Logical matcher_    |   x  |   x   |             |    x    |   x   |   x   |   x
|_Negation_           |   x  |  \(3\)|             |    x    |   x   |       | 
|_Non-Linear pattern_ |   x  |   x   |      x      |         |       |       |

Table *@tabobjectLanguagesTable@* shows the features supported by different OO languages that have native pattern matching capabilities.

Without surprise, _Object matching_ is well supported. 
_Structural pattern_ and _Wildcard_ are also two features that are common. On the other hand, it shows that features like _Path traversal_, _Recursive traversal_, _Repeated search_, _Complex lists_ and _Non-Linear pattern_ are not universally supported by object matchers.
Ducasse commented 6 hours ago

produces

Capture 2024-10-07 at 10 26 40 Capture 2024-10-07 at 10 26 32