« first day (254 days earlier)      last day (4710 days later) » 

5:00 PM
@Juliet plenty of people have. But they tend to react differently
 
... or amazed by how cool it is. :D
 
Some people go "ooh, everything is so simple and easy to do in C#, that's awesome", and others go "WHERE ARE MY POINTERS? WHAT KIND OF LANGUAGE DOESN'T LET ME CAST BETWEEN ARBITRARY TYPES"
so it kind of depends on the C++ guy
 
@MartinhoFernandes Second that. Speaking for myself, I found joy in working with C#, although the very strict type-safety sometimes gets on my nerves, I'm very content with it generally.
 
I love very strict type-safety. Haskell FTW.
 
I tend to hate C# when I'm working in it, and the rest of the time, I think it's convenient, but boring
 
5:04 PM
I don't mind strict type-safety, I mind when it starts telling me what I can and cannot do :(
 
isn't that pretty much the definition of strict type safety?
 
@MartinhoFernandes ushort Length = (ushort)Packet.Length I really hate doing that kind of type-casting over and over, it gets very tedious.
 
no
 
@DeadMG So, you do mind it.
 
does strict type safety involve not allowing me to allocate objects on the stack?
or not to have deterministic resource cleanup?
or to have to put every free function in a class?
 
5:06 PM
@KhaledNassar It's a lossy conversion, what did you expect?
 
nnoooo. But strict type safety means you're forbidden from doing a lot of other things
 
Less annoying syntax, perhaps.
 
I don't mind most of them so much
a few explicit casts which used to be implicit is no big deal for me
things like no multiple inheritance, enforced inheritance from Object, no references to value types as members, etc, they do irritate me
 
Yeah, there's this thing, you cannot write C++ in C#.
 
@DeadMG Funny, I find it stupid that C++ allows references as members :)
 
5:08 PM
lol
 
Breaks the whole "references don't necessarily eat memory etc." thing.
 
well, I'm sorry, but I find it to be of frequent use that I can have pointers or references as members
 
If you need references to C# value types, you're shouldn't be using value types.
 
@DeadMG Most of that has little (if anything) to do with type safety (strict or otherwise). At the same time, the two tend to go together a bit -- a language designer who's decided to protect you from yourself, is likely to do it in a number of different ways, some related to types, others not.
 
I see
 
5:09 PM
@MartinhoFernandes You could always box them, right?
 
@MartinhoFernandes C++ allows me to do it, though. I'm not naturally used to explicitly type-cast everything, and that's why it irritates me sometimes.
 
@JerryCoffin: That's what I mean. I don't care about the occassional enforced downcast, I do care about not being able to do what I want to do with regards to, well, a hell of a lot of other things
 
@FredOverflow You could just use a reference type. Because you want reference semantics.
Value types in C# are a rare thing.
 
@Martinho: Maybe I need both reference and value semantics
 
@KhaledNassar Though it can be irritating at times, I think C+ would be better off if it required casts for narrowing conversions.
 
5:11 PM
@DeadMG Making it a value type will just make your life worse.
Reference type should be your choice 99% of the time.
 
@Martinho: I don't see how that addresses my point
I still have to code the other 1%, it won't magically go away
and whether I need values or references is dependent on what I'm doing, not what type I'm using
 
You can't code C# in a C++ mindset.
 
yes
of that I am fully aware
your point being?
 
I think if you try to write C++ in C#, you risk getting hit with lightning by the coding gods
 
well, I could just compile a native DLL and P/Invoke it instead
if I were desperate
 
5:13 PM
My point is that you shouldn't be using value types in C#, except in rare circumstances.
 
@Juliet If there were really coding gods with lighting at their disposal, writing C# in any form would be risky.
 
@Martinho: See, that's the whole problem with C#. I decide when to use value types. Not the language designer, not the type creator. Me.
 
@DeadMG Sure, but then don't complain when you make your life worse.
 
