Liking syntax sugar is hardly a reason not to use the language with the most powerful macros around. You can write macros to provide nice literal syntax for whatever you want - this is part of the fun.
Liking syntax sugar is hardly a reason not to use the language with the most powerful macros around. You can write macros to provide nice literal syntax for whatever you want - this is part of the fun.
Might as well use `#lang racket` and get the already-existing regular expression literals, "batteries included" libraries, etc.
The idea of everyone having to come up with their own syntax for such commonly-needed things as, say, hashes, seems counter-productive to me. That would lead to everyone's code looking like a different language.
You said you stick with Clojure over Scheme on account of some syntax. I said you can have that syntax in Scheme. You then said the non-sequitur "the idea I created in my mind of each individual user coming up with their own syntax is absurd", which I agree with. I don't know what to tell you but you seem confused. What you said is not a response to what I told you. I eliminated the difference you complained about, and you complained that in Scheme it's possible to solve the issue you have with it.
There's no pleasing some people.
Trying to please everyone—or convince everyone—is not a fruitful method of language advocacy.
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World");
}
}
and instead write a nice little main macro, so you may just write: (main (print "Hello, World!"))
Do that a few times in an application, and instead of 10 million LoC, you can write it in 100,000 LoC. This becomes much more maintainable!Also, see: Alan Kay "Programming and Scaling" 2011
http://www.tele-task.de/archive/video/flash/14029/
https://www.youtube.com/watch?v=gZmcmdsoAXU
https://www.youtube.com/watch?v=-UOmItPa4iA
https://www.youtube.com/watch?v=QlPavndhYxQ
https://www.youtube.com/watch?v=y9xLi0iJg1g
Also have a look at: https://groups.google.com/forum/#!msg/comp.lang.lisp/gsQJOGKYUw4/oLLHW0f4Ce4J
https://groups.google.com/forum/#!msg/comp.programming/FiNIiSm5cJE/JkF5wa6Ke54JAt that point, you may not find the macros to be so much of an improvement on the boilerplate...
At that point, you may not find Objects (aka copyable global scopes where instance variables are globally available to all instance methods of a class) to be so much of an improvement over symbolic computation.
Honestly, what you said never happens in practice (no one is abusing macros like that) but what I said is literally taught by Sandi Metz in her book Practical OOP in Ruby.
Your (common) reaction is just your everyday fear of the unknown. Try it.
Hash tables are commonly used in imperative programming, but they aren't needed so often in Scheme where we prefer to use a purely functional style. We usually use alists because they are persistent. When I reach for a mutable hash table, it's usually part of some imperative process where I start from an empty table.
Depending on the Scheme you use, there could also be a persistent hash table implementation. Guile has vhashes, and there's an alist->vhash procedure, so you can still use the alist syntax.