objeck / objeck-lang

Objeck is a modern object-oriented programming language with functional features tailored for machine learning. It emphasizes expression, simplicity, portability, and scalability. The programming environment consists of a compiler, virtual machine, REPL shell, and command line debugger with IDE plugins.
https://objeck.org
Other
157 stars 11 forks source link

Add `->ToString()` method to Collections #280

Closed ghost closed 1 year ago

ghost commented 1 year ago

So you could use something like Vector -> ToString() -> PrintLine().

Btw, what about adding ->Print() and ->PrintLine() method to Collections so we could print a vector's content to screen directly?

Vector -> Print()

Vector -> PrintLine()

objeck commented 1 year ago

Yes, if the generic collection type has a Print or PrintLine method. We will need to use introspection to check. Not hard, but another refactor.

objeck commented 1 year ago

It has been added.