[Petal] New syntaxes
Jean-Michel Hiver
jhiver at mkdoc.com
Thu Jul 10 10:32:22 BST 2003
> Possible but very very messy. You'd have to compile the code with lots of
> extra monitoring code to check what the types were, record that info and then
> recompile the whole thing again based on that. If you ever put different
> types into your data, you'd either get errors or worse still no errors, just
> incorrect results.
I agree with you - sounds like some kind of coding nightmare. And it is
possible that with all this 'intelligent' optimization you might end up
slowing things down.
> At least with the {} and [] syntax you are making a conscious decision. I
> don't really like the current "do the right thing" behaviour because maybe
> Petal's "right thing" is actually the wrong thing. I'd much rather specify
> that x is a method call or y is an array access.
After all I think your approach is right. Make it entirely backwards
compatible so people who don't want to worry about it don't, and add
your own extensions for those who want to get some extra boost.
> I'm not talking about changing the syntax, the old syntax would still be there
> because it's also useful. I'd just like the option to be there and I think
> using Perl's notation makes sense because it's what we're familiar with,
Plus it's pretty standard programming syntax to use square braces to
specify an array index... Which is probably really the only thing that
bothers me: it /feels/ more like a programming language.
I suppose that since it is entirely optional it is not such a big
deal... But it sure is a controversial subject :)
Cheers,
--
Building a better web - http://www.mkdoc.com/
---------------------------------------------
Jean-Michel Hiver
jhiver at mkdoc.com - +44 (0)114 255 8097
Homepage: http://www.webmatrix.net/
More information about the Petal
mailing list