top down bottom up that's the way we like to metaprogram
Name:
Anonymous2014-06-22 11:59
How would you implement this? You can't know the output of a ``real macro'' without running the macroexpansion function on the body. Of course, if you're talking about Scheme-like macros, it would be feasible.
Care to give a few examples of how it would be more powerful?
Name:
Anonymous2014-06-22 12:20
I'm top-down and bottom-up, anus ready to work
Name:
Anonymous2014-06-22 14:13
>>3 It's powerful the same way exploratory programming is more powerful. Bottom-up vs top-down. It's better and way more powerful.
Why bother with typesafe macro expansion if any unsafe expansions are going to be checked by the next compiler phase? I'm genuinely curious.
Name:
Anonymous2014-06-23 0:35
>>9 You wouldn't ask that question if you'd ever used Lisp. You've got a stack of macro calling macro calling macro, and when the resulting code doesn't compile, you need to know which of that stack of macros stinked up the room.
Name:
Anonymous2014-06-23 1:16
>>10 I would. The paper in >>8 claims unchecked macros are at odds with static checking, but it seems to go undefended. I get the feeling that among static type systems this is only useful in the weaker ones. But then the paper is talking about ML and Haskell. So how is it beneficial to ML and Haskell?
Top down is more powerful. In the outer macro you can do whatever traversal you like into the nested code. Even calling macroexpand on it, and then changing it after that. So you can implement bottom up macros if you want to.
>>9 That's a nice idea but it's hard to make sense of for vanilla lisp which doesn't enforce static types. You can write a function that takes source of some language in sexp form as an input and outputs a registry of variables tied to scopes with static type information.
it's hard to make sense of for vanilla lisp which doesn't enforce static types
Why would anyone care about a language which doesn't enforce static types?
Name:
Anonymous2014-06-24 16:42
Judging from success of JavaScript, people don't like static typing.
Name:
Anonymous2014-06-24 16:44
>>16 If by ``people'' you mean drooling retards, then yes, people love anal-prolapse typing.
Name:
Anonymous2014-06-24 16:46
>>16 Javascript is used mostly as a compilation target nowadays, lol. No one actually writes in it except retard undergrads and sweatshop Indian webcoders.
>>18 Nobody with half a brain targets or writes or does anything with Javashit.
Name:
Anonymous2014-06-24 18:59
>>19 Obviously. I doubt it's even possible to write "hello world" with only half a brain. People with a full brain, however, do often compile code written in decent languages like Haskal or Typescript to Javashit.