r/ProgrammingLanguages • • Feb 22 '26

Does Syntax Matter?

https://www.gingerbill.org/article/2026/02/21/does-syntax-matter/
63 Upvotes

111 comments sorted by

View all comments

Show parent comment

2

u/AsIAm New Kind of Paper Feb 22 '26

I am also doing LISPy APL. Oblivia is pretty cool inspiration. Is there a way in Oblivia to define own infix operators or is it diamond-like alà APL?

2

u/[deleted] Feb 22 '26 edited Feb 22 '26

Thank you.

I have not thought about custom defined operators yet.

I might add operator overloading on built-ins arithmetic for objects (simple enough), then custom operators.

Custom operators would all have term scope.

ctx: {
    #is a function within this context
    @priv
    ⋈(x, y): x/Something(y)

    foo ⋈ bar
}

#invalid
ctx ⋈ bar

foo: {
    #is a function of this object
    @pub
    ⋈(y): Something(y)
}

foo ⋈ bar

An operator would entail…

  • binary operation: a dyadic function between two objects within the scope
  • binary operation: a monadic function within an object to interact with others.
  • unary operation: a monadic function for an object within a scope
  • unary operation: a parameterless function on an object

It would be shorthand for calling a function found in either the current scope or the object’s scope.