aboutsummaryrefslogtreecommitdiff
path: root/cm/ex02.decl
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2025-10-15 20:31:31 +0000
committerrtk0c <[email protected]>2025-10-15 20:31:31 +0000
commit81cab430b58b75fe0a6c75722908481dd4d9d55a (patch)
tree499ba0404470de6047238eb554da6f2afa965e24 /cm/ex02.decl
parentbc8c20d1e93b5c18e8915d356e74024092a74ce8 (diff)
Move imported files into metafang/ dirHEADmaster
this metaprogramming attempt was started outside, and then imported here 5124eb80701523ac16928219e9a1031eded128ef..bc8c20d1e93b5c18e8915d356e74024092a74ce8
Diffstat (limited to 'cm/ex02.decl')
-rw-r--r--cm/ex02.decl22
1 files changed, 0 insertions, 22 deletions
diff --git a/cm/ex02.decl b/cm/ex02.decl
deleted file mode 100644
index d695e33..0000000
--- a/cm/ex02.decl
+++ /dev/null
@@ -1,22 +0,0 @@
-// Declarations only version of Cm (like mojo/protobuf? not sure)
-
-// assume special receiver (as opposed to smalltalk/objC style message passing)
-// -- actually, on second thought, this has nothing to do with dispatching (and smalltalk is single dispatch)
-// -- (no touching multiple dispatch since that's equivalent to reinventing a new language)
-// overloading discouraged, because runtime has to do extra work dispatching
-// declare functions outside, with `this` keyword marking receiver
-// - in C, func -> prefixed with reciever type, 1st arg is reciever pointer
-// - in C++, func -> member function
-// - lua (or whatever else), reciever type correspondingly
-
-Foo {
- data
-}
-
-// C: mangling
-// C++: overloading
-// Lua: generate binding with type detection based dispatcher
-fn some_function(this: Foo, arg: i32)
-fn some_function(this: Foo)
-
-// alternative: use S-expression, get rid of parsing step?