2 points by Pauan 1621 days ago | link | parent I'm not sure I understand your argument... aside from macros, how often do you use symbols? The only other case I can think of is using symbols as the keys of hash tables:`````` (= foo (obj)) (foo 'bar) `````` But in Nulan, hash tables use strings as keys, so that's no problem. As for your "really common list manipulation"... my system is actually better for that. Compare:`````` (cons a b) ; Arc 3.1 `(,a ,@b) ; Arc 3.1 (list a b c) ; Arc 3.1 `(,a ,b ,c) ; Arc 3.1 (join (list a) b (list c)) ; Arc 3.1 `(,a ,@b ,c) ; Arc 3.1 'a ,@b # Nulan {a @b} # Nulan 'a b c # Nulan {a b c} # Nulan 'a ,@b c # Nulan {a @b c} # Nulan `````` ---"(f a b @c) looks so much nicer to me..."I agree. Nulan supports @ splicing for both pattern matching and creating lists:`````` # a is the first argument # b is everything except a and c # c is the last argument -> a @b c ... # works for list destructuring too! # this function accepts a single argument, which is a list # a is the first element of the list # b is everything in the list except a and c # c is the last element of the list -> {a @b c} ... # in addition to working for function arguments, it also works for assignment # a is 1 # b is {2 3 4} # c is 5 box {a @b c} = {1 2 3 4 5} # and of course you can nest it as much as you like box {a {b c {d} @e}} = {1 {2 3 {4} 5 6 7}} # equivalent to (join (list a) b (list c)) in Arc {a @b c} # equivalent to (apply foo bar qux) in Arc foo bar @qux # equivalent to (apply foo (join bar (list qux))) foo @bar qux `````` ---"I.e., if (car (cdr (obj key))) returned a box, you would be able to just call '= on it, with no thought for how you found the value."In Nulan, you could do what you're talking about, except it would all have to be done at compile-time, because boxes only exist at compile-time. In addition, you wouldn't be able to set the box directly, you would instead generate code that sets the box at run-time, i.e. macros.Nulan has the restrictions that it does because I wanted to compile to really fast JavaScript. Other languages (like Arc) don't have that restriction, so it should be possible to design a language that has boxes at run-time, in which case your idea should work.
 1 point by Pauan 1621 days ago | link Actually, there is ONE situation I've encountered where I would have liked to use symbols... in my playlist program, I have a list of file extensions which are considered "audio". Here's how it looks in Arc:`````` '(flac flv mid mkv mp3 mp4 ogg ogm wav webm wma) `````` In Nulan, that would have to be written like this:`````` {"flac" "flv" "mid" "mkv" "mp3" "mp4" "ogg" "ogm" "wav" "webm" "wma"} `````` Or perhaps like this:`````` "flac flv mid mkv mp3 mp4 ogg ogm wav webm wma".split " " `````` To work around that, I wrote a short and simple "words" macro:`````` \$mac words -> @args '{,@(args.map -> x "@x")} words flac flv mid mkv mp3 mp4 ogg ogm wav webm wma``````-----