Reputation
1,148
Next privilege 2,000 Rep.
Edit questions and answers
Badges
11 13
Newest
 Guru
Impact
~70k people reached

  • 0 posts edited
  • 1 helpful flag
  • 131 votes cast
Aug
25
awarded  Guru
Aug
11
comment OCaml criticism: is it still valid?
@coredump: "I would genuinely like to see a little more detail about this, if possible". F# has user defined ad-hoc polymorphism on certain operators and functions. So you can use + on ints, floats and complexes but you can also define your own types and add an overload for + to work on your type. This provides the brevity and readability of Lisp or Haskell with the predictably-good performance of SML or OCaml, achieving something that no other language does.
Aug
11
answered OCaml criticism: is it still valid?
Aug
11
comment OCaml criticism: is it still valid?
@Doval: "Re: polymorphic math operators, I don't think there's any way without implementing Haskell's type classes". F# has polymorphic math operators without type classes.
Jun
1
comment Is Non-Deterministic Resource-Management a Leaky Abstraction?
"Except cycles are exceedingly rare". In modern languages? I would challenge that hypothesis.
May
31
comment Is Non-Deterministic Resource-Management a Leaky Abstraction?
@CodesInChaos: Languages can prohibit cycles by design in order to make reference counting accurate. Erlang and Mathematica do, for example. But not C++, of course. :-)
May
31
comment Disadvantages of scoped-based memory management
@user1703394 The destructor in non-deterministic GC might be called immediately or two months from end of scope. You are confusing finalizers and destructors. Finalizers are related to GC and have nothing to do with this. Destructors have nothing to do with GC and everything to do with this. You can have both with a tracing GC.
May
31
comment Disadvantages of scoped-based memory management
@user1703394 "non-deterministic" GC implies that 'end of scope' is just a 'not before' marker That is a common misconception. Tracing GCs can and do collect before the end of scope.
May
31
answered Is Non-Deterministic Resource-Management a Leaky Abstraction?
Mar
21
comment Is garbage collection necessary?
+1 No idea why you got downvoted.
Mar
21
comment Is garbage collection necessary?
@Sulthan: "GC based on reference counting is inefficient only if you have only strong references". The JVM and CLR do not use reference counting precisely because that is not true.
Mar
21
comment Is garbage collection necessary?
@Caleb: "ARC is not garbage collection because ARC doesn't use a garbage collector". Reference counting is regarded as a form of garbage collection in the literature. See gchandbook.org
Mar
16
answered Why is an anemic domain model considered bad in C#/OOP, but very important in F#/FP?
Mar
1
comment Why don't mobile platforms support generational garbage collection?
+1: I agree completely.
Feb
20
comment Why are reference-counting smart pointers so popular?
"Reference counting can be explained in a few minutes, and implemented in an hour or two. Garbage collectors, especially ones with decent performance, are extremely complex and not many people understand them." Here is another counter example: stackoverflow.com/a/11118079/13924
Feb
20
comment Why are reference-counting smart pointers so popular?
"With reference counting, you are guaranteed that your object will be freed the instant the last reference to it goes away". That is a common misconception. flyingfrogblog.blogspot.co.uk/2013/10/…
Feb
20
comment Why are reference-counting smart pointers so popular?
"Garbage collectors can be quite intrusive (e.g. making your program freeze up at unpredictable times while a garbage collection cycle processes) and quite memory-intensive (e.g. your process's memory footprint unnecessarily grows to many megabytes before garbage-collection finally kicks in)". Garbage collectors can be real time and your latter observation is not applicable to most garbage collectors. For example, OCaml is an obvious counter example.
Jan
23
comment Disadvantages of scoped-based memory management
@user1703394: "Lets say I have an 'actor' object that by composition holds a 'priority queue' object that by composition holds a number of 'fifo' object and these fifo object holds an open file handle". There are two problems with your scenario. Firstly, you said you 100% do NOT mean deep object hierarchies and then you literally described a deep object hierarchy. Secondly, rather than presenting a problem you have presented a flawed design for a solution. What is the problem you are trying to solve? For example, I never store file handles in collections. Why would you?
Jan
22
comment Disadvantages of scoped-based memory management
@user1703394: "mitigate the transitive effects of using deep resources". You're repeating the same mistake. When you say "deep" what you really mean is "deep in an object hierarchy". The solution is to not use deep object hierarchies. This is exactly the kind of reason I stopped using object orientation extensively.
Jan
20
comment Disadvantages of scoped-based memory management
@user1703394: "The destructor in non-deterministic GC might be called immediately or two months from end of scope". The destructor is still called at the end of scope, just like C++. Look at F#, for example, where the IDisposable interface is called at the end of scope of any use binding.