3,618 reputation
11019
bio website
location Italy
age 50
visits member for 3 years, 8 months
seen 20 hours ago

Born an living in the suburbs of Milan (Italy), I graduated in 1989 as a Master Electronic Engineer, specializing in information technology an inter-networking systems and plants.

Interested in programming since the early '80s, today working mainly in C++ and D programming languages, in libraries development.


Mar
9
comment what are the limits of the client server architecture
.... Even a 1Gb/s LAN that spans more than 2 Km with 4 switches in the diameter don't allow client/server transfer rate greater than 15-20MB/s. And having the LAN faster won't help, since after 1Gb/s the trasfer rate, with 16KBytes buffer is dominated by the signal propagation delay. Sometime software engeneer are so... abstract to even forget there is physics downside.
Mar
9
comment what are the limits of the client server architecture
Estimation on LAN speed is ... CRAZY. Unless you are a in a nerdish company that allow to keep servers directly under your desk (or as your chair), servers are in data-centers, clients are on LANS and there is a WAN in the middle whose performance greatly depends on where your clients are in the world. With nowadays parameters, a lient CANNOT TRANSFER more than 16KBytes/Rund-trip because that's how TCP works with M$ configuration defaults....
Mar
1
comment Bad sign if nobody can comprehend one's code?
I agree in general terms, but on the specifics, clarity is a relative concept that depends on the cultural distance of the involved party. For people like me (who wrote hardware device drivers) code like that is perfectly clear and does not deserve any kind of comments. The problem arise when that code is read by people coming from other "domains", where the dominant culture is more "procedural" than "functional". The programmer in the sample used a specific "well known" pattern of parallel functional processing. The problem is that the reviewer was not from that same community.
Jan
8
comment Will a profound knowledge of C++ help you in learning other languages faster/easier?
NO, assembler does!
Oct
19
comment What is the name of a type that is defined from a template?
Note that vector<T> a; is not the declaration of 'a' of type vector<T>: is just a syntax error.
Oct
19
comment What is the name of a type that is defined from a template?
No. vector<T> is a "geberic type" because T is a formal parameter (and not an existing type). The declaration is template<class T> class vector { ... };. vector<int> a is the declaration of the variable a of type vector<int>; vector<bool> b is the declaration of the variable b of type vector<bool>; The fact the actual code of vector<int> and vector<bool> is different depends on the fact there is a template<> class vector<bool>{...}; somewhere in the <vector> header, not on the fact the vector<bool> is used here or there to instantiate this or that variable.
Sep
17
comment Is it an overkill to wrap a collection in a simple class only for the sake of better readability?
@Doc Brown, Aviv Cohn: There is no tag specifying any language, so anything can be right and wrong at the same time!
Aug
16
comment Why are packed structures not part of the C language?
??? You answered to the question "Why is not in the standard language" by saying "because is not in the standard"...
Aug
16
comment What's a “Polymorphic method”?
It can actually be both things depending on the language, feature and technology used. Runtime polymorphism is based on virtual methods, static polymorphism (like CRTP) is based on template parameters and template functions (something yo ueven don't mention). Some languages distinguish classes and interface, some other don't (and admit abstract mthods to be intermixed with implemented ones) ...
Jun
21
comment Without C++-like destructors, how do we return resources that aren't managed by garbage collector in Java?
Of course, you can always call by a natural language standpoint whatever type a class and whatever variable an object. I can rewrite whatever programming language grammar by using that terminology (touring equivalence exist for whatever finite state machine, an compilers are as such as well). The fact that C specs talk about "objects" doesn't make it "oriented to them". It has them, but doesn't offer any primitive to handle them (there is no polymorphic behavior and resource management). But it seems to me I'm just touching some religion dogma.
Jun
11
comment In C++ Good reasons for NOT using symmetrical memory management (i.e. new and delete)
@metamaker: That can make sense for C, not C++. All the "so called C++ GC" are in fact "C unreachable memory disposers". But a C++ unreachable object is not just a bounch of bit to be freed: is a object of a class whose destructor has to be called. That requires some information about allocated object to be stored in auxiliary structures of the collectors, that must be C++ aware and not become new / delete global replacement (since C++ containers have to continue to use symmetrical allocation internally).
Apr
7
comment Can I change operator precedence and associativity in C++?
@gbjbaanb: yes, that's how things technically go, but how have them been sold till now? "We did not have them, because they are bad" (in fact they din't do them because they where too complicated to manage, being themselves "inter-class" (not intraclass, like methods are: C++ allows global methods...) and being natural "dual dispatch origins". Something Java don't have and C++ may have only in limited way (not that the visitor pattern is only a surrogate, in this matter: C++ dual dispatch is mostly related to template specializations) But that's a far long OT aspect.
Jan
12
comment Is using `continue`, `break` in non-`switch` loops and `?:` bad practice?
Loop1 avoids one level of nesting, resulting -on non-optimizing compiler- in less "jump" instruction once the code is translated. May be not "beautiful", but that 's how many STL implementation are written. If performance is important, solve the most frequent case first, with shortest jump is what makes the processor less "heated".
Oct
24
comment How is“cloud computing”different from “client-server”?
There are at least two types of cluds: High level clouds -where management leaves and talks about- technically known as "steam" or "smoke" (hence the term "smokeware"), and low level clouds -where servers are located- technically named "fog". Sorry for the cynicism.
Oct
20
comment Why C# is not statically typed but F# and Haskell are?
@jozefg: you're right, but in this context the formalism and the actual implementation are irrelevant. Modern languages are often multiparadigm, and can support both the ways in a more or less simple way. C# just supports both the paradigms. Saying "it's not one", just because "it has also the other" (like the speaker says) is instrumental to other means, but not to proper definition of terms.
Oct
20
comment Why C# is not statically typed but F# and Haskell are?
I'm an up-voter: your answer has nothing wrong. But since what we are talking about is a religion (or better: two religions at the same time) every believer in one of the two down-votes. Who knows both of them up-votes (but they are few, and considered miscredents from all the others), and all the real "atheist", simply don't care, and use C++11
Oct
15
comment Can *any* program task be expressed without state?
@wirrbel: "state" is the thing "transformation" transform. Without it you can only transform void into void and all transformations are identical to the identity. In this degenaral universe true and false are the same.
Oct
14
comment Can *any* program task be expressed without state?
@BillyONeal: Sate is something physical. You can see it or hide it, but doesn't disappear. There cannot be something that is both "stateful" and "stateless". You can describe it starting from state (and transformation is a consequence) of from transformation (and state is an implicit prerequisite). If there is no "state" there is either no computation or no time/space/energy.
Oct
14
comment Can *any* program task be expressed without state?
@wirrbel: state is something physical (think to linear differential equations systems or to discrete systems). A state is introduced every time on thing calls another, otherwise no return is possible, since you don't know where you come from. The fact you don't (need to) "reason" about it doesn't make it disappear.
Oct
14
comment How important it is to fix memory leaks?
@VladimirKocjancic: +1 for "feature"