Maybe you could simplify it and apply it to some other paradigm in a different form. It should be fun, but it takes time, I guess.I'm not in a hurry, but do I have what it takes, that's another question. Every language I created was very permissive with types: autocast, no need to declare anything, ...etc. The idea was to throw paint on a wall, with a lot of freedom. I think I'm ready for something more structured now. But I'll still do it my way of course.
In object oriented programming, there is a way to surpass object type declarations (like classes in Java) and build objects straight by assigning values (prototype based programming like in Javascript).This is how Seme (my previous lang) works. Objects have several protos, and if a slot cannot be found in the object, a lookup is done depth-first in all its protos. There's something similar here (the "pitbull is a dog" thing).
Regarding to your previous post, variables could be seen as functions with zero parameters, but again, maybe that is not what you are looking for.That's a very nice input, thank you. If a pure function has no parameter, then it's a simple variable indeed. It changes the syntax of the short syntax for variables definition. (I don't know whether my functions should be pure though, but that's another question.)
Function Split(ByVal s As String, ByVal x As String, ByRef a() As String) As Long
ee = 0: s = s & x
For d = 1 To Len(s)
i$ = Mid$(s, d, 1)
If i$ = x Then ee = ee + 1: a(ee) = Trim(w$): w$ = "" Else w$ = w$ & i$
Next
Split = ee
End Function
Colons should be used for code concatenation, compression.We don't even need a statement separator here, because
In my understanding, (a + b) is a type for (int << a, int << b)Is it like saying "int a and int b, seen as (a + b)"?
QuoteIn my understanding, (a + b) is a type for (int << a, int << b)Is it like saying "int a and int b, seen as (a + b)"?
I read somewhere that a type is a set of possible values. But here, it seems to be more than just that.