362 reputation
26
bio website barzilay.org
location Massachusetts
age 44
visits member for 3 years, 11 months
seen May 30 at 17:37

Jul
13
awarded  Enlightened
Jul
13
awarded  Nice Answer
Jul
3
comment Why does Scheme r5rs have no module system
Um, that's very wrong -- R5RS came out in 1998, and probably all major schemes at the time did not have a module system, the very common thing was (and in many schemes it's still is) to use load.
Jul
3
awarded  Yearling
Jun
29
comment Am I getting Scheme wrong?
As for your side-comments about hygiene being pointless: this is not some opinion that you'd change here, and apparently people who do use Scheme value it. Given this, and given that you have no concrete evidence against it, and given that it contributes nothing, I suggest you just drop it. (And before you start flaming, just think whether there's any point to such flaming.)
Jun
29
comment Am I getting Scheme wrong?
See your earlier comment about implementing a hygienic system as a front-end: this means that it is no longer related to macros, only the ability to run any code at the meta level, which is why your question asks about an irrelevant decision. Macros do help when there is a local transformation rule that you want to implement, and implementing a hygienic macros is not known to be possible with local rules (again, see Costanza's attempt).
Jun
29
comment Am I getting Scheme wrong?
Assuming that the goal is to have a hygienic macro system, there is no answer to your question, since both ways would require the same kind of work.
Jun
29
comment Am I getting Scheme wrong?
@SK-logic: You're mixing things up. The issue is expressiveness. You can (easily) implement define-macro using define-syntax -- where the implementation is a macro. If you're dealing with a frontend for the language, then you're not using the macro system (and you can do so in any language, since you don't need macros). So your argument falls into the old Turing Machine bin, where any TM-equivalent language can do the same. (Even with that, a hygienic macro expander in 300 lines would be impressive. You should publicize such a miracle.)
Jun
29
comment Am I getting Scheme wrong?
@SK-logic: and the same goes for phase separation & incremental compilation -- without a way to enforce that, you just can't do it in the language. See for example xcvb where Fare's solution is to run a separate process for each file compilation -- the only way that could enforce deterministic compilation without an enforced phase separation in the language.
Jun
29
comment Am I getting Scheme wrong?
@SK-logic: I somehow doubt that you implemented syntax-case with define-macro. It's something that many people have tried and failed. The most serious attempt that I know about is Pascal Costanza's paper, and that requires redefining lambda and a bunch of other core language forms. (IOW, it is not a working solution for CL, because you're not allowed to redefine core forms.)
Jun
29
comment Am I getting Scheme wrong?
@ChrisJester-Young: Much more than just "harder" -- I don't know of anyone who showed that it is possible to implement hygiene on top of define-macro, and the common opinion is that it is impossible without redefining other parts of the language.
Jun
28
comment Am I getting Scheme wrong?
-1 for suggesting define-macro. There is no reason to ever use this thing other than the possibility of learning why it is wrong.
Jan
19
comment What is the difference between a function and a lambda?
define has that as a syntactic sugar, so it's not as important as its role as a name binding tool for all values. As for lambda not creating a name by itself: that's an important feature, since it separates name giving from function forms... IMO JS is doing the right thing in allowing the separation while also accepting an optional name for those masses who would be horrified at the idea of a function with no name. (And luckily the size of those masses are in a general decline...)
Jan
19
comment What is the difference between a function and a lambda?
That is extremely rough. You use define (or let or one of its relatives, or an internal define) to create names -- that's all. There's nothing special in define with respect to functions.
Jan
19
comment What is the difference between a function and a lambda?
Not really, a lambda expression in Scheme is just like a function expression with no name -- but there's nothing stopping you from later giving them a name. For example var f = [function(x){return x;}][0]. You could argue that the function value itself has no name, but that would be true for all functions...
Dec
22
comment Why would you ever use Lisp?
...; "playground for AI": that's an 80s/90s thing, and not at all unique to Lisp; "drowning in parens": have you tried using it (not just "suffer through" a semester or two 30 years ago); and finally "any Lisp business applications": you're kidding, right? Yes, there are such applications, and there are people who write Lisp for a living -- it might not be as popular as C++, but so what? (German is also not as popular as English, yet people manage to get jobs speaking it.)
Dec
22
comment Why would you ever use Lisp?
@OlivierJacot-Descombes: "diminished to a minimum" -- bogus, it's the concrete syntax that you're referring to but the grammar is not minimal at all (worse: macros make it dynamically changeable); "yet ... TM-complete": bogus, minimal syntax for a TM-complete language is nothing new, see examples in other answers, and see machine code (just numbers, not assembly code); "same structure represents data and code": again, not new, machine code has numbers as both too, most modern languages have strings and eval in some form...
Dec
22
comment Why would you ever use Lisp?
@Job: No, not emotional at all. These are all features that were unique to Lisp and propagated to many mainstream languages. As for your professor, I don't see how it's relevant here -- teaching any language, or any subject at all, in a crappy way is nothing new.
Dec
22
comment Why would you ever use Lisp?
@TikhonJelvis: whitespace.
Dec
22
comment Why would you ever use Lisp?
Note, however, that "programs are data" is true of pretty much any language. Even in C: you have the ability to manipulate C programs in C. The thing that makes Lisp more convenient is that it makes the internal representation of code available as plain data structures that reflect the parsed code -- light years more convenient for manipulating code than flat strings.