1,218 reputation
47
bio website
location
age
visits member for 3 years, 9 months
seen 16 mins ago

Apr
20
comment Why do I need to map arguments to instance variables?
This is unclear for me, and I would like to see an example that shows more directly the problem you are talking about. You seem to make implicit assumptions about the language or the static factory methods. I think it is possible to write one-to-one mappings while having inheritance, so maybe I did not understand what you mean.
Feb
27
comment OCaml criticism: is it still valid?
@Doval You do want, sometimes, and when you do, mutable state is a poor way of doing this. It means mutating a global variable (or an entry in a hash table) which is by default not thread-safe. The poster-child example is redirecting the special variable *standard-output* in two different dynamic contexts. I agree that using dynamic variables by default makes little sense and can be confusing. See also: (RMS) Formal Parameters Cannot Replace Dynamic Scope. Also, okmij.org/ftp/ML/index.html#dynvar.
Feb
27
comment OCaml criticism: is it still valid?
@Doval Re: dynamic scoping, all you say is true, when looking at it from the point of view of static type checking. There are cases when it make sense to have dynamic redefinitions of functions (live-coding your game loop, for example).
Feb
27
comment OCaml criticism: is it still valid?
@Doval What about something like Typing the numeric tower for Racket? Can we imagine an OCaml library that would exploit type classes or Generalized Algebraic Data Types (GADT) in order to provide polymorphic math operators? Regarding conversion: not all operations are possible, but some are and could be typed.
Feb
27
comment OCaml criticism: is it still valid?
@Andrea I edited my answer.
Feb
27
revised OCaml criticism: is it still valid?
added 5665 characters in body
Feb
26
answered OCaml criticism: is it still valid?
Feb
25
comment What about LISP, if anything, makes it easier to implement macro systems?
@MasonWheeler Please feel free to edit your answer. I don't see the need to especially advocate Boo, but that's ok. What I don't understand is the need to gratuitously bash Lisp's with unsubstantiated and/or mistaken claims (e.g. the good ol' "something-blows-up-at-runtime" argument). You should focus on what you say in the conclusion about exposing the AST. I'am genuinely interested to see some of the benefits of having richer code representation.
Feb
23
comment What about LISP, if anything, makes it easier to implement macro systems?
Still, I think the next to last paragraph should be detailed: you claim that Boo macros are "more intuitive" (you could have said: they are intuitive, but you said "more intuitive" than Lisp macros), but the explanation is a little weak (don't Lispers also know their language?). As for being more secure: (1) I am sure you can escape type safety with Boo too, and (2) there are static type checking in modern CL implementations and your own macro can signal an error if you implement more checks.
Feb
23
comment What about LISP, if anything, makes it easier to implement macro systems?
"simpler and more intuitive": sorry, but I don't see how. "Updating.Arguments[0]" is not meaningful, I'd rather have a named argument and let the compiler check itselfs if the number of arguments matches: pastebin.com/YtUf1FpG
Feb
13
answered number of strings, when each character must occur even times
Jan
23
revised Why does Git have tags?
added 98 characters in body
Jan
23
revised Why does Git have tags?
added 98 characters in body
Jan
23
comment Why does Git have tags?
@JörgWMittag So, I tried locally with two repositories in different directories, and neither annotated tags nor annotated+signed tags where pushed. This is with git 1.8.2.
Jan
23
comment Why does Git have tags?
@JörgWMittag I didn't check, but I trust you on this. Wait a minute, that would mean, that git has sensible defaults?!
Jan
23
revised Why does Git have tags?
added 143 characters in body
Jan
23
answered Why does Git have tags?
Dec
16
comment Are there any actual drawbacks to self-referential method chaining?
@Panzercrisis OP's been told to refrain using method chaining due to convenience vs. semantics. Steven's answer basically says "do it anyway" and only consider readability of OP's code by itself, without considering the team's opinion or consistency. What if OP wants to rewrite every existing class in the project so that it suits his taste regarding code readability? That's how I understand the convenience/semantics argument: there should be a "technical" reason to have method chaining (btw, that argument also sounds as if the other person is making up an an excuse for his/her own preferences)
Dec
13
comment Why use arg type `class Object` instead of `Comparable[]`?
@user102008 (1) Why would exceptions not be an appropriate way to detect bad arguments? (2) Exactly, and the rest of my answer address Comparable[] vs Object[].
Dec
12
comment Why use arg type `class Object` instead of `Comparable[]`?
@SJuan76 "More than a copy, you just ...": I am not sure I'am following. My understanding is that there is an array allocation (that arrays grows when using new String[0] initially); then we perform a shallow-copy of the elements: references are copied from one array to the other one. Isn't that right?