User loginNavigation |
archivesBabel-17 v0.2 spec is outHi, I am currently working on a new programming language which I call Babel-17. It is dynamically typed, mostly purely functional, but also object oriented and supports encapsulation via modules. I have written up a preliminary spec of it, which you can read here. There is no implementation of it yet, but I want to get implementations based on Java and on Objective-C out there as soon as possible. Yes, hopefully you can write parts of your iPad programs in Babel-17 soon :-) Best, Steven Obua Edit: Updated spec link. For up-to-date info, please go to babel-17.googlecode.com. Depends on what "is" isSounds like B. Clinton's evasive (but syntactically correct) answer to some deposition. But it's just a little lesson in associativity. We want "is" to be synonymous with "=". That sounds reasonable, right? We could do this at the lowest level, at the lexer, and really make things simple. But here comes "not". It's already an operator, and you want it to be so. And in (my) typeless world, "not" operates on integers just as happily as it does on booleans. There are two reasonable implementations for "not" on integers: multiplying by -1 or the function y = 1 - x. The first is sort of intuitive, the second makes not(1) equal to 0 and not(0) equal to 1. Either way, you lose. Choose the first, so "not x" => -1 * x and examine the expression 0 is not 0 You'd want this to be a false statement, but unfortunately, it might parse like this: 0 is (not 0) Yikes! Tell me that this is just an LL(2) thing and if I look ahead one more token I'll be OK. What I mean by that is: is my hack a canonical hack? When I see "is" I just greedily look ahead to see if the next token is "not". |
Browse archivesActive forum topics |