255 reputation
16
bio website
location Faro, Portugal
age 32
visits member for 2 years, 2 months
seen 17 hours ago

Nov
19
revised Why do functional programs have a correlation between compilation success and correctness?
Minor edit.
Nov
19
revised Why do functional programs have a correlation between compilation success and correctness?
added 176 characters in body
Nov
19
answered Why do functional programs have a correlation between compilation success and correctness?
Oct
25
comment Is it a good practice to run unit tests in version control hooks?
Not if you have a huge repo with big, globally distributed teams. For instance Microsoft uses a similar, more layered approach with Windows.
Oct
25
answered Is it a good practice to run unit tests in version control hooks?
Aug
21
revised Is there any practical use for the empty type in Common Lisp?
Added (or) and (member) equivalence.
Aug
21
comment Is there any practical use for the empty type in Common Lisp?
Consequences are undefined even if the actual data is never effectively used, as in: -- But in that case, the data is effectively accessed, used to create a list of one element. But (length (list (make-array 10 :element-type nil))) should still reliably return 1.
Aug
21
comment Is there any practical use for the empty type in Common Lisp?
I get SBCL's point of view, that the only way to satisfy a nil return type is to not return at all, but it's a deduction or even a choice, since it's undefined behavior (versus clearly meaning the function can't return anything) to deal with a return value that is not of the declared type. So if a compiler can prove such a function may return, it could error on definition, on compilation and/or on load.
Aug
21
comment Is there any practical use for the empty type in Common Lisp?
(1) I don't know, some SBCL error functions are already declared as such, so I guess you can trust SBCL will not error on such declarations. (2) The only reliable, portable way to say that a function returns no values is that, but there is no portable way to say that a function doesn't return at all. (3) Declarations may be completely ignored, but they may also be completely trusted, so it goes that it's implementation dependent, hence you can't trust it won't error, but you can't trust it will error either, and it might error either at the declaration point or during compilation.
Aug
21
comment Is there any practical use for the empty type in Common Lisp?
Just for the record, the rationale behind the need of &optional at the end of a compound values type declaration to declare no further return values has been discussed in one of SBCL's mailing lists. Basically, the presence of lambda list keywords indicates the amount of parameters to a function that would be correctly called with the returned values as if by multiple-value-call. The lack of them allows further return values (of type t). The consequence is that (values &optional) is the only reliable way to declare no return values.
Aug
21
comment Is there any practical use for the empty type in Common Lisp?
I'm not confusing. The way to declare you return no values, is correctly done with (values &optional). With nil, you declare it returns a first value of type nil, which is impossible and the implementation could signal an error or at least a warning right on the declaration. If it was null, the only valid first return value would be nil. There is no portable way to declare that a function doesn't return.
Aug
20
comment Is there any practical use for the empty type in Common Lisp?
(function ... nil) declares a function that returns a value of type nil. To declare a function that returns no values, it's (function ... (values &optional)). Also, it's undefined behavior to access uninitialized array elements.
Aug
20
answered Is there any practical use for the empty type in Common Lisp?
Jul
3
comment How does the “Fourth Dimension” work with arrays?
Since we don't know the actual physical constraints in terms of dimensions, only our own perception, I suggest you reword the answer, something like replacing "the physical constraints of the real world" with "the human constraints on understanding further dimensions". Another one, "Arrays aren't stored in physical space", they are, so "Arrays aren't stored in as many physical dimensions as their own" would make a whole lot more sense.
Jul
2
comment How does the “Fourth Dimension” work with arrays?
Computer arrays are not limited by human comprehension or visualization, but they're limited by physical constraints, e.g. an array of d dimensions each of length n will take n^d, or more generally with different length dimensions, n1 × n2 × … × nd.
Jun
18
comment Mental Models or Real-World-Metaphors for Functional Programming
This metaphor only makes sense in the "first-class functions/function composition" meaning of "function programming", not in the "no side-effects/declarative". Also, object-oriented programming doesn't necessarily have side-effects, so you can implement either a destructive or constructive assembly line with either OOP or this meaning of FP. OOP is more about encapsulation, message passing and polymorphism than it is about side-effects, it depends on how you model things. E.g. do you require referencial identity from start to end?
Jun
18
comment Mental Models or Real-World-Metaphors for Functional Programming
Which concrete meaning of "functional programming" are you referring to, "no side-effects/declarative" or "first-class functions/function composition"? Or both?
Oct
19
awarded  Yearling
Oct
18
revised What am I risking if I don't update my SDK/JDK and bundled runtime/JRE every time there's a security update?
Added server risk
Oct
18
answered What am I risking if I don't update my SDK/JDK and bundled runtime/JRE every time there's a security update?