wmww/Pinecone

Help.

Closed this issue · 1 comments

How does one make a class? Using data structures like:

myClass :: {
   name: ""
   myFunc :: {} -> {String} : (
      print: "Hi, " + name
   )

Or by using left input?

myClass: ""
myFunc :: {myClass}.{} -> {String} : (
   print: "Hi, " + name
)
wmww commented

Using left input is correct. You can not have functions inside type definitions. Pointers are not yet implemented (or at least not exposed by the language syntax) so you can't really have proper classes. Since currently everything is pass by reference, changes you make to the objects data inside a member function will not take affect once the function returns (and even changing data in structures or tuples is not yet supported). These issues are definitely ones I will be addressing soon.