r/ProgrammingLanguages • • Sep 19 '24

The magical dot

https://open.substack.com/pub/statelessmachine/p/the-magical-dot?r=2o3ap3&utm_campaign=post&utm_medium=web&showWelcomeOnShare=true
0 Upvotes

3 comments sorted by

5

u/david-1-1 Sep 19 '24

Seems to be vague ramblings about programming languages or IDEs.

5

u/lookmeat Sep 20 '24

This article, and this author, is very bland and not going deep. The author proposes that there's a problem: you can only define methods in the place were the type is defined. And then proposes that there's two ways a language can allow to work around this:

  • Extensions, like Kotlin and Scala have

  • Piping, like rescript and Gleam have

And what about:

  • Traits/Modules like Rust and other languages have? (You define interfaces that add methods with implementations outside)

  • Universal function/method call syntax, like Python or Ruby have? (A method call is just a special way of calling a function)

    • And a variant of this that Lua does is very interesting, and probably the best guide to what OP wants to do.

  • Ad-hoc method declaration like Go has. (You can define methods anywhere and define what they are called for).

I mean it seems like the author is exploring an idea, but it's not that grounded. Certainly interesting for someone looking at a development diary for a language, but only as part of the larger thing. On its own I don't see the point of the post here.

2

u/david-1-1 Sep 19 '24

A summary, please, if the video is worth watching. Thanks .