Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
a_strange_guy
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
a_strange_guy
15y ago
I thought we were talking about "adding methods" to collection-like things so that they look as if they were built-in. And this was what the article was about: That it gets complex (and impossible) if you want to solve it for the general ca
2.
▲
by
a_strange_guy
15y ago
I'm not Parent, but I think that this is his implementation: https://github.com/nickik/Persistent-Vector-in-Dylan/blob/ma... The last part (line 222+) is what defines it as a sequence in Dylan. Dylan (and other multi-dispatch languages) d
3.
▲
by
a_strange_guy
15y ago
Well that is the beauty of it. In Scala methods/functions that come after the dot are privileged. In a language with multiple dispatch they are not. So CL solves the problem without adding more complexity, whereas in Scala you have to extor
4.
▲
by
a_strange_guy
15y ago
Of those Languages you listed, many don't have implemented function closures correctly. Python doesn't allow you to mutate variables from enclosing scopes (by default, at least). Ruby's blocks aren't first-class, they have to be converted t
5.
▲
by
a_strange_guy
15y ago
this: func global(some_arg_to_close_over Bar) { func walk_tree(node Node) { ... walk_tree(left(node)) walk_tree(right(node)) } walk_tree(something) }
6.
▲
by
a_strange_guy
15y ago
This is what they want: func outer(a int) { func inner_helper(b int) { ... } } Pascal allowed nested functions 40 years ago...
7.
▲
by
a_strange_guy
15y ago
(1) MLs allow to nest named functions. Go only allows named global functions, and lacks a feature that Pascal had. (2) Someone has to do cleanup anyhow. Either the caller or callee. (I am no expert in calling conventions) Anyhow, isn't this
8.
▲
by
a_strange_guy
15y ago
Scala is actually a really bad name for trying to google it. http://en.wikipedia.org/wiki/Scala
9.
▲
by
a_strange_guy
15y ago
You don't typecheck macros since they run at compile time. You typecheck the expanded code instead.
10.
▲
by
a_strange_guy
16y ago
What I still don't get is why inheritance in OO-languages is always the heavyweight version, namely subclassing. Imho every class definition in Java-like OO languages should create two types: A (by default) public interface and a (by defaul