Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table strange situation #893

Open
Ducasse opened this issue Oct 7, 2024 · 1 comment
Open

Table strange situation #893

Ducasse opened this issue Oct 7, 2024 · 1 comment

Comments

@Ducasse
Copy link
Contributor

Ducasse commented Oct 7, 2024

#### 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
Copy link
Contributor Author

Ducasse commented Oct 7, 2024

produces

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant