« first day (264 days earlier)      last day (4700 days later) » 

1:01 PM
don't worry, no doubt we'll find exciting new off-topic things to discuss today
 
What about something half-on-topic ?
How would you implement a user-land, non-preemptive multi-tasking system ?
 
carefully
 
Each thread should have its own private context, and access to shared data.
 
@kbok that sounds like coroutines i you ask me
or fibers
 
@jalf What is it ?
 
1:06 PM
pretty much exactly what you said :p
cooperative threading, basically.
 
I've used similar stuff in microcontrollers
it was FreeRTOS
pretty nice piece of software
 
@jalf It is indeed. And there's a Boost.Coroutine lib. Problem solved :)
 
just out of curiosity, what are you trying to do?
 
@kbok: I just checked the Boost site and don't see any coroutine lib
 
@DeadMG Wikipedia says it's unfinished
and the link gives a 404. bummer.
@hexa A couple years ago I made an equivalent of DIV Games studio
 
1:20 PM
@kbok google found this: akira.ruc.dk/~keld/research/COROUTINE no clue if it quality work
 
Well, May 1999. :(
GNU pth has coroutine support
 
yeah, I'd be scared of 1999 C++ code
@kbok if I recall correctly from when I read up on Boost.Coroutine, the author found the pthreads implementation to be unacceptably slow. It stores way too much data on context switches
so they ended up hacking their own together in asm
 
@jalf I see. What about windows Fiber ?
 
 
That's interesting
In the end we implemented a hackish stack switching which looked like what the boost guys did.
 
1:37 PM
I need a personal army
2
A: Single-use class

Steve314Sounds like your class is basically a parameter block in a thin disguise. There's nothing wrong with that IMO, and it's certainly better than a function with so many parameters it's hard to keep track of which is which. It can also be a good idea when there's a lot of input parameters - several...

Is this guy right? I think he’s dead wrong …
(see comments)
 
I think the idea of a "Tool" class is bad, reusable or not.
 
In some languages it's unavoidable
see the Math class in .NET, for example
 
OO design is about creating types and assigning operations to it, not the other way around.
 
@kbok Maybe correct, but classes representing algorithms is completely OK sometimes.
 
but yeah, it's really a workaround for language shortcomings
but I don't see a problem with what the OP is describing.
 
1:44 PM
@jalf Does it have a pre-operation and post-operation state ?
 
Nope, it's basically a collection of static functions, like sin, cos, sqrt
 
Namespacing functions is OK, but creating a class for input and output data of a single operation is not good OO design.
 
It acts as namespace for what would be mathematical "free functions".
 
sbi
@KonradRudolph It's irrelevant. This is not a setup to use a class with.
0
A: Single-use class

sbiWhat you describe is not a class (state + methods to alter it), but an algorithm (map input data to output data): result_t do_it(parameters_t); Why do you think you need a class for that?

@kbok I'm with you on that.
 
@sbi Upvoted.
 
1:47 PM
@sbi: Hmm, what about these:
In object-oriented programming, the command pattern is a design pattern in which an object is used to represent and encapsulate all the information needed to call a method at a later time. This information includes the method name, the object that owns the method and values for the method parameters. Three terms always associated with the command pattern are client, invoker and receiver. The client instantiates the command object and provides the information required to call the method at a later time. The invoker decides when the method should be called. The receiver is an instance of the...
In computer programming, the strategy pattern (also known as the policy pattern) is a particular software design pattern, whereby algorithms can be selected at runtime. Formally speaking, the strategy pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it. For instance, a class that performs validation on incoming data may use a strategy pattern to select a validation algorithm based on the type of data, the source of the data, or other discriminating factors. These factors are...
In software engineering, the template method pattern is a design pattern. It is a behavioral pattern, and is unrelated to C++ templates. Introduction A template method defines the program skeleton of an algorithm. One or more of the algorithm steps can be overridden by subclasses to allow differing behaviors while ensuring that the overarching algorithm is still followed. In object-oriented programming, first a class is created that provides the basic steps of an algorithm design. These steps are implemented using abstract methods. Later on, subclasses change the abstract methods to imple...
 
@kbok who cares about good OOP design? The important question is whether it is good design of any kind
2
 
… but in general I would agree with you, especially in C++, since those patterns essentially work around limitations of OOP, which C++ doesn’t have
 
if it's good design, it hardly matters whether or not it is OO
and if it's not good design, being OO isn't going to save it
2
 
@KonradRudolph The command pattern is used to postpone the operation, and Strategy is only about the shortcoming of languages which does not have function as first-class citizen.
@jalf If you're writing a class, then it's OOP
 
sbi
@KonradRudolph Well, if you need to pass around/store/whatever functions, then function objects might be the right thing to use. (But then function pointers might be just as good.) However, mostly programmers are doing it just because there's no other way in the oh-so-OO languages (Java, C#) without even thinking about free functions.
 
1:49 PM
@kbok If you're writing a class, it's a class.
 
@MartinhoFernandes I mean, how using objects can be not-object-oriented ?
 
sbi
@kbok Not necessarily. For example, what if the class is a meta function.
@kbok A class isn't an object.
 
@kbok main() { TheOnlyClass startup(); startup.DoCode(); }
 
Yes, I admit this is different. But in this case we are using objects.
 
object-oriented is a stupid name anyway. Using objects makes sense, but pretending that they're some kind of magnetic pole that everything is "oriented" around is just stupid and misleading
 
sbi
1:52 PM
template< int I >
struct power {
  static const int result = I * I;
};
That's a class, but not OO.
 
That snippet just delays main's code into a class that performs one method. So it's still functional code, no OO
 
A class is just a language feature.
 
also, Exchange Web Services are stoopid and I hate them
what kind of idiot programmer defines a class containing two members, Item and Item1?
 
OO is a way of thought and design using features of a language that permit it.
 
Yeah, should have been Item1 and Item2.
2
 
sbi
1:53 PM
@jalf You have the attention span of the common mosquito.
 
@sbi boooring! are we going to talk about me all day? :D
 
sbi
@kbok So is the STL OO? Because, you know, we use objects of classes from it all day.
 
anyway, it's not my fault I'm trying to work while chatting
 
You can write OO like code in a functional language that doesn't have classes.
 
sbi
@jalf We weren't talking about you, we were talking about classes vs. OO.
@jalf Others here are chatting while they work.
 
1:54 PM
@sbi you talked about my attention span ;)
 
You just specify to yourself which data members and methods belong to which object
 
I was trying to imply that a whole sentence about that was as much as my attention span could handle
 
I stand corrected.
In my defense, my confusion about classes and OO is probably a result of Java brainwashing.
2
 
@kbok one of Java's greatest sins
 
Yeah, everything's an object clutters what objects are meant to do.
 
1:56 PM
Always fascinates me how that language has completely (and successfully) changed the meaning of "object-oriented"
 
sbi
@kbok Nowadays, most confusions of C++ users ultimately are the result of Java brainwashing. (It used to be C two decades ago.)
 
Well, this data MUST be an object, so give it a few operator overloads and pretend it's not POD.
Then everyone goes around thinking an object is just an encapsulation of a data type.
An object is an encapsulation of an algorithm that manipulates data.
 
Anyone know the website "Experts Exchange"?
 
@Xaade That's what I hate about Java. A simple data type and you end up with dozen of getGloubi()/setBoulga()
 
I prefer C# properties.
C++ should have that
 
sbi
1:59 PM
@KerrekSB No. We all only know "Expert Sex Change".
 
Properties has people think more about when to use get/set and when to make a data member public.
 
Anyway, to get back on the question : What are the advantages of using the OP's design ?
 
@Xaade C++ doesn't need that.
 
My boss's boss gets so frustrated when he sees a private data member with public get and set methods that don't put data restrictions or abstract the data type.
 
@Xaade I like him already
 
2:01 PM
@MartinhoFernandes Sure, we can take every POD member and make it an object and give it operator overloads..... that's all properties are....
 
@Xaade No! Properties are sugar for get/set pairs.
 
@jalf He also hates a static method that doesn't interact with any static data in the class.... "Use a damn namespace."
 
@Xaade You're talking about C++ or C#?
 
@MartinhoFernandes get/set pairs pollute interfaces.
 
@sbi You ruined it. I was going to say how Wikipedia laconically remarks that the website was changed from www.expertsexchange.com to www.experts-exchange.com to avoid "the potential for confusion".
 
2:02 PM
What's the point of a static method that does nothing to the class.
 
@Xaade You can't have free functions in C#.
 
All you're doing then is using the class as a namespace.
 
There's just no way around it. "Use a damn namespace" does not work.
 
sbi
@KerrekSB Did they? Wow. You wonder how they could ever named the site such. Oh wait. The only reason I remember them is that joke...
 
@Xaade that can be necessary though, in order to implement traits classes and the like. But yeah, in the general case, I definitely agree with him
 
2:05 PM
It clutters classes, because now we have methods that belong to objects just because they "fit" in that category.
@MartinhoFernandes Yeah, but you can use classes as namespaces in C#.... meaning that if the method doesn't interact with an object, it should be in a collection of methods somewhere else.
 
sbi
LOL. Mark even deleted my comment where I said deleting comments discussing the issues at hand is wrong (this question). Fortunately, I had it copied before I reloaded the page, and could add it back right away. :)
 
Oh, you mean pure static methods inside a "regular" object. Agree.
 
A formatting class shouldn't create a control simply because the formatting class formats controls.
 
@sbi I don't understand this idea that we can't use comments any more.
 
sbi
@MartinhoFernandes Yeah, that's plain stupid. I hate the idea. It's always good to look at old questions and read the comment discussions to see why some answers were up/down-voted.
 
2:10 PM
Even if now there's a policy to encourage moving discussion to chat (which I'm neither for or against), there's no need to delete comments.
 
communities are built around comments
 
Yes. And some annotations are very useful to understand the context.
 
sbi has added Xaade to the list of this room's owners.
 
Damn, he was fast.
 
sbi has removed GMan from the list of this room's owners.
 
sbi
2:11 PM
@MartinhoFernandes Yep.
 
sbi has removed John Dibling from the list of this room's owners.
sbi has removed James McNellis from the list of this room's owners.
 
Doing a little house cleaning eh?
 
He’s trying to usurp power
 
sbi
@KonradRudolph I just had a look at the list of "frequently in room" users and adjusted the list of owners.
 
Admit it, you only stopped because Konrad figured it all out ;)
 
2:21 PM
sbi has added Johannes Schaub - litb to the list of this room's owners.
 
sbi
@MartinhoFernandes I had to have a look at the pot on the stove. No other reason.
Really, John and James have rarely been here recently. John's profile doesn't even show any "typical activity" anymore. I though it'd be time to replace them by more active users.
Jun 25 at 20:44, by sbi
To prevent this from ever happening again, we have the inofficial room policy to turn regulars into owners (and to remove those no longer here from the list of owners).
(from the newbie hints)
 
I am getting an epic badge today! Yay :)
 
room topic change to Lounge<C++>: Feel the power
 
@DeadMG you there?
 
I am
 
2:35 PM
That thing you mentioned before.
 
actually, very quite ironically, I literally just switched to this window to see what was going on
 
First, let's see if I understand what it is.
What is the second argument list?
 
what do you mean?
 
Does it make sense of a lambda to catch by rvalue reference?
 
2 hours ago, by DeadMG
void f(type t)(std::vector()(t) vec) // how the fuck am I gonna implement that
 
2:37 PM
@MartinhoFernandes Questions provide the what. Comments provide the why. I often find it frustrating that our company does not let us document the why, in order to prevent legal issues..... It hurts maintainability. Without the why, maintaining questions and answers will become more difficult as they lose context. "I'm sorry, I didn't realize you were talking about what was removed from C++0x. In context of C++12, your answer was wrong, so I edited it."
 
@Kerrek: Yes, but you can't
@Martinho: The first is prev-pass, the second is this-pass
so that would be the equivalent of
template<typename T> void f(std::vector<T> vec)
 
The answer to why? is very important to keep.
So important, that the discussion in mentioned in "The Matrix"
C'est vrai! I watched just yesterday evening.
 
@DeadMG So, the problem is, how can you use the t from the previous pass?
 
no
how could I possibly deduce t?
 
2:41 PM
I mean
I don't think it's a good idea to do that anyway, but C++ supports it
 
@DeadMG OK. Can you capture by const lvalue reference, though?
@DeadMG Or rather, why can't you? :-)
 
@Kerrek: I don't actually know, on either question
 
If I write std::vector<int> x; f(x); the C++ compiler looks up the type of x, it's std::vector<int>. Since the argument is expected of type std::vector<T>, T is int. What prevents you from using a similar algorithm?
 
because there's no link between x and std::vector<int>.
the type of x is just an object, there's no way to know where it originated
 
Ok, obviously, you'll need some way to track information about that. Which will probably add too many limitations to the system :(
 
2:56 PM
well, there are limits anyway
I obviously can't do, for example
void f(DatabaseConnection db)( GetTableType(db, "hello") x)
 
Maybe we should have a new tag for "broken C++". Or "C-style C++". Or "terribly non-idiomatic C++"
 
so I was thinking about that cache thing, and I figured that a simple hash requirement for the arguments would solve that problem
if I hashed into a 64bit range, I could just use a concurrent_unordered_map as a thread-safe cache
I think
 
If that provides some kind of get_or_add method which is atomic.
And preferably, takes a functor as a parameter, to enable lazy construction.
 
yeah
 
Is that C++11 or some of those Microsoft libs (AMP, PPL, whatever) btw?
 
3:04 PM
PPL
The Standard Committee didn't add any significant concurrent algorithms or containers, they pretty much just wrapped the primitives and added it to the memory model, afaik
 
:(
Hopefully boost can fill that blank.
 
they likely will
unfortunately, MSDN doesn't offer any documentation, and I don't see any aptly named functios
 
Do you know what is the horror? BASIC in microcontrollers. And now I have to mantain that piece of crap. jesus, please kill me
here we go:
sub procedure Pausa_250()
Delay_ms(250)
end sub
sub procedure Pausa_500()
Delay_ms(500)
end sub
 
Seems like the problem is not just the BASIC.
 
@hexa People call me masochistic, but I love the "simpler" languages.
@hexa That just seems... Pointless.
 
3:17 PM
@DeadMG There's got to be something. Maybe not one that takes a functor, but there must be at least one that takes a value.
Otherwise that's a very sucky implementation.
 
@poik I'm all for simplicity too. But microcontrollers and BASIC, for industrial applications, simply do not match. Besides, this guy has ALL the variables global abuses goto (well, it is basic so i don't know if you can escape this much) and does stupid things like those functions i pasted...
 
What I've seen of BASIC wasn't really all that simple
it seemed like a very simple language, which had then been stretched and ad-hoc modified to support more of what people might expect
 
@Martinho: Sure, but I don't know about atomically inserting-or-returning
 
@hexa It depends on the version, but on the one I used every variable is global and goto is the only branching system available.
 
you can't have local vars in basic? I do not know. Seriously, i haven't touched BASIC in eons.
Also, this whole project is a single enormous file
 
3:23 PM
I played with DARKBASIC like, thirteen years ago or whatever and it had local vars
 
Define enormous.
 
@MartinhoFernandes "larger than 'huge'"
but a bit smaller than "very enormous"
 
hmm
void (f(type (t))(std::vector()(t)(vec))) may be valid but UB C++
 
@JohannesSchaublitb That's because it's not C++.
 
@MartinhoFernandes it's around 100kb, don't know how many lines cos I am opening it with notepad atm, trying to find the IDE this guy used, it's here somewhere.
@kbok I also think this guy doesnt know how to use functions that return values... So he puts the variable global and do something like: get_key(); if (key == 'x') ... but key is global
 
3:30 PM
If he uses globals to pass parameters as well, at least he's consistent.
 
@hexa over the last couple of months, I've developed a severe allergy against (mutable) globals
 
0
A: Real life examples of xvalues, glvalues, and prvalues?

FredOverflowConsider the following class: class Foo { std::string name; public: Foo(std::string some_name) : name(std::move(some_name)) { } std::string& original_name() { return name; } std::string copy_of_name() const { return name; } }; The...

 
@MartinhoFernandes yes he does, all his functions have no parameters and return no values
 
So all his functions are actually "pure functions" for a certain twisted definition of pure (aka pretty much the opposite idea): they only do side-effects.
 
@MartinhoFernandes I would call that anti-pure.
 
3:38 PM
@hexa In GW-BASIC there is no functions. GOTO ftw
But I hope the version used in your microcontroller is more advanced.
 
@kbok What about GOSUB/RETURN?
 
@kbok In C64 Basic, we did not even have labels. We had to use line numbers :-)
 
@MartinhoFernandes AFAIR they were in QBASIC. Upgrade required :D
@FredOverflow We had too. Good times, good times.
 
oh man
I remember QBASIC and line numbers
I was only three years old and I wrote programs to insult the user if they identified themselves as a sibling of mine
 
We were so happy to switch to QBASIC because there was a feature where all line numbers align to a multiple of 10.
In GW-BASIC when you run out of line numbers you just had to re-write your program.
 
3:40 PM
@DeadMG You wrote programs at age three?
 
I remember noticing that a line number 1 did not use more disk space than a line number 1000, although it used more space on the screen. That was a complete mystery to me back then.
 
I recall that my BASIC book had a line-renumbering program as an example
 
yep
no wonder I'm so L33T, huh
 
On the C64, the further down a line was in the program, the slower was going to it, because it had to basically run down a linked list to find the number :)
 
@DeadMG I'm slightly jealous, our family didn't even have a computer then.
I actually forced my parents to get one when I was 5.
 
3:42 PM
lol
 
So putting often used subroutines right at the top was an optimization :-)
 
Was it premature?
 
There is no such thing as premature optimization if you're living in 38911 bytes of RAM and such ;-)
 
@DeadMG Out of curiosity (and you don't have to answer if you don't want to) how old are you?
 
(Yes I know, speed has little to do with RAM in this case.)
 
3:43 PM
20
 
Ah, same.
 
erased Windows from the family machine when I was six :P
 
it wouldn't load my DOOM-clone game and it said not enough memory
so I figured I'd get cleaning
 
and you thought memory = disk space? :)
A good friend of mine had to delete Monkey Island 1 and a bunch of other games in order to install Monkey Island 2 :-)
 
3:45 PM
hey
six years old
 
When i was about 8, I thought BASIC and english are basically the same language. So I started programming a Pacman clone in english and wondered why nothing happened.
 
@FredOverflow You confused BASIC with COBOL.
 
I certainly did not know about Cobol back then :-)
 
That was probably for the best.
 
I also wondered why the C64 pokes did not work on the C8032.
POKE 53280,0 and the screen frame went black... that was like complete magic back then!
 
3:48 PM
Black magic, for sure.
 
I wish questions with both and were forbidden.
 
52 mins ago, by Kerrek SB
Maybe we should have a new tag for "broken C++". Or "C-style C++". Or "terribly non-idiomatic C++"
@KerrekSB There's already a name for that style of programming: C with classes :-)
@MartinhoFernandes And how would you ask "Is C++ a strict superset of C?" questions then? :-)
 
@FredOverflow Make it require 1k rep.
 
@Martinho: normally we just edit it so they lose it.
 
3:55 PM
What if you don't know which one is the correct one?
 
link the question
 
0
Q: How can i set same int value to an array of ints

Erik SapirI have a variable: unsigned int* data = (unsigned int*)malloc(height * width) I want to set same int to all array values. I can't use memset because it works with bytes. How can i do that?

It's fixed now.
 
user180247
What if you care about both languages, irrespective of whether the answer is the same for both? I've done that before. Also, what if you're asking about the differences between the languages?
 
@Steve314: If you want to know the answer for both languages, ask two questions. The difference between the two languages is an extremely minimal subset of questions, whereas most questions tagged with both are plain incorrect to tag them both
 
Most of the time, it's just because someone thinks they're programming in that mythical beast, the C/C++.
 
user180247
3:59 PM
@DeadMG - when I did the answer for both thing, the idea was that if there was a difference, the compare-and-contrast was likely to be much smaller than the overall principle. There are also very few questions asking to compare Pascal and C, but would you ban that tag combo too? I have sympathy with the point of view, but it still has issues.
 
user180247
@Martinho - C/C++ isn't entirely a mythical beast. It's as good a name as any for working in the intersection language.
 
@Steve314: The difference is that nearly everyone that tags C and C++ is flat out wrong to do it. Either you're compiling your program in C, or you're compiling it in C++, and the vast, vast majority of times, any posted code would be vastly different for C++ than for C
 
user180247
@DeadMG - agreed - I'm just cautious about saying "never".
 
if the answers would be similar, then you do't have a language-specific question at all and shouldn't tag either of them.
 
I once had an encounter with the mythical C/C++ beast. It had ravaged the code-base with objects that simply encapsulated "Yet More Procedural Code"(TM). It had eaten all the namespaces, and put all includes into the precompiled header. It had spawned God-classes, and created duplicate code where templates had once been. It had created its own containers which had hard-coded member types. Then once it was done, it exported a bunch of C-Style functions to nowhere.
 
4:04 PM
I don't even understand how C/C++ can exist
either you're compiling with a C compiler, or a C++ compiler
and if it's both, then you're stuck to C anyway
 
The only useful definition of C/C++ in my book is "C without C++ keywords" and a bunch of other restrictions... an upward-compatible version of C :-)
1
Q: Why are anonymous functions treated differently from named functions here?

FredOverflow Possible Duplicates: Javascript: var functionName = function() {} vs function functionName() {} What is the difference between a function expression vs declaration in Javascript? Today I stumbled upon the following phenomenon: foo(); bar(); function foo() { console.log("inside ...

Wow, closed after three minutes... the JavaScript guys are apparently very efficient when it comes to finding duplicates :)
"JavaScript" and "efficient" in the same sentence, who would have thought? :)
 
user180247
@DeadMG - My example of an interested-in-both question - stackoverflow.com/questions/3569424/…. Note - in this question, it's reasonable to be interested for C and C++, whether the answer is the same or for compare/contrast, but not really sane to leave it open for all languages.
 
I think that it would be perfectly sane to leave open for all languages, it's an algorithm, nothing more
 
user180247
@DeadMG - there is code that needs to be written for inclusion in multiple projects, some all-C, some primarily C++. Many C library headers are written in this intersection C/C++, simply because the libraries are also called by some users from wrappers written in C++.
 
user180247
@DeadMG - actually, no - it's a language-specific question about overflow semantics.
 
user180247
4:13 PM
@DeadMG - it just happens to be specific to two somewhat related languages rather than just one.
 
@Steve314: And those C library headers are written in C, it just happens to compile as C++. If they added in some C++ code, they would not compile for their C users. So they are not written in any kind of intersection, they are written in C.
@Steve314: It is an algorithm. Write 128-bit arithmetic in 64bit chunks without triggering overflow.
 
user180247
@DeadMG - "just happens to compile as C++" is by design, and involves deliberately avoiding C features that aren't C++ compatible.
 
avoiding using a few keywords does not make it any less C
you can, and I have seen, C# source files that will compile as C++ headers
 
let's call C++ just ++
 
user180247
@DeadMG - in the real world, no-one does that without triggering overflow. If you read the answers, you'd know that both C and C++ specify modulo 2^n overflow behaviour for pretty much that reason.
 
4:16 PM
does that mean that it's written in C#/C++? No, of course not, it's written in C# that happens to compile as C++
 
@Steve314 Modulo 2 arithmetic for the unsigned types, undefined behavior for overflow on the signed types.
 
user180247
@DeadMG - it's written in the intersection of C# and C++, and I have seen the term "C#/C++" used for that.
 
user180247
@FredOverflow - yes - sorry for missing that
 
well, if you actually used any C++ or C# features, then it wouldn't compile in t least one of them
 
I wrote code in macros that can compile at Burger King.....
Makes good gravy
 
4:17 PM
so how could you possibly label the resulting code with a language when you can't use any of the language features?
 
The following code works in lots of languages:
/* ... */
 
user180247
@DeadMG - the same goes for C-specific features that aren't in C++ or C#.
 
a language would be C#/C++ if you could compile any C# and any C++ code in it
 
@FredOverflow That just compiled in my own made up language.....
 
@Xaade My compiler saw nothing, the preprocessor erased it all :-(
 
4:19 PM
room topic changed to Lounge<C++>: Where we slay the mythical C/C++ beast
@FredOverflow My preprocessor erases a lot of what my wife inputs.
Mostly because she talks in incessant comments
 
@Steve314: Yes, of course it does. So how could you label any code C/C++ when it can't be any conforming C or conforming C++ code?
 
user180247
@DeadMG - if it's in the intersection language, it conforms with both - that was the whole point of "intersection".
 
no
 
an intersection is useful if it can communicate between the two languages.... compiling as either language is a fluke.
 
if you have something called "C/C++", then it should accept any C or C++ code
 
4:22 PM
It's not C/C++... it's C^C++
 
but you can't do that because your doddery old C compiler can't conceive of the idea of type safety, so you can't actually accept any C++ code
 
What in C can a C++ compiler not understand?
 
So, are there any X/Y languages out there?
 
VLAs, apparently there's some other complex initializer stuff too
 
@FredOverflow XML
 
user180247
4:23 PM
@DeadMG - My doddery old C++ compiler (precisely the same age as my C compiler) also can't accept certain C constructs.
 
those are distinctly more trivial than the C++ concepts C can't accept
 
C is keyworded assembly
with a few conditional constructs
 
user180247
@DeadMG - beside the point. Some people need to work in the intersection. Some people therefore do work in the intersection. Going on an I-shall-reject-your-evil-language is kinda nuts. Especially as I'm by far primarily a C++ programmer, who has only used very small amounts of C (except using some C libraries) for over a decade.
 
I know a group of people that still use COBOL to intersect with C.
Just because some people do it.... doesn't mean it's good.
We're running out of technology that can't understand C++
 
@Xaade You mean like a type system? Hardly worth mentioning, is it? :)
 
4:27 PM
My pinky fingernail can now hold more data than cellphones from five years ago.
 
user180247
@Xaade - no that I find hard to believe. I don't see how you can get C to accept all those "tedious division" and "crappy section" clauses.
 
@FredOverflow Hardly
@FredOverflow C++ carried on the type system loophole.... void*
 
there we go again!
 
user180247
@Xaade - go tell a true C fanboy that C is only an obsolete ancestor of C++. Wear good strong armour, though. And note - C seems to be more widely used than C++ even now.
 
if I can do math in a void* address....
@Steve314 Go tell a 40 year old man fanboy of "Little Ponies" that he's watching a children's show.
The qualifier fanboy eliminates one from practical debate.
 
4:31 PM
Douglas Crockford's history of everything is so funny: The Big Bang -> The Dawn Of Man -> JavaScript.
 
user180247
@Xaade - are you saying... that you don't like ponies!!!
 
@FredOverflow That's pretty complete since JavaScript == The Fall of Man.... Resistance 2 was written in JavaScript.
 
@Steve314 C++ is a horrible language. It's made more horrible by the fact that a lot of substandard programmers use it, to the point where it's much much easier to generate total and utter crap with it.
 
You forgot the quoting.
 
I think that everyone would be much better off if C upped and died
 
4:33 PM
@FredOverflow shhhh
 
Can I say I'm sorry for not mentioning the fact that when I said "I wish ... were forbidden." I was not being entirely serious?
 
user180247
@hexa - I doubt you'll find many experienced long-term C++ users who'd disagree with that - especially after a bad day. But most would still be using C++ tomorrow. C# and Java have their advantages too, but C++ is just the best tool for some jobs - no matter how bad "best" turns out to be.
 
@Steve314 I agree. That was a Linus Torvalds quote ;)
 
user180247
@hexa - probably not word for word, but I don't doubt he said much the same thing.
 
If you hand around enough you will see that I love quoting him, usually works quite well to piss DeadMG off
 
4:35 PM
I think that was word for word
 
The access that C++ has to everything is what makes it useful... So far no one's willing to do that much for any other language..... C++ is one of the last widely used languages that is non-proprietary.
 
@Xaade What does it mean to be a proprietary language?
Name widely used proprietary languages.
 
C# and Java
C# not anymore, I think
 
C# was an ECMA standard.
From the beginning.
 
4:36 PM
Abap
 
user180247
@hexa - oops - I confused Linus Torvalds with Bjarne Stroustrup - thought you were commenting on a different thing.
 
I'm pretty sure that it originated as a proprietary language
 
google ABAP
 
@MartinhoFernandes Almost the beginning anyway. Being an ECMA standard does more (IMO) to confirm than deny its being proprietary though. ECMA standards tend to be a way for companies to get their proprietary ideas enshrined as "standards" while still retaining full proprietary control.
 
user180247
4:39 PM
@DeadMG - "Microsofts baby" doesn't (at least by definition) automatically mean "proprietary". BTW - Java was born proprietary, and Sun resisted open-sourcing until relatively recently. With C++, many compilers are proprietary, but the language is as open as standards ever are (though buying a copy of the standard isn't quite free-as-in-beer).
 
Just because someone lets you use their language on another compiler, doesn't mean it doesn't belong to anyone.
Just saying that C++ has more access with relatively less work, and less trouble in the future.

Microsoft can change the .NET platform completely, and change C# standards.... then suddenly all those nice UNIX compilers and platforms will not be compatible with Microsoft's version.
"standardizing" a language doesn't mean anything if the owner hides specific reflexes in what is UB in the standard.
 
user180247
@Xaade - depends whether people code to the standard or to the compiler. And don't forget, the GCC compilers have nonstandard nonportable extensions too.
 
@Xaade Microsoft itself has several incompatible versions of the .NET platform. I find that point about UNIX tools breaking rather moot.
 
user180247
Aren't there several incompatible versions of Mono? And several incompatible versions of Java? And several incompatible versions of Python?
 
4:57 PM
I think OO works well for creating a GUI library. Its features of composition, inheritance and polymorphism fit the problem domain very well.
 

« first day (264 days earlier)      last day (4700 days later) »