?

Log in

No account? Create an account
Was working on Dryice last night, and came up with an interesting… - The Desian Universe
Links Home / GitHub January 2017
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
 
 
 
deskitty
deskitty
Des
Sat, Aug. 7th, 2004 10:31 am
Was working on Dryice last night, and came up with an interesting idea that I'm toying around with.

Instead of doing parameterized typing (where you can have a class, and perhaps some subtypes a la list<int*gt; for a list of integers), instead have a more general constraints system, e.g. list<type is int> or int<self < 10>.

I'm still toying around with this idea, and there are a couple of problems with it (for instance, < and > are bad delimiters, and I'm not sure what to do when the function you're in already has a self), but it looks more interesting/workable to me right now than something like list<int>.

Really, it's just syntactic sugar, but it means I can get away without implementing "real" parameterized types. ;)

-- Des

CommentReplyShare