@Martinho: I won't, and I don't
 
@MartinhoFernandes In the tradition of all good programming, you could improve that statement by removing part of it, specifically: "value types in".
 
5:15 PM
I appreciate the power that C++ offers- it's pretty much the only reason to stick with the language, let's face it
 
How do I derive a C++/CLI class from a C# interface?
 
I will, however, complain when I need to use a language and the designers decided that they could do a better job without ever seeing my problem or code or use case
which is, frankly, obviously bullshit
 
@DeadMG Hmm...I rather though the fact that it's enjoyable was a really good reason to use it. Most jobs that are really interesting also gravitate toward C++.
 
@Xaade: You use :, just like normal, it has to be marked as ref though
 
C++/CLI... ew..
 
5:17 PM
@DeadMG That's a large part of the basis of Why Pascal is not my favorite programming language. Old, but still quite accurate.
 
never used Pascal so can't really comment
 
@DeadMG If I put the C# interface in the CLI code, it won't compile. If I create a C# project and reference the C# in the CLI project, it can't find the interface.
 
then you've screwed up your referencing
the C# interface code won't compile as C++/CLI- it's C#
you reference it, just like any other .NET content
 
I'm trying to build a C++/CLI bridge so that I can build C# controls on a MFC window.
 
I believe that actually, you can't do that
 
5:19 PM
@DeadMG I added the reference as a project reference in the CLI project.
@DeadMG Can't do what?
 
well, you must have done it wrong- try compiling and referencing the DLL
hmm
what technology are you using for the controls?
just a C# interface to Win32?
because WPF, Direct3D, and Windows controls at least are all completely incompatible with each other
 
In order to mix them, you need special "host" controls.
Not sure if you can find a WinForms host for MFC.
 
if they're just C++ and C# wrappers on native Windows controls, then they'll click just fine
but MSDN should give easy to follow examples for how to mix them
 
0
Q: trivial vs. standard layout vs. POD

