215 reputation
16
bio website
location Lisbon, Portugal
age 32
visits member for 1 year, 9 months
seen Jul 15 at 22:46

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?
Oct
4
comment xml based programming languages
@MasonWheeler, injection is executing data that should not execute. Homoiconicity means code and data are much alike, in literal form and in programmatic manipulation. A homoiconic languages may securely manipulate and execute (code generated from) trusted data, be it hard-coded in your source code or otherwise. In e.g. Common Lisp, you can include data in generated code without it being executed, such as (eval `(foo (quote ,data))). Your argument about parameters vs. escaping may be right, but you missed the point.
Feb
28
awarded  Caucus
Feb
21
comment Linux Programmer moving to Windows
@AdamAdamaszek, point taken. You were talking about user experience and I was talking about developer experience, and probably that wasn't clear. More specifically, I was talking about the lack of file-alike traits of console handles. Actually, it's serendipity finding out about Gow through your comment. I use Gnuwin32, but it's a bit outdated by now.
Feb
21
comment Linux Programmer moving to Windows
@AdamAdamaszek, I correct myself, ConEmu and clink both seem to hook on certain DLL entry points, such as WriteConsoleW. Still...
Feb
21
comment Linux Programmer moving to Windows
@AdamAdamaszek, so, you have to install and combine 3 things to emulate *nix TTYs at the user level, and in the end, asynchronous I/O is still an exception. How does that make the last paragraph obsolete? That basically just means one of those components implements a raw console input handler. If you're given a console input handle, you're stuck with synchronous I/O, and at best you can have just 1 dedicated thread, knowing that there's only one console per process, to handle console I/O, probably with a queue or two.
Dec
19
comment What problems will I face if I remove the concept of interfaces from my code?
@RocketSurgeon, notwithstanding Serializable, as an interface, is messy in the aspect it tells you how you should implement your class, it allows you to optionally (!) implement a bunch of methods, some private (better use Externalizable for those), some any-visibility, and a field (!). Of course, from these design decisions on, it must rely on reflection.
Dec
19
comment What problems will I face if I remove the concept of interfaces from my code?
@RocketSurgeon, in essence, by implementing an empty interface such as Serializable in Java, you follow its contract in aspects that the language can't force you to. You don't inherit anything from Serializable, you have the responsibility of making things work for its consumers, i.e. you have to implement things a certain way. You get serialization at a not-so-visible cost, but you don't inherit it. What does this have to do with (multiple) inheritance?
Dec
18
comment What problems will I face if I remove the concept of interfaces from my code?
@RocketSurgeon, how so? What would be the use of an interface in a strongly typed language if it could be inherited but not implemented (except for abstract classes)? What value would the language offer me by allowing a dynamic cast from an object to a specific interface, if the interface is not (fully?) implemented?
Dec
17
awarded  Critic
Dec
16
comment What problems will I face if I remove the concept of interfaces from my code?
The other problems you mention, composition and delegation have been used to work around heavy inheritance. Those problems only happen when you rely solely on inheritance. Interfaces are a natural consequence, in strongly typed languages, an object can be a polymorphic proxy or decorator, no matter its class hierarchy. In C++, there's multiple inheritance, and "interfaces" are pure abstract classes, only a special case of multiple inheritance. Certainly not the only language with multiple inheritance other than for interfaces, Common Lisp's mixins, for instance, and it doesn't have interfaces.
Dec
16
comment What problems will I face if I remove the concept of interfaces from my code?
"The sole purpose of interfaces is multiple inheritance", that's so wrong. The greatest purpose is to declare an object's capability, the messages it can handle. It doesn't really matter if the interface is "inherited", it matters if it's implemented. It doesn't really matter if the object "inherits" multiple interfaces, it matters which it implements. What does an object inherit from an interface? Only its contract. So, if a language says you inherit an interface, it's simply that language's way of using interfaces.
Dec
15
comment What problems will I face if I remove the concept of interfaces from my code?
@VishwasGagrani, in AS3.0, interfaces are used probably to enhance performance, in the sense that it enables compile-time method lookup given an interface pointer, although the type checking might be done at runtime (on each cast, maybe? I don't know AS).
Dec
15
comment What problems will I face if I remove the concept of interfaces from my code?
@cHao, I don't consider every method (part of) an interface. In fact, I have for myself that "interface" works the other way around: from design to implementation. But let's agree to disagree, then, this is no longer about abstract classes or the answer.