Des (deskitty) wrote,
Des
deskitty

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
Subscribe

  • (no subject)

    Well, I'm off to Dreamwidth. I hope to see you all there! Nice knowing you, LJ. It's been grand. — Des

  • A fresh start?

    So I'm thinking of moving away from LJ. Every time I glance at my ad blocker, there are an uncomfortably-large number of advertising and tracking…

  • 2012: Ramp It Up

    It’s that time of the year again -- another year has passed, and as usual, I don’t finish reflecting on it until the first 3 months of the following…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments