Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kbp
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
21 ms
·
151.
▲
by
kbp
8y ago
This would introduce a weird inconsistency with cases for match and cases for switch regarding fallthrough, though. If it's going to look like cases in a switch statement, it should act like them, for better or worse.
152.
▲
by
kbp
8y ago
> AFAIK pattern-matching is not a historical Lisp feature Aside from full packages like what lispm mentioned, implementing pattern matching (and later, full Prolog-style unification) in Lisp is a very common exercise in beginner Lisp tex
153.
▲
by
kbp
8y ago
Additionally, the Java language spec[0] does use the word pointer: "The reference values (often just references) are pointers to these objects, and a special null reference, which refers to no object." That isn't an implement
154.
▲
by
kbp
8y ago
> If the thing language has doesn't point to another thing in the language, you can't call it a pointer It points to a tangible thing in the language, the object that you're operating on, that thing just isn't a first
155.
▲
by
kbp
8y ago
> > You get at the thing being pointed to by dereferencing the pointer. > Which you can't do in Java! There's no * operator. . and array indexing dereference pointers in Java, just as -> and array indexing do in C. I&#
156.
▲
by
kbp
8y ago
> I would say: a pointer has to point to something. Java doesn't have those because you can't get talk about "the thing the pointer points to" as a thing distinct from the pointer itself. You get at the thing being po
157.
▲
by
kbp
8y ago
Well, that's just the little difference I mentioned about C conflating arrays and pointers to them. The char ^ is being viewed as an array, which in C happens to be synonymous with a pointer to the start of the array. It's certain
158.
▲
by
kbp
8y ago
> > It still seems to me that the only good definition of an object variable's "value" in Java is its pointer. > Good for technical pedantry maybe. Good for working programming, no - 99.9% of the time when you'r
159.
▲
by
kbp
8y ago
> Java is not pass-by-reference. C++ is I'm sure you know this, but just to clarify, C++ allows parameters to be specially marked so as to be passed by reference. By default, arguments are passed by value.
160.
▲
by
kbp
8y ago
> Pointers are part of the Java implementation, not part of its abstract computational model. Calling it pass-by-value when the values being passed are deliberately hidden from the user is a recipe for confusion. Its abstract computation
161.
▲
by
kbp
8y ago
> The real problem here is that we have only two terms which we're using to try to distinguish between three different concepts. It's still only two concepts, there's just the side effect of Java and friends' implicit
162.
▲
by
kbp
8y ago
> I still find it hard to picture an immutable OO language. Picture an object-oriented procedural language like Java, and then make everything immutable; for every 'void' method, return an updated copy of 'this'; for
163.
▲
by
kbp
8y ago
It only swaps; you can use pushd and popd if you want a stack.
164.
▲
by
kbp
8y ago
I've never used it as a shell per se, but another little tweak I do sometimes for shell script type things in Lisp is install a read macro like (set-macro-character #\$ #'(lambda (stream char) (declare (ign
165.
▲
An Introduction to Scheme and Its Implementation (1997)
(cs.rpi.edu)
1 points
by
kbp
8y ago
|
0 comments
166.
▲
by
kbp
9y ago
I think for a lot of people, they "learned Lisp" from the Little Schemer and stopped there.
167.
▲
by
kbp
9y ago
And while it didn't make it into the Common Lisp version of LET, there were versions in earlier dialects that supported destructuring. For example, the Maclisp reference manual's description of LET[0] says: It is permissible to pl
168.
▲
by
kbp
9y ago
> I think most modern programmers prefer explicit destructuring and taking an element from a collection by its key rather than excplicitly traveling node links using car and cadr. Then they'd be happy with Lisp from 40 years ago. Co
169.
▲
by
kbp
9y ago
As a side note, Scheme originally offered ASET (SET) but not a SETQ equivalent (they hadn't adopted the ! convention yet), saying: "Those of you who may complain about the lack of ASETQ are invited to write (ASET' foo bar) in
170.
▲
An Introduction to Scheme and Its Implementation (1997)
(cs.rpi.edu)
2 points
by
kbp
9y ago
|
0 comments
171.
▲
by
kbp
9y ago
> I wouldn't consider something a dialect unless they were similar enough that most code that works in one works in the other with minimal modification. I agree, but Scheme passes this test more than you might think. When it origina
172.
▲
by
kbp
9y ago
> i just started learning Common Lisp a couple of weeks ago. Coming from a strong OO programming background, i can honestly say it is a completely different mind-set. You might not see it much in beginner materials, but idiomatic Lisp co
173.
▲
by
kbp
9y ago
You can always just use a C library directly through the FFI if there isn't an obviously good Lisp option for what you're doing. You're probably not the only person trying to do whatever you're doing in Lisp, though, and
174.
▲
by
kbp
9y ago
> In math, "a = a + 1" isn't the same as "1 = 2". The issue isn't equality, it's that you're trying to rebind a bound variable, which isn't possible. "=" means equality in math; a =
175.
▲
by
kbp
9y ago
> And most BASICs, though some (most?) required the keyword LET to introduce an assignment, as well. LET was virtually always optional; an expression by itself on a line (like 'X <> 10') is a syntax error anyway, so remov
176.
▲
by
kbp
9y ago
In the original Smalltalk implementation, the character corresponding to _ in ASCII was a left facing arrow, which Smalltalk used for assignment at the time.
177.
▲
by
kbp
9y ago
For sure, and its standard library equivalent was very, very good for the time, just not by 2018 standards.
178.
▲
by
kbp
9y ago
The "decent standard lib" part is debatable, especially if you don't slip on the "targeting multiple platforms with ease" part.
179.
▲
by
kbp
9y ago
> There's a huge difference between being silenced and being refused ad placement on your videos. If there's a huge difference between the impact that being silenced has on someone compared to having their primary source of inc
180.
▲
by
kbp
9y ago
It's mentioned at the top of the linked page, but just to highlight it, this is only an excerpt from the longer piece "Lisp: Good News, Bad News, How to Win Big" which was written in 1991 and talks at length about the then-cu
More ›