FredOverflowIn layman's terms, what's the difference between trivial types, standard layout types and PODs? Specifically, I want to determine whether new T is different from new T() for any template parameter T. Which of the type traits is_trivial, is_standard_layout and is_pod should I choose? (As a side ...

 
5:26 PM
Gotta go.
bbl
 
@FredOverflow Beyond the interest of the question, you are aware that you can solve the problem with new T {} righto?
 
No, new int{} will yield 0. I only want to do extra initialization stuff when it is necessary for type T. And no, I can't just say new int, the real program is a little more complicated :)
 
I don't know what I was thinking; new T{} doesn't buy anything compared to new T()
 
Xeo
@jalf I'm rather like "WHERE ARE MY TEMPLATES? WHAT KIND OF LANGUAGE SAYS IT ALLOWS GENERIC PROGRAMMING WITH THAT KIND OF JOKE OF A TEMPLATE IMITATION?!"
4
 
5:43 PM
silly question here, but what sort of things do C++ templates do that C# generics don't?
 
@DeadMG my C# interfaces weren't public.
X_X
 
owned
 
Xeo
@Juliet TMP. Nuff said.
 
@Juliet: Where do I start?
well, you don't have to mix them with run-time inheritance
you can pass non-type parameters like integers
you can detect facts about the type at instantiation time, like whether or not certain methods exist
you can partially and explicitly specialize them
you can use them for Turing-complete computation at compile-time
 
@DeadMG This C++ -> CLI -> C# is kicking my ass.
 
sbi
5:46 PM
@jweyrich Hola! (I woke my laptop from suspend-to-disk while we had dinner, but I first had to get the kids some food, and then had to bully them to bed before I could have a look at here.)
@Xeo Yeah, definitely. I'm one of those.
 
It's almost like, is COM easier.... geez.
 
you can have variable numbers of arguments
 
@DeadMG: not sure what you mean by "you don't have to mix them with run-time inheritance"
 
@Juliet: Take a simple generic function in C#
let me just crack up VS because I will always get the syntax wrong
 
sbi
@Juliet They don't allow real duck-typing. See this question for an example of the hoops you have to jump through. Or this one.
 
Xeo
5:47 PM
@Juliet In C#, all classes are automatically derived from Object.
 
@Juliet You can take some template parameter T and perform arbitrary operations on it.
In C#, you can only do that if you say "T inherits from Numeric" or something.
 
@sbi quack? Mallard?
 
    void func<T>(T t)
    {
        t.write();
    }
 
sbi
@Xaade I expected nothing less from you. And nothing more.
2
 
oh noes, error! We didn't specify that T inherited from a base that offers that method with that signature
 
Xeo
5:49 PM
@FredOverflow I think it was T extends Blah
 
ah, gotcha. C# doesn't have statically checked duck typing, you'd have to constrain that definition to an interface or base class, something like void write(T t) where T : IWriteable
 
When it comes to genericity, C++ allows structural typing, whereas C# requires nominal typing.
 
yeah
precisely
and that means no overloads, too
 
WTH duck typing?
What kind of name is that?
 
> If it looks like a duck and quacks like a duck and waddles like a duck, it's a duck!
 
5:51 PM
@Xaade: it comes from the phrase "if it walks like a duck, quacks like a duck, then its a duck". Its the idea that you should be able to call methods on an object without constraining it to a common type
2
 
In computer programming with object-oriented programming languages, duck typing is a style of dynamic typing in which an object's current set of methods and properties determines the valid semantics, rather than its inheritance from a particular class or implementation of a specific interface. The name of the concept refers to the duck test, attributed to James Whitcomb Riley (see History below), which may be phrased as follows: :"When I see a bird that walks like a duck and swims like a duck and quacks like a duck, I call that bird a duck." In duck typing, one is concerned with just tho...
 
void func<T>(T t) { do_something(t); }
void do_something(Object o) {}
void do_something(string s) {}
void Main(string[]) {
    func<string>(""); // calls Object, not String, overload
}
on the other hand, the equivalent function in C++ would call the string overload
 
@FredOverflow I already was reading it.
 
.NET 4 has dynamic, which you could argue has some fairly similar properties
 
In other words, treat it as if it CAN do. If it can it does.
 
5:52 PM
@Xaade Well, sorry to bother you, then ;)
 
I think one major deficit in C#'s type system is the lack of a common base class for numeric types. Its not possible to do something like this: T Add(T a, T b) where T : INumeric and invoke with Add<int>(5, 10) and Add<float>(5.0, 10.0)
 
@FredOverflow No bother... It saves me from searching it again if I close the tab.
I'm not like some... having 200+ tabs and wondering why the browser runs slow.....
 
@Xaade And if it can't, spit out lots of detailed template errors.
 
@Juliet: No, there are lots of design problems with trying to do that in C#
 
actually, you can do something like that by defining your own implicit cast, but it would probably infuriate most people
 
5:53 PM
firstly, operator overloading in conjunction with interfaces is broken
 
So template is duck typing, because the template codes for doing it.... and if it can't do it, compile error.
 
secondly, everyone who ever wanted to do that would have to inherit from an interface- not very maintainable
what if I added it in C# 5? Now everyone who wants that functionality will have to go back and change their code
the real problem is that constraints can only be expressed as inheritance
and a couple others, from memory
you can't say "where T : has operator+"
on the contrary, I can write C++0x code that will do that quite easily
 
@DeadMG Really? Even without concepts?
 
and it will add arguments of two different types and return a third, unrelated, type if that's what operator+ returns
@FredO: Static assert, decltype and SFINAE -> concepts
 
Xeo
Just a bit more verbose
 
5:57 PM
yeah, true
 
C++ programmers are used to verbosity.
 
that too
 
@DeadMG: for what its worth, F# has a limited form of structural typing
 
Xeo
Where would TMP be if we wouldn't like to type typename ?
 
lol
 
5:59 PM
In C++0x, you are even allowed to use typename when it's not necessary :) Like typename std::vector<int>::value_type.
#define O_o typename
This will make your TMP code look a lot cooler.
 
lol wtf
will the preprocessor even accept that?
 
Why not? O_o is a perfectly fine identifier.
 
x_x too
 
@DeadMG Yes, usually, but it's not required to. Attempting to define an alias for a keyword is officially verboten.
 
5
Q: Does placement-new introduce a sequence point?

FredOverflowConsider the following line of code: new (p++) T(); If the constructor T() throws an exception, is p guaranteed to have already been incremented?

 
6:02 PM
ok, another stupid question, please correct me if I'm wrong: how are C++ generics implemented? Does the compiler create two methods specialized for each type?
 
yes
effectively
 
hmmmm...
 
Yes, this is also known as "code bloat" :)
 
the methods are generated statically by the compiler
lol
 
is there a particular reason why it can't use one method for multiple types?
 
6:03 PM
what are the rules for the place
sometimes it does
what are the rules for the placement of static assertions?
I have one that I'd desperately like to stick right before my return type deduction
 
@Juliet Because different types could enable different kinds of optimizations.
 
Because different types require different machine code
if it doesn't require different machine code, then they can be folded, and Visual C++ does fold identical machine code instantiations
 
Arguing with optimizations and machine code... Bjarne would be proud of us :)
 
I know in OCaml, it supports generic functions with hardly any effort at all and compiles to native code. However, type safety is only checked at compile type, the generic types are erased at compilation time. It doesn't need to generate any new methods because all the reference types are accessed through a pointer, and all the pointers have the same size
 
@Juliet Can I say new T[123] in OCaml? It's not possible in Java due to type erasure.
 
6:08 PM
that's basically what Visual C++ does- in the case where you're using a pointer
 
java generics are goddamned stupid
 
whereas C++ allows, well, nearly anything
 
@FredOverflow: yes, Ocaml has generic arrays
 
haha
I love Visual Studio
1>d:\backups\code\projects\blank\blank\blank.cpp(21): error C2947: expecting '>' to terminate template-parameter-list, found '>'
 
Can we see the code? :)
 
6:14 PM
I put a static assert in a template parameter list :P
 
@FredOverflow: plz send teh codez (ftfy)
 
@DeadMG That doesn't sound right :)
 
"Yes. " Should be a perfect valid answer in SO
 
@Juliet I can has code?
 
lol
ok
 
6:16 PM
you know I told myself I was going to learn C++ someday :)
I feel like my resume is pretty sparse without it
 
I managed to get close to the behaviour I wanted
but MSVC will still throw on the type deduction
 
Can't you replace static_assert with enable_if?
 
no
firstly, I want an explicit failure, not a substitution error, and secondly, I want my own nice error message, not a compiler monster
 
non-code question: so, did anyone go the gay pride marches in your town :)
we had one here in omaha, it was fun
 
6:26 PM
a tip from a pro- there's actually very little US population here
so you can bet a fairly large horse that there was absolutely nothing going on for most of us
 
@Juliet i don't go to stuff like that, but in my town we have the biggest one in the world... it's quite scary the amount of ppl that attend, 4million or so it was estimated
 
@DeadMG Are horses the local currency where you live?
 
oh really? where are most of you from?
 
I think I might be the only one from the Middle East, Egypt to be exact.
 
Sao Paulo, Brazil here
 
6:28 PM
@Juliet Nah -- my openly-gay friend says he won't go to them until they eliminate the discrimination by having a "straight pride" parade (seriously). I figure if the one openly-gay guy I know very well won't go, there's not much point in my showing up...
 
@Luc Danton: Yes. Horses. I possess many horses. And I trade them for a place to live. Regularly.
 
I can gcroot<> an C++/CLI "pointer", but I can't gcroot a C# interface??? The interface would be a handle to an object, what's the difference?
 
@Xaade: You have to pin it first, as far as I know
United Kingdom here
you'll find a fairly large German contingent if you hang around long enough
 
@JerryCoffin: they do have a straight pride parade, its called St Patricks Day. See also, Spring Break.
 
@Juliet I'm not the one you have to convince of that (though I have some questions about guys who dress up as little green elves...) :-)
 
6:30 PM
lol
at least you guys don't have a Nazi parade
it's called the BNP :(
 
in the US, we call 'em republicans
 
heterosexuals aren't allowed to be prideful.... we're the disease now.
 
at our festival, we had plenty of PFlag and Gay Straight Alliance floats
 
anyone familiar with rpmbuild from a spec file in linux
 
> Oops! Your question couldn't be submitted because: Sorry, you are only allowed to ask 6 questions in a 24 hour period
Meh
 
6:43 PM
Ask here! Ask here!
 
0
Q: Convert from C# interface to C++ void*. C++/CLI to use pointer to bridge native C to C#

XaadeI'm trying to bridge native C++ to C# using C++/CLI. I've created a bridge class that is to be called from native code, that basically reroutes calls through to the C# object. To do this, I've created a C# interface to derive C# objects from and I have a class factory that's producing C# objects ...

@FredOverflow Welcome to Russia, where questions ask you!!!!
 
@LucDanton Okay, but you guys have to be quiet for one minute ;)
At the moment, I have the following line of code in one of my toy classes:
data_ = new T[size_];
Now I want to replace that single line of code with operator new[] and placement new:
data_ = static_cast<T*>(operator new[](size_ * sizeof(T)));
if (!std::is_trivial<T>::value)
{
    T* p = data_;
    try
    {
        while (p != data_ + size_)
        {
            new (p) T();
            ++p;
        }
    }
    catch (...)
    {
        try
        {
            while (p != data_)
            {
                --p;
                p->~T();
            }
        }
        catch (...)
        {
            std::terminate();
        }
        operator delete[](data_);
        throw;
Did I get the semantics 100% right? Did I forget anything? Are there any library functions I could use?
go :)
 
Xeo
> Now I want to replace that single line of code with operator new[] and placement new
somehow that just doesn't sound right
 
Well, I use placement new in a different constructor, so I have to use placement new in all constructors, right?
Also, memory allocation should eventually be deferred to an allocator.
 
Xeo
Can't you paste a compileable example on Ideone?
 
6:51 PM
Why? I just want to see if I got the semantics of new T[n] right.
 
Xeo
Okay, wait, I think I missed the discussion on what exactly you want to achieve
 
It looks fine, I'm not sure how it acts though.
 
No alignment issue with operator new[]? My preferred way is to use new char[...] because it has alignment guarantees from the Standard
(well no actually I'd rather use aligned_storage but failing that)
 
I hadn't thought about alignment...
 
Xeo
Hm, I'm wondering.. can TMP be seen as a purely functional language?
 
6:57 PM
@FredOverflow Do you want an example that uses std::aligned_storage? I notice you're using C++0x
(and in any case there's boost::aligned_storage)
 
Is it really possible that operator new[] followed by placement-new at that address fails because of alignment? I somehow find that hard to believe.
> The allocation function attempts to allocate the requested amount of storage. [...] The pointer returned shall be suitably aligned so that it can be converted to a pointer of any complete object type with a fundamental alignment requirement
looks good enough for me
 
I don't know, I'm quite timid regarding alignment issues. Again, I know that new char[n*sizeof(T)] has special behaviour but even then std::aligned_storage is even more explicit in what it does.
Your code seems correct to me.
 
I can't believe that my answer got three upvotes
3
A: how to determine the size of virtual base class and derived classes from it??

DeadMG how to determine the size of virtual base class and derived classes from it?? Use sizeof().

it was a fairly worthless answer that I only posted because in my immaturity I found it funny to do so
 
Xeo
@sbi I flagged it too now.
 
sbi
@Xeo Welcome too my club of outlaws. :)
 
Xeo
7:12 PM
Current flagweight: 290. Let's see if it drops or rises.
 
sbi
@Xeo Wow, I never looked at this. Mine is 225. I can even click on it and get to a page that lists what I have flagged, but I can't seem to find out whether a specific item on the list has increased or decreased my flag weight.
 
210
 
When delete[] p is called and one of the destructors throws an exception, is std::terminate called?
 
don't believe so if there wasn't already an exception
 
So what happens if I delete[] an array of 10 elements and element at index 3 throws an exception when destructed?
 
Xeo
7:18 PM
@FredOverflow Well, the rest won't be properly destructed I guess
 
the others are destructed, the memory deallocated, and the exception propagated
I believe
 
Xeo
oh, really?
 
[ Note: The deallocation function is called regardless of whether the destructor for the object or some element of the array throws an exception. — end note ]
Can't find anything else just yet
 
Can someone please ask that question on SO? I can't, limit reached :(
 
> In the case of an array, the elements will be destroyed in order of decreasing address
 
sbi
7:20 PM
@FredOverflow I find it silly that a 25k user who's earned most of his rep by answering can reach a question limit short of posting 20 questions/day.
 
It's all there is so I have to side with DeadMG's version
 
@sbi 6 is the limit :(
 
sbi
@DeadMG The memory might be freed, but destructors definitely aren't called.
 
@LucDanton What happens if another destructor throws?
 
Xeo
@FredOverflow Welcome to trouble?
 
7:21 PM
@FredOverflow I can't find anything
 
@FredO: I know for sure that if an exception is thrown whilst the stack is unwinding, then some termination function is called
 
But I'm not talking about stack unwinding. I'm talking about delete[] p.
 
@sbi: o rly? oh well, close enough
@FredO: But if you throw an exception from one object of delete[] p, then you are unwinding the stack, it just hasn't propagated out yet
 
Xeo
Atleast GCC stops right after the first exception: ideone.com/BPuwY
 
@Xeo That's what I thought, calling std::terminate immediately. Thanks.
By the way, love the Spanish_Inquisition :)
 
7:27 PM
Nobody expects a double pointer to the Spanish Inquisition.
2
 
Xeo
MSVC doesn't like exceptions during delete [] either and also stops after the third
 
lol
 
Xeo
No answer yet. :( It seems my hope may be in vain.
 
Try a carrot. I mean, bounty.
 
7:33 PM
@Xeo Minor nit: should use std::cerr, but the behaviour is similar.
 
Xeo
@LucDanton huh?
Ah, for the destructor & exception stuff
 
sbi
@DeadMG Well, definitely IMO, anyway. :)
@Xeo tl;dr
 
8:00 PM
shitz, they moved it to codegolf
66
Q: Challenge: Programmatically detect whether code is compiled with C++03 or C++0x

Armen TsirunyanIt is possible to write a function, which, when compiled with a C compiler will return 0, and when compiled with a C++ compiler, will return 1 (the trivial sulution with #ifdef __cplusplus is not interesting). For example: int isCPP() { return sizeof(char) == sizeof 'c'; } Of course, th...

 
If a process leaks memory, does that memory become available when the process dies?
 
@JohannesSchaublitb we already noticed
 
depends on the memory
 
and the os
 
I believe that some kinds of memory can be leaked
but they are definitely more technology-specific, in general, thne yes
 
8:09 PM
How many "favorites" do you have?
That is, how many questions did you mark as "favorite"?
I only have 2 :)
 
I'm a new user, so 2. @FredOverflow
 
Is that just a bookmarking feature for quick future reference, or is there more to it?
It has nothing to do with rep, right?
 
Well, that's how I use it anyway.
 
I have about 3 pages of them.
 
sbi
@Xaade That depends on the OS. For example, in Win32 it does, in DOS (and, I believe, Win16) the memory was lost.
 
8:12 PM
@sbi All memory, or just the heap memory?
 
@sbi All Ur Memory are Belong to leaks.
 
sbi
@FredOverflow Before we had the FAQ, remembering well-answered questions was the main purpose for which I used favorites. I haven't looked at these for a long time now, and could probably weed out 70% of them.
@Xaade Ur used to be a city in Mesopotamia.
 
@sbi I guess we don't know much about Ur!!!
 
sbi
@FredOverflow I think the canonical term is "all resources belonging to the exited process".
 
Uranus.
 
8:14 PM
@CatPlusPlus Ur memory in Uranus.
They discovered Uranus actually contains a small black hole.
 
unlikely
 
All black holes are memory leaks. God deleted a sun and forgot clean up the memory.
 
a black hole is when God *(NULL)
 
sbi
@Xaade To the contrary. Since they had just started "writing" (by drawing pictures into clay, actually) back then, it's one of the most talkative archaeological sites of that time. IIRC, at least for the later periods they wrote down most of their trade and other economic facts, so we know quite a lot of details about their everyday life.
@FredOverflow I think you missed that joke. (It's on par with jokes like "What does toilet paper and the ENterprise have in common?")
 
I've never actually favourited any question
ever
 
8:20 PM
@sbi Was the language on the clay tablets an Ursprache?
 
sbi
@LucDanton :) (Actually it was Sumerian.)
 
hmm
@FredOverflow you can see how many others marked
you can also list them. it's public
 
@sbi What's the answer?
 
sbi
@FredOverflow It puns with Ur anus and Kling-ons...
 
8:28 PM
lol
 
Hasn't Uranus been renamed to Urectum to end these stupid jokes forever?
 
sbi
@FredOverflow No, but the English astronomers, sick of these jokes, attempted to change its pronunciation so that the first "u" is stressed, and the word is disambiguated.
Um, got lost on Wikipedia reading about Sumerian (pre)history. I do need to go to bed, though. <sigh/>
Good night!
 
Xeo
8:46 PM
g'night
 
9:08 PM
WOOTAGE
I now support runtime polymorphism on controls in C++ and C#
On a C# or C++ platform.
And support a C++ exe creating a C# control that creates a C++ control.
 
Xeo
9:28 PM
Heh, I like this one:
13
Q: Circumventing template specialization

Armen TsirunyanSuppose I am a user of a Certain Template Library (CTL) which defines a template, named, say, Hector template <class T> class Hector {...}; And in its documentation it gives many guarantees about Hector template behavior. But then it also defines a specialization for a certain type Cool...

That one is good.
 
he got pwned
 
Xeo
I was basically grinning while reading it top-down.
 
9:52 PM
Why did he circumvent mentioning STL?
 
The question is interesting in the general case I suppose
 
What about in the specific case of STL?
Is it evil to not like something in STL?
 
a lot of people seem to think it is
I however am growing increasing disillusioned with it's design
 
I don't understand....
 
don't understand what?
 
9:57 PM
If anything is above reproach, it is below improvement.
 
well
the STL was quite clearly the best thing ever in that field for some time, at least as far as imperative languages go
and some people have a very deep historical connection with it
but fundamentally, I feel that they went way, way overboard with iterators, far beyond where they genuinely made sense
 
@DeadMG So do old people and soap operas.
 
lol
some problems with it are in the language- like no named parameters
but iterators where ranges would be appropriate, no re-allocation in the allocator interface
 
I know people have good reasons to insist it's good, because it is that good.
 
and iostreams
and the char/wchar_t debacle
 
9:59 PM
However, limiting people from altering it, because people think it can't be improved.... is just pride.
 
and new and delete and new[] and delete[]
 

« first day (254 days earlier)      last day (4710 days later) »