Slashdot Mirror


Cairo 2D Graphics May Become Part of ISO C++

An anonymous reader sends this news from Phoronix: "The C++ standards committee is looking at adopting a Cairo C++ interface as part of a future revision to the ISO C++ standard to provide 2D drawing. Herb Sutter, the chair of the ISO C++ standards committee, sent out a message to the Cairo developers this week about their pursuit to potentially standardize a basic 2D drawing library for ISO C++. The committee right now is looking at using a C++-ified version of Cairo. Sutter wrote, 'we are currently investigating the direction of proposing a mechanically C++-ified version of Cairo. Specifically, "mechanically C++-ified" means taking Cairo as-is and transforming it with a one-page list of mechanical changes such as turning _create functions into constructors, (mystruct*, int length) function parameters to vector<struct>& parameters, that sort of thing — the design and abstractions and functions are unchanged.'"

273 of 430 comments (clear)

  1. Sure, why not by DoofusOfDeath · · Score: 4, Funny

    C++ stopped being a fully-humanly comprehensible language a long time ago. Might as well just add more crap to it like it's going out of style.

    1. Re:Sure, why not by Anonymous Coward · · Score: 1, Insightful

      C++ stopped being a fully-humanly comprehensible language a long time ago. Might as well just add more crap to it like it's going out of style.

      Competent programmers stopped being formed a good 10-12 years ago. The JAVA/.NET generation is a fucking disaster.

    2. Re:Sure, why not by beelsebob · · Score: 2

      You got +5 Funny, I don't know why, this comment is damn insightful.

    3. Re:Sure, why not by StripedCow · · Score: 1

      Why can't they just eliminate header files first?
      Why is C/C++ practically the only language that requires headers?
      Why do I need to type each function declaration twice. It is so cumbersome!

      --
      If Pandora's box is destined to be opened, *I* want to be the one to open it.
    4. Re:Sure, why not by rubycodez · · Score: 2, Insightful

      don't have to, you could mark everything inline and define in the header without typing each function declaration twice.

      not recommended for general practice 8D

    5. Re:Sure, why not by StripedCow · · Score: 1

      Your second sentence says it all.

      --
      If Pandora's box is destined to be opened, *I* want to be the one to open it.
    6. Re:Sure, why not by Daniel+Hoffmann · · Score: 1

      It's is like the classic "80% of the users use only 20% of the features" also know as the Word Syndrome. But since each user uses a different set of features you need to have everything in there. I'm not saying this is necessarily saying this is a bad thing.

    7. Re:Sure, why not by VanGarrett · · Score: 3, Interesting

      As something of a .NET programmer myself, I can testify to the veracity of this. .NET does a great deal for you, and I really think the handicap has prevented me from learning what's really going on.

    8. Re:Sure, why not by dreamchaser · · Score: 4, Interesting

      It's sad but true. My wife works in the CS department at a major University, and I'm appalled at what they are churning out with regards to graduates. I know I'll probably get modded down and see the inevitable jokes about 'get off my lawn' and such, but it's really true. The vast majority of new programmers are more or less clueless aside from pushing out cookie cutter bloated code.

    9. Re:Sure, why not by celle · · Score: 1, Insightful

      "The JAVA/.NET generation is a fucking disaster."

            Fucking disasters is more like it and all the coupling is creating a whole new generation of mega disasters.

    10. Re:Sure, why not by Anonymous Coward · · Score: 1

      This is a library only addition. Say what you will about the language itself but C++ has a very small standard library. Compare it to something like .Net or Java which is huge. This is one if the big complaints about the language is any real program written in it will have to use a ton of 3rd party libraries. Everyone uses different libraries and it this makes it difficult to combine code together.

      This is just a proposal, it might not go anywhere. I wouldn't see 2D graphics as being the first place to expand the libraries but it doesn't sound unreasonable. Having a standard including software libraries isn't unheard of either. Microsoft did this for .Net and ECMA.

    11. Re:Sure, why not by beelsebob · · Score: 2, Interesting

      To be honest, I love headers, and I'd love to see more languages use them. Not as a necessity to allow the compiler to see what's declared, but instead, as enforced documentation of what's a public API.

    12. Re:Sure, why not by rsilvergun · · Score: 4, Insightful

      News flash, the vast majority of _all_ people are like that. Very few people are capable of being the sort of 'Rockstar' programmer you're pining for. And what's wrong with that? Is it just me, or do we as a society just have unrealistic expectations of people? If you can't work 70 hours a week banging out amazing code non-stop you're worthless as a human being just because somewhere out there is someone who can. We hold up what are essentially freaks of nature that don't need sleep as the norm and wonder why the rat race is getting so awful...

      --
      Hi! I make Firefox Plug-ins. Check 'em out @ https://addons.mozilla.org/en-US/firefox/addon/youtube-mp3-podcaster/
    13. Re:Sure, why not by jcr · · Score: 2

      Before the Java/.net generation, there was the VB generation, and if you keep going back you can find more. Good programmers are still being trained, just as there always were. The difference now is just that there are a lot more of the low-skills chaff to sift through.

      -jcr

      --
      The only title of honor that a tyrant can grant is "Enemy of the State."
    14. Re:Sure, why not by DoofusOfDeath · · Score: 1

      It's sad but true. My wife works in the CS department at a major University, and I'm appalled at what they are churning out with regards to graduates. I know I'll probably get modded down and see the inevitable jokes about 'get off my lawn' and such, but it's really true. The vast majority of new programmers are more or less clueless aside from pushing out cookie cutter bloated code.

      I think the real question is whether or not there's a long-term trend here. I wonder how many of us, who now have a great deal more experience, would have said the same thing regarding 1980's college freshmen.

    15. Re:Sure, why not by radish · · Score: 1

      I find the keywords "public" and "private" work very well for that, no need for a separate file :)

      --

      ---- Den ene knappen er powerknapp, den andre er Bender voice knapp "Bite My Shiny Metal Ass"

    16. Re:Sure, why not by beelsebob · · Score: 2

      The problem is that large proportions of the populace of programmers are idiots, and if you show them the private things, they will rely on them.

      One simple file that says "this is the public interface, and it's documentation" is an extremely useful tool.

    17. Re:Sure, why not by savuporo · · Score: 1

      Except that in most cases, headers dont declare just the public API, but bring in a ton of implementation details. Unless you are using PIMPL or bridge design a lot.

      Both come with their own downsides. Or unless you are using .. fast PIMPL without the allocation overhead, but then did C++11 give you out of the box template for implementing fast PIMPL ? Of course not.

      It will give you a pretty dumb version of a 2D rasterization library with outdated narrow usage drawing primitives, which i am going to run on which realtime-critical Cortex-M MCU that will never have a display exactly ?

      Going in the right direction, sure.

      Maybe a better idea is to pull up Joint Strike Fighter coding guidelines and think hard and long about how to make the language more make a bit more sense, so that 142 page document could be around 20 instead.

      --
      http://validator.w3.org/check?uri=http%3A%2F%2Fwww.slashdot.org Errors found while checking this document as HTML5!
    18. Re:Sure, why not by savuporo · · Score: 1

      Oh, also finally coming up with an ABI standard for the thing would be a big help, thank you !

      --
      http://validator.w3.org/check?uri=http%3A%2F%2Fwww.slashdot.org Errors found while checking this document as HTML5!
    19. Re:Sure, why not by cultiv8 · · Score: 1

      I'm fine with this. At least I can review their code and learn why they pursued a CS degree. My perspective is a programmer is inherently a programmer; they value logic, have a desire to learn, and want to know why something works the way it works. CS teaches you the concepts and fundamentals, it should not teach you a language or two. Case-in-point: I recently hired a college intern to work on a large-ish scale website project (PHP/JS based). My boss was floored that I would not hire someone who did not know how to setup a local dev environment, her thought was that "this comes after graduation." My response: Someone who wants a career in programming should already be programming before they graduate.

      --
      sysadmins and parents of newborns get the same amount of sleep.
    20. Re:Sure, why not by beelsebob · · Score: 1

      In C++, certainly, headers tend to contain way more than it would be nice for them to. That's one of the reasons I don't like C++ much.

    21. Re:Sure, why not by ShanghaiBill · · Score: 3, Interesting

      I wonder how many of us, who now have a great deal more experience, would have said the same thing regarding 1980's college freshmen.

      I would. I graduated in the 1970's and was a manager in the 1980's. The majority of the CS graduates that I interviewed back then were worthless. I see less incompetence when interviewing new grads today, but that is probably because I have become better at pre-screening resumes.

    22. Re:Sure, why not by shutdown+-p+now · · Score: 2

      Why can't they just eliminate header files first?
      Why is C/C++ practically the only language that requires headers?

      Because templates.

      But they're working on it - it's called the "modules" proposal. It has been floating around since C++0x days. It won't get into C++14, but it probably will in C++17 - and, given how things are going in C++ standardization land, it'll likely be implemented in gcc and maybe even VC before the final standard is published.

    23. Re:Sure, why not by Octorian · · Score: 1

      Except the VB generation was always a separate group from your more traditionally educated software engineers. Java, on the other hand, has wholesale infected CompSci education.

      (While I will admit that I've done a fair amount of Java and .NET development in the real world, I'm also forever grateful that I went to college *before* it took over there.)

    24. Re:Sure, why not by Anonymous Coward · · Score: 1

      Agreed completely. Seems like the folks bitching about this are probably not actually developers as developers exist in most shops. Most of the folks I've run into in enterprise software land need domain knowledge to solve business needs. They don't need to be able to write an OS or device driver, they need to bang out an implementation of some business processes and keep them up to date. High level tools and soft skills are exactly what is needed here.

    25. Re:Sure, why not by rsilvergun · · Score: 4, Interesting

      Actually you turn away 95% of ppl who send in resumes because 30 years of attacks on the middle class have let you be _way_ too picky with your candidates and to force people to pay to train themselves.

      Self taught programmers aren't superior, they're just more desperate. They'll give you 20 hours of free labor a week to keep up. People are people. Your expectations are either a) unrealistic or b) only possible due to a warped labor market that exists to enrich a lucky few (re: 1%).

      --
      Hi! I make Firefox Plug-ins. Check 'em out @ https://addons.mozilla.org/en-US/firefox/addon/youtube-mp3-podcaster/
    26. Re:Sure, why not by MouseTheLuckyDog · · Score: 1

      I think much has to do with the way computers are taught, with focus more on "Karel the Robot" or Logo type machines-- is step one - step two - step three.
      instead of focusing on von Neumann architectures like Mix ( well not as much ) or the "little man computer". most modern programmers have no idea what's going on inside.

    27. Re:Sure, why not by Greyfox · · Score: 1

      Headers define the interface and are documentation to other programmers. If you don't care who sees your code, you could just put everything in classes and put all your code inside those classes, just like a Java class. It'll slow down your compilation, but if you break down your code into libraries and unit test all your libraries, you shouldn't have to compile the main project all that often. Most of your maintenance churn can go on in the libraries and once you're sure all those are solid you can roll them all up for deployment.

      --

      I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    28. Re:Sure, why not by fjolnir · · Score: 1

      If you're good, you don't need to work 70 hour weeks. Also I don't think it's unreasonable to expect programmers to be good at what they do. Ones who aren't should be doing some other job, not dragging down quality and pay rates.

    29. Re:Sure, why not by Gravis+Zero · · Score: 4, Funny

      C++ stopped being a fully-humanly comprehensible language a long time ago.

      That's a lie! BEEP. BOOP. I'm a fully humanly and I can comprehensible language just fine a long time ago. BEEP. BEEP.

      --
      Anons need not reply. Questions end with a question mark.
    30. Re:Sure, why not by Mr0bvious · · Score: 1

      You don't need to use the aspects you find incomprehensible and those aspects don't negate the value of the bits you can comprehend.

      --
      Never happened. True story.
    31. Re:Sure, why not by Mr0bvious · · Score: 1

      As much as I'm a fan of C/C++, I expect the headers could be generated at compile time for distribution with libraries or for compiling against - I see no reason for the developer to maintain the header file. That way you can still hide your implementation etc and not have the burden of flicking between headers & source etc.

      --
      Never happened. True story.
    32. Re:Sure, why not by Anonymous Coward · · Score: 4, Insightful

      Wrong. I turn away 95% of the people who send in resumes because they don't understand what they're doing. They don't understand the logic behind anything, or what's happening in the background. I personally interview everyone, and I can attest to this fact. Self-taught people typically have drive, intelligence, and interest, and those things combined enable them to be competent.

      Your expectations are either a) unrealistic

      They're unrealistic in the sense that most people don't meet them. That's fine by me, as I don't accept garbage. But the fact is, some people do meet or exceed my expectations, and I'm quite happy even though there aren't many who do.

    33. Re:Sure, why not by ShoulderOfOrion · · Score: 1

      In my opinion, this is one of the things that Modula-2 got right: a Definition Module for the API, and an Implementation Module for the code. PIMPL just ain't the same.

    34. Re:Sure, why not by anatoli · · Score: 2

      C/C++ is undefined behavior. Don't do that, kids!

      --
      Industrial space for lease in Flatlandia.
    35. Re:Sure, why not by AuMatar · · Score: 1

      I'd rather add headers to all other languages. Most of the time, when I look at a class I want the hilights- the functionality it exports, maybe the major variables it uses. Its damn difficult to tell those at a glance in Java, C#, etc- you need to scroll past hundreds or thousands of lines of code. Headers are absolutely perfect for this. Javadoc was pretty much created to work around the lack of headers in Java.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    36. Re:Sure, why not by _Shad0w_ · · Score: 2

      Some of us .NET developers started off as C developers; we're only working in C# now because that's what people want. I'm honestly completely fed up of the entire software development profession now; I just want to change careers. Maybe in a few years I can go back to writing software as something I do for enjoyment again.

      --

      Yeah, I had a sig once; I got bored of it.

    37. Re:Sure, why not by billcarson · · Score: 1

      What is this "other job" you speak off? It's easy enough to say "go away" to those that don't fit your profile. Mind that they are also trying to make a living.

    38. Re:Sure, why not by satuon · · Score: 2

      Say what you will about the language itself but C++ has a very small standard library. Compare it to something like .Net or Java which is huge. This is one if the big complaints about the language is any real program written in it will have to use a ton of 3rd party libraries. Everyone uses different libraries and it this makes it difficult to combine code together.

      That is why I prefer using Qt these ways. It's a great standard library, it's the C++ answer to Java and .NET.

    39. Re:Sure, why not by satuon · · Score: 1

      I've been programming only in C++, and to tell you the truth, I seldom have crashes, and when I do, 99% of the time they're easy to fix. Most bugs I get are not crashes, just bugs in the business logic, and they would still happen in Java.

      I must admit that I'm kind of envious of how you get a nice stack trace when you have a crash in Java (an unhandled exception).

    40. Re:Sure, why not by gbjbaanb · · Score: 1

      there are lots of "other jobs" out there - lawyers, accountants, architects, loads of professional professions. If you can't hack computing, then maybe these other types of job are also not for you and you should try something requiring less knowledge-based and more of a craft or manual job instead.

      I know programming is becoming more and more like a manual skilled job, where anyone with minimum training can perform the basic tasks required, but I feel we would be better served if it were more formalised as a profession, like accountancy for example. Its just as boring and maths based, and requires you to keep up to date with the latest rules that everyone uses.

    41. Re:Sure, why not by gbjbaanb · · Score: 1

      What I found very strange, as a C++ dev going to a C# shop, was that the practice of having a separate file to define the interface remains, even in a language like C# that generates the header metadata definition behind the scenes (yes, its still there, the compiler just hides it from you)

      The best practice method we followed (and I believe it is a best practice too) in C# was to have everything we used in a class defined in an interface. This interface was written out in a separate .cs file. So really, there's no pragmatic difference between what I did as a C# dev and a C++ dev (in this regard).

      You see a lot of interfaces used in C# by the unit testing boys because the test tools require them to be there if you want to mock them.

      I don't mind writing it out twice, partly because I don't mind doing things right, and partly because I like to see the 'summary' of my code without resorting to nasty, nasty bodges like #region directives..

      So, get rid of header files... hahahahaha.

    42. Re:Sure, why not by billcarson · · Score: 1

      The jobs you mention all require a degree and investment.
      Unfortunately for many, you can't know that you're not skilful at computer programming before you start at it.

    43. Re:Sure, why not by KingOfBLASH · · Score: 1

      A computer science course does not cover how to be a developer it covers the science of computing. Learning to be a developer is an on-the-job thing and takes some years.

      You should more be asking what the CS graduates who decide to become developers are like in 5 years.

      Or did you think Calc III and Diff Eq just weren't enough maths?

    44. Re:Sure, why not by Anonymous Coward · · Score: 1

      What's the problem ? I'm pretty sure future microprocessors will execute Javascript natively. And don't forget that Y generation thinks Javascript is the lowest level, just on top of the physical device layer.

    45. Re:Sure, why not by ericloewe · · Score: 1

      Sounds like a reasonably easy parse job. I'd be surprised if nobody had ever written and published such a thing.

      Maybe your favorite IDE even has that feature buried somewhere.

    46. Re:Sure, why not by neokushan · · Score: 1

      Thank fuck someone on slashdot has some sense!

      How dare we evolve computers to make things easier for everyone. How dare we rip off as much boilerplate code as possible and create utilities that help with tedious or repetitive tasks! I mean what the hell were we thinking, Computers weren't meant to make our lives easier, were they?!

      --
      +1 IDisagreeSoHeMustBeATrollOrAnAstroturferOrAShill
    47. Re:Sure, why not by Mr0bvious · · Score: 1

      I expect the real issue is modifying the common build tools to work nicely with this setup - make, gcc, etc...

      Would be nice feature though!

      --
      Never happened. True story.
    48. Re: Sure, why not by taylorius · · Score: 1

      As you say, headers are useful when using libraries. But why not have the compiler generate the headers itself, or perhaps the library creation utility? IMHO if something is a deterministic one to one copy of something else, then there's no reason to force a human to copy it out by hand.

    49. Re:Sure, why not by gtall · · Score: 1

      Hell, that was true 12 years ago. Being at a major U.S. uni at the time, I was exposed to their "honors" group. They had no ability to size up a problem much less know to solve it. And that was using Java. I don't think the problem was with Java, it was rather the concentration on a functional language as somehow giving them "computer science principles". That might be true but all those principles were lost on them because they had no context. And I'm fairly sure they had no understanding of what went on behind the language or frameworks.

    50. Re:Sure, why not by gnasher719 · · Score: 1

      If you're good, you don't need to work 70 hour weeks.

      Whether you are good or not, if you work 70 hours a week you are (1) a first rate idiot for allowing yourself to be exploited unless you are paid by the hour, you are (2) not good anymore because you are too tired to be any use, and (3) whatever manager or boss talks you into or allows you to work 70 hours a week is a moron because of (2).

    51. Re:Sure, why not by gnasher719 · · Score: 1

      Why can't they just eliminate header files first?
      Why is C/C++ practically the only language that requires headers?
      Why do I need to type each function declaration twice. It is so cumbersome!

      There is interface, and there is implementation. I want the interface of everything, but only the implementation of the one thing I'm working on.

      Java is horrible because it mixes interface and implementation, making it impossible to look just at the interface.

      C is fine, and C++ is fine if you don't allow yourself to be carried away, becaue you can separate interface and implementation. C++ can contain a mix of interface and implementation, especially when written by Java educated people.

      The problem is of course programming languages that require separate files for interface and implementation, and IDEs that cannot separate the interface out for the developer to read, when he or she isn't interested in the implementation.

    52. Re:Sure, why not by gnasher719 · · Score: 1

      C/C++ is undefined behavior. Don't do that, kids!

      Not in Java. In Java, it is defined to yield 1 and increase C by 1.

    53. Re:Sure, why not by angel'o'sphere · · Score: 1

      Other languages use interfaces for that or declare the public part ...erm, well public.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    54. Re:Sure, why not by angel'o'sphere · · Score: 1

      Yeah, if you already realized that, why do you demand "header files", as in C++ a header file also shows the private part.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    55. Re:Sure, why not by angel'o'sphere · · Score: 1

      Java is horrible because it mixes interface and implementation, making it impossible to look just at the interface.
      No one prevents you to use interface MyInterface { } to define the interface of a class in Java/C# etc.
      Your claim is bollocks.

      and IDEs that cannot separate the interface out for the developer to read IDEs usually have a so called "outline" for that, here you simply sort by public/private and you clearly see the "interface" and the "implementation" part.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    56. Re:Sure, why not by rsilvergun · · Score: 1, Interesting

      My point is that in the past you would have offered them training.

      True though, I'm making some assumptions though about your political views because you're so harsh on people. I'm assuming your politically and economically conservative, and would be opposed to high taxes on the wealthy to train and educate people and support them while they receive that training and education. I'm also assuming you've bought into the 'Job Creator' narrative that says employers are responsible for creating livelihoods for employees and that this excuses the obscene wealth they've been granted. Sorta like how the kings treated serfs back in the day, only worse.

      If my assumptions are wrong and you're in favor of the sorts of socialistic that correct for training then you're free to go on rejecting 95% of the candidates w/o a shred of guilt ( or more appropriately culpability).

      OTOH, if you're thinking of yourself as a noble lord protecting your serfs then I wish you'd just drop that fantasy and admit all you're really after is winner take all with yourselves as the winners.

      --
      Hi! I make Firefox Plug-ins. Check 'em out @ https://addons.mozilla.org/en-US/firefox/addon/youtube-mp3-podcaster/
    57. Re:Sure, why not by angel'o'sphere · · Score: 1

      Unless C is zero ofc ... then it throws an exception ;D

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    58. Re:Sure, why not by toddestan · · Score: 1

      Is that because "computer science" back in the 80's was actually Computer Science, and "computer science" now is more like "programmer training"?

    59. Re:Sure, why not by angel'o'sphere · · Score: 1

      In most of europe it is plain illegal. The boss is standing with one foot in jail already. If the employee (or contractor advised under said boss) has an accident on its way from or to work, the boss is with both feet in jail.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    60. Re:Sure, why not by BlackHawk-666 · · Score: 1

      inline is a compiler directive that will cause the compiler to emit a copy of that routine every time it is called. This saves on function calls, makes for faster code (generally) but increases bloat.

      I think what you meant to say was you can just write your code such that the definition and declaration both appear in the header i.e. the definition immediately follows it's declaration.

      --
      All those moments will be lost in time, like tears in rain.
    61. Re:Sure, why not by BlackHawk-666 · · Score: 1

      Funny you mention that. I used to work with a guy who used to be employed writing parts of the HUD for the JSF. He was the second worst programmer I've ever had to work with in a 32 year career. The first prize goes to an accountant who thought that being able to automate Access databases qualified him to write code for the bank we both worked in.

      --
      All those moments will be lost in time, like tears in rain.
    62. Re:Sure, why not by RobertJ1729 · · Score: 1

      Soooo....all you do is GUis.

      Do you even know what Qt is? It's way more than just a widget toolkit.

    63. Re:Sure, why not by tibit · · Score: 1

      Agreed, especially that .net micro framework is open source - you can actually look at how mostly MS-folk implemented it for targeting systems that would have been considered desktop PCs in 1990 or so.

      --
      A successful API design takes a mixture of software design and pedagogy.
    64. Re:Sure, why not by tibit · · Score: 1

      Borland Pascal has had it solved long time ago. Unit files were binaries that had both object code and metadata for the compiler. The compiler would literally load the binary structures from the unit file as-is, do some light-weight merging of them into the global symbol table, and that was it. Fast and easy.

      --
      A successful API design takes a mixture of software design and pedagogy.
    65. Re:Sure, why not by tibit · · Score: 1

      Because templates.

      Nope. Templates are just another bunch of metadata that the compiler needs to instantiate them. There's no reason to extract that data over and over from text files. Borland-Pascal-style binary unit files that encapsulate object code (P-code for today's LTCG) and compiler metadata are exactly what one needs to solve it cleanly. There's no reason to think that a script couldn't extract the documented, human-readable interface description from such a file. It has been done (sans documentation) for BP unit files (did it once for TP 6 myself), so I just don't see what's so special about C++. Well, nothing is.

      --
      A successful API design takes a mixture of software design and pedagogy.
    66. Re:Sure, why not by rhodes777 · · Score: 1

      They're already working on modules (see 'SG2'):

      http://isocpp.org/files/img/wg21-structure.png

    67. Re:Sure, why not by david_thornley · · Score: 1

      "inline" is a compiler directive that any decent modern compiler will ignore, and make its own decisions. It does allow the program to have multiple definitions of an inline function, provided they're all they're all the same, and having the definition inside a translation unit (.cpp file including headers, basically) makes it easier for the compiler to inline.

      Inlining a function is not nearly as useful as being able to inline or call regularly on individual invocations. The programmer is unlikely to know whether an individual invocation should be inlined, as that depends on things like the instruction cache, and the programmer is unlikely to know what part of the code will fit in an instruction cache line. Cache misses kill performance, and the compiler is going to be much better at making the call in almost all cases.

      It is possible to put everything in one big translation unit, but that's usually the wrong thing to do.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    68. Re: Sure, why not by david_thornley · · Score: 1

      That doesn't work with the existing C++ syntax, as there are things that are in function declarations but not stand-alone function definitions, such as "virtual" and default parameter values. There's a lot of historical baggage in C++, mostly but not exclusively taken from C. I assume any competently redesigned C++ replacement (such as D) would not need header files.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    69. Re:Sure, why not by david_thornley · · Score: 1

      Borland Pascal was one non-standard implementation of a language, and ran on a limited number of platforms. C++ is a standard, with many implementations on many platforms. One is easier to change than the other.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    70. Re:Sure, why not by tibit · · Score: 1

      Unit files for C++ would be an implementation detail, they'd require zero changes to the language standard.

      --
      A successful API design takes a mixture of software design and pedagogy.
    71. Re:Sure, why not by david_thornley · · Score: 1

      In Java, every data object is either a basic type (like int), or it's a pointer. It is never necessary for the compiler to know the size of a given class when not doing things specifically related to that class. In C++, objects can be existing in memory (like Java's basic types) or separately on the heap (like Java's classes). This means it's often necessary to know how large an instantiation of a class will be, which leads to the private members being viewable.

      This is pretty much necessary given the design goals of C++ design, but it does have its downsides (there are some moderately unfortunate results in name lookup, for example).

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    72. Re:Sure, why not by HiThere · · Score: 1

      Sorry, but if you don't understand a simple assembler, say Z-80 or simpler, even MIX will do, you don't really understand programming. You should almost NEVER use this, you understand, but it's a basic underpinning necessary to understand code. You should also understand C, even if you never use it. (I hate it, personally. I consider it too dangerous for production work because of the way it encourages unrestricted use of pointers.) You *do* need to understand it, to understand how assembler morphs into useful languages. (I don't *think* you need to go any lower than assembler, but it wouldn't hurt to do a couple of actual hex code programs for a simple machine [which can be virtual as well as not].)

      If all you learn is Java, C#, Python, Ruby, Javascript, and the rest of that ilk, then you don't really understand programming. For most applications, that's the level of language you should USE, but you can't use them to ground your understanding of what you are doing.

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    73. Re:Sure, why not by HiThere · · Score: 1

      You could give D a look. ( http://dlang.org/index.html ). To me it seems like one of the best languages that compile "to the metal". It's problem is the perennial one of new languages: Not enough libraries. Of course, you can link against any library with a C calling convention (and I think those with a C++ calling convention), but there are problems with data structure translation. Even strings require special handling. And it doesn't recognize C/C++ macros, so all the header files need to be translated...which is a bit of a difficult problem, and currently each case needs to be handled manually. Etc.

      It's enough of a problem that I'm not doing my current project in D. But I still wish I could.

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    74. Re:Sure, why not by HiThere · · Score: 1

      More to the point, why don't they implement decent Unicode handling. That's much more suitable to a compiler standard than graphics. (Actually, the reason is probably because MS and Java settled on a totally rediculous implementation of Unicode [it was more reasonable at the time], and you'd need to get one of them to change to a sane standard. Either utf8, utf32, or optionally either would work, though. There are arguments in favor of each, but utf16 is indefensible.

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    75. Re:Sure, why not by joseph90 · · Score: 1

      I once went to a talk where a guy from MSoft basically said that they only hire the top 5% of graduates and complained that very few graduates were in the top 5% (about 1 in 20 I believe ;-).

      This is the same complaint here!

      J.

    76. Re:Sure, why not by shutdown+-p+now · · Score: 1

      The problem is that template metadata that's actually needed to instantiate them is awfully close to a serialized AST, or perhaps even a sequence of tokens - because a great many things inside the template are extremely dependent on what the parameters are. Not just semantically, but syntactically - it's possible to write code in template that can be either an expression or a variable declaration depending on template parameters - and different instantiations would have different meaning for it. Consider this code:

      template<bool> struct a;
       
      template<> struct a<true> {
          enum { b };
      };
       
      template<> struct a<false> {
          template<int> struct b {};
      };
       
      enum { c, d };
       
      template<bool X> struct e {
          e() {
              a<X>::b<c>d;
          }
      };
       
      int main() {
          e<true>();
          e<false>();
      }

      The line of code inside e::e() is what I'm talking about. Depending on X, it will parse either as expression: (a<X>::b < c) > d; or as a variable declaration: a<X>::b<c> d.

      Is it still possible to serialize it somehow? Yes, sure. That's what "export template" feature was all about. It was, in fact, mandated by C++98, but in over a decade of the standard being in force, only one compiler (EDG) has actually implemented them - and then it took them several years. Based on their experience, this has been removed from the spec in C++11.

      Anyway, you're complaining about the wrong thing. There's nothing wrong about storing metadata etc in a text file, and raw code is exactly such a metadata. The problem with C++ headers is their inclusion model, which is purely textual - hence the need for header guards, separation into header and implementation file, and other associated silliness. The modules proposal for C++1y is going to deal with that, letting you write C++ modules in a way very similar to how BP and Delphi units were written.

    77. Re:Sure, why not by HiThere · · Score: 1

      Yeah, but C++ has made a series of bad choices. Now it's to the point where I would prefer to use Ada. Actually, neither is my preference, but C++ is a nightmare. It's ok as long as it's just my own code, but there are so many dangerouly "neat" ways to do things, that it's an abomination.

      Hell, even C, with free use of the macro processor, can easily turn into something incomprehensible. And they guy who did that can justify each choice. C++ takes that up an octave. Even the guy who did it is often unable to explain what it was intended to do, even if the code is successfully doing it.

      I will grant that custom subsets of C/C++ can be good, and even optimal, for a given problem or SMALL group of users. But that's not what you commonly see. So, depending on the problem, I tend to prefer Python, Ada, or D...and very occasionally Java. C I mainly use for linking libraries and routines in different languages.

      P.S.: I wonder if Vala will ever become usable. It's a language design with great promise. But the last time I checked they hadn't even documented many of the most basic features. Perhaps they presume that "well, since it's almost like C, we don't really need to document it", but to me it just looks incomplete.

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    78. Re:Sure, why not by turgid · · Score: 1

      Once upon a time there was a language called Modula-2 which I think you will find interesting. For a time, it competed with C for the mainstream. I learned a bit of Modula-2 (1989-1990) after having done a little bit of C and it made me a much better C programmer. It also made it trivial to pick up Turbo Pascal a couple of years after that.

    79. Re:Sure, why not by spitzak · · Score: 1

      What exactly is missing in C++11?

      UTF-8 string constants (with \xNN producing raw bytes whether or not they are valid UTF-8).

      These are not there due to Microsoft's insistence on translating the input to UTF-16 before the parser runs and they wanted to preserve the ability to make string constants in CP1252 or other 8-bit sets. Otherwise it would be trivial because it would involve copying the bytes unchanged from the source code to the string constant.

    80. Re:Sure, why not by angel'o'sphere · · Score: 1

      In C++, objects can be existing in memory (like Java's basic types) or separately on the heap (like Java's classes)
      I believe you don't really understand about what you write.
      "Static allocated" memory, stack for parameter passing and heap memory for dynamic allocated data is very common amoung *all programming languages*.

      This means it's often necessary to know how large an instantiation of a class will be, which leads to the private members being viewable.
      Private members have nothing to do with the size of objects.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    81. Re:Sure, why not by ynp7 · · Score: 1

      I think the difference now is that instead of most people being somewhat incompetent C/C++/etc. programmers, they're less than competent Java/.Net/JavaScript programmers. The level of competency may not have changed, but the bar for competency has lowered so overall quality has fallen a lot.

    82. Re:Sure, why not by Ambiguous+Puzuma · · Score: 1

      I'm not the grandparent poster, and my political and economic views are well to the left (within the US spectrum). But I, too, found that many candidates were astonishingly bad in a way that no amount of training would likely have corrected for.

      At my previous job, our test/icebreaker was simple: we sat the candidate down at a computer with a C++ file to read and digest for up to half an hour, left the room and then returned with this question: "So, what does this code do?" There were no tricks--the file was about 300 lines long, was designed to be readable (with meaningful variable names and occasional comments), and used only the most basic of C++ features. It did nothing more sophisticated than applying some logical tests to an input object in order to select a return value.

      You know what I did that impressed the team when I was asked "So, what does this code do" on my interview? I gave a one-sentence summary before diving into details. I was skeptical when my boss told me this shortly after starting the new job. But we interviewed a dozen or so additional candidates over the following year, and half of them were only capable of giving line-by-line explanations ("Well, at the top of this function first we check if this parameter is less than 60, if so we stop and return this value, otherwise...") even after we stopped them and specifically asked for a brief high level summary. They all interpreted the individual lines of code correctly, but only half could express what the code did as a whole.

      We hired three people from this group (so about 1/4 of the people we interviewed). And we did provide plenty of training, or more accurately, we each taught each other based on our individual strengths. I had more SQL experience than the rest of the team, for example, so I took on the more difficult SQL-related tasks myself while others completed simpler tasks with my advice and guidance. Similarly, another member had more experience with pthreads than I did, so he helped me whenever I had issues related to multithreading. The end result was a team where everyone had specialties but could complete basic tasks in any relevant area.

    83. Re:Sure, why not by CptPicard · · Score: 1

      Not even assembly is no longer a real representation of "what is really going on". While I have a pretty good sense in general what goes on in the emulation of a x86 processor that runs there in the hardware, I've never really thought of it as contributing that much to the way I approach programming in higher-level languages. Exposure to things like Lisp have been much more instructive in that regard.

      --
      I want to play Free Market with a drowning Libertarian.
    84. Re:Sure, why not by exomondo · · Score: 1

      inline is a compiler directive that will cause the compiler to emit a copy of that routine every time it is called. This saves on function calls, makes for faster code (generally) but increases bloat.

      What exactly is "bloat"? I think what you are trying to say is that it increases size.

    85. Re:Sure, why not by exomondo · · Score: 1

      It is never necessary for the compiler to know the size of a given class when not doing things specifically related to that class. In C++, objects can be existing in memory (like Java's basic types) or separately on the heap (like Java's classes). This means it's often necessary to know how large an instantiation of a class will be, which leads to the private members being viewable.

      It's necessary in both C++ and Java, the point of difference is if you were to create a stack allocated instance of a class in C++ but not use it, why would you be doing that?

    86. Re:Sure, why not by jonwil · · Score: 1

      I grew up back when Pascal was still used as teaching language (in fact, it was the first language I learned how to program in) and am a great C/C++ programmer.

      Problem is, no-one around here will give me a job because they all want C#/.NET/J2EE/Oracle/SQL Server/etc code monkeys (generally with "at least 3 years commercial experience in xyz" or whatever meaning I cant just go and get some sort of certification or qualification in the technology and get a job that way)

    87. Re:Sure, why not by jonwil · · Score: 1

      I think sockets and web/internet protocols (HTTP, HTTPS, FTP, SMTP, POP, IMAP and other standardized protocols) as well as various other standard and widely used algorithms like zlib/deflate would be more useful in C++ than 2D drawing primitives.

    88. Re:Sure, why not by beelsebob · · Score: 1

      Right, which means that all the moron programmers in the world get to see your underpants pulled down and start to rely on what's behind them.

    89. Re:Sure, why not by Xest · · Score: 1

      "Self taught programmers aren't superior, they're just more desperate."

      That's nonsense, self-teaching requires interest in a subject, especially something that takes a prolonged period and a lot of concentration to learn like programming.

      Self-taught programmers are superior because they have a genuine passion for the subject, something that simply goes hand in hand with being able to self-teach yourself such a relatively complex topic.

      If they were doing it out of desperation rather than because of a genuine interest in the topic then they wouldn't have the pre-requisite interest to be able to get through what is rather monotonous if you don't genuinely enjoy it.

      There are two classes of programmers, those who do it because they stumbled across the topic one way or another and have a genuine passion for it, and those who did it because they never figured out a career and it sounded like something that paid well according to all the dotcom era hype and subsequent "13 year old millionaire programmer (whose daddy is an investment banker but we don't tell you that bit)" nonsense since. That latter group is the group that sucks - they don't really care, they're not really interested, they just want a decent wage. The former group is where all the great programmers come from.

      All this said I don't entirely disagree with the original premise of your argument, that it's silly to assume everyone should be a rockstar programmer. I agree because the fact is sometimes you need the crap developers because there aren't even close to enough developers in general, let alone great ones. If the choice is between having a crap developer do something or not have it done at all, more often than not it's better to have a half-arsed solution to a problem from a crap developer than no solution at all. There are varying levels of talent in every industry and you can't ever expect everyone to be top tier, sometimes all a company can afford are those further down the rung, and sometimes that's good enough, and good enough for the further down the rung developers too, because they're happy being at that level through their entire career, and because the company is happy for them to be at that level relative to what they're paying.

      FWIW I am a self-taught developer. It was never because I was desperate, but simply because I loved it and was what I always just wanted to do. If I was desperate for a job, then given my maths degree, I'd have gone down the route of one of the millions of accountancy apprenticeships that are available and become an accountant who make decent money too, I certainly never chose programming out of any kind of desperation.

    90. Re:Sure, why not by Xest · · Score: 1

      No you can't testify to this, all you can testify to is the fact you've never bothered to learn what's going on, that's not the same as preventing you. The CLR and CIL is extremely well documented, it's fairly easy to understand what's going on under the hood if you can actually be bothered.

      Hell, depending on what you're doing you HAVE to know what's going on under the hood as well as any C++ programmer does. There are times where unmanaged code is unavoidable and at that point you have to understand as much as any C++ programmer does.

      You're conflating you're lack of a care for what's going on underneath or lack of will to touch anything outside your comfort zone with the language preventing that, it doesn't. If you're expecting the language to force you to know these things then C++ is no different, amusingly I've encountered C++ developers who never really understood pointers and memory management, in fact, that's why software used to be even more buggy and there used to be even more fatal crashes than there are today. The only difference between the likes of C++ and .NET/Java is that the latter actively prevent people like you who have no interest or care to learn the in depth details from causing as much damage as you used to but if you want to know more, or want to do more then you can. Unmanaged code in .NET and the JNI provide the scope for doing exactly that and there's nothing to prevent you learning the details of the managed runtimes and their bytecode either.

      If you really want to know what's going on with something in software it's not a closed box, even as an absolute last resort if there is no documentation available then there's always a debugger and assembly available at the end of the day whatever the technology that's involved.

    91. Re:Sure, why not by Xest · · Score: 1

      "My point is that in the past you would have offered them training."

      There's no point offering training to people who aren't interested in learning, and those who are interested in learning are happy to learn themselves, because they enjoy it.

      Learning isn't something you can buy, or force on people. It's something people do because they want to and there's no point throwing money down the drain on training if it's simply just being used as an excuse for incompetence because they still wont learn. I've seen this excuse used time and time again, and employers relent, call their bluff, and give them the training to shut them up and they come back from the training just as clueless because they didn't really want training so paid no attention whilst they were there, they just wanted an excuse for not doing something - "I haven't been trained in it".

    92. Re:Sure, why not by Rysc · · Score: 1

      What happens in assembler, and to a great extent in C, is what the computer is really doing (more or less, it's pretty close). In higher level languages this connection is very fuzzy. Not knowing what will really happen when you write that for loop is more likely to lead to you writing pathological and otherwise buggy code. It's not *essential* that you know how computers really work, but it's a *really damn good idea* and more or less essential for any really good programmer. The only people who disagree are the ones that never did learn a low-level language (IOW where you work with memory/registers/pointers/that sort of thing).

      --
      I want my Cowboyneal
    93. Re:Sure, why not by angel'o'sphere · · Score: 1

      You can't rely on something that is private, as you have no access to it.
      I for my part ignore the private stuff in a class completely and never had a reason "as pure client" to care about something private.
      If you search a bug, and you assume it is in the code you use, then ofc it makes sense to debug through them.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    94. Re:Sure, why not by contracrostipunctus · · Score: 1

      This is probably the most irritating and self-defeating tentacle of the culture of programming. "Everyone on the road is such a terrible driver, but me, I know what I'm doing!" I've only been graduated for a year, and before I got hired at a fortune 500, I went through all the books (Cracking the Coding Interview, etc), I looked up advice for grads, I polished my projects, and I lived in fear that "everyone is terrible! everyone doesn't know what they're doing!" The drumbeat of your lazy self-aggrandizing isn't helping anyone be better at what they do, or get all those "rockstar programmers" to work for you. But then, whining about the next generation really isn't about fixing or improving anything at all, is it?

    95. Re:Sure, why not by contracrostipunctus · · Score: 1

      Listen, if all you know is Z-80 Assembly and not binary programming for the ENIAC, you really don't know programming. You must be one of the crap programmers that need all the hand-holding of these modern toy languages.

    96. Re:Sure, why not by david_thornley · · Score: 1

      If you think private members have nothing to do with the size of objects, you don't understand what you write.

      Static allocated memory is used in all programming languages I know, but not necessarily for variable-length objects.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    97. Re:Sure, why not by david_thornley · · Score: 1

      Huh? The point of difference is that variable-length objects are represented by their pointers in Java, and not necessarily in C++. In specific, if class A has class B as a member, the size of class A doesn't depend on the size of class B in Java (since it's a pointer anyway), but it does in C++.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    98. Re:Sure, why not by david_thornley · · Score: 1

      Really? How do you do away with header files when not all the necessary information is in the .cpp files?

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    99. Re:Sure, why not by H0p313ss · · Score: 1

      Self-taught programmers are superior

      First reaction: Bullshit.

      But I'll try not to generalize too much, and I do agree with many of your points. I will accept that many self-taught programmers are superior to the mindless drones schools are now turning out (including some I graduated with). However I suspect that if you compare the best of each you will find there's lots of things that schools do teach that you might have missed out on. (And probably vice versa...)

      As you point out, the superior developers are superior because they are:

      1) Smart
      2) Motivated

      If you take a smart and motivated person and then put them through a halfway decent school system you get something even better than the smart and motivated self-taught types.

      Therefore, my counter statement would be:

      Smart and motivated self-taught developers may be superior to unmotivated cookie cutter drones.

      --
      XML is a known as a key material required to create SMD: Software of Mass Destruction
    100. Re:Sure, why not by H0p313ss · · Score: 1

      Of what use is an UTF-8 string constant with invalid UTF-8 in it?

      They're really awesome for generating bugs, it's called coding for job security.

      Yes... I'm kidding. (Or am I.... )

      --
      XML is a known as a key material required to create SMD: Software of Mass Destruction
    101. Re:Sure, why not by H0p313ss · · Score: 1

      "There's an old saying in Tennessee - I know it's in Texas, probably in Tennessee - that says, fool me once, shame on - shame on you. Fool me - you can't get fooled again."

      --
      XML is a known as a key material required to create SMD: Software of Mass Destruction
    102. Re:Sure, why not by spitzak · · Score: 1

      To stop discouraging use of Unicode. Currently if there is text on a disk that for some reason has a string of bytes that is not UTF-8, even if it is *mostly* UTF-8 and contains even the tiniest error, the programmer is often forced to abandon use of UTF-8 due to the perverse insistence of people (perhaps you) that somehow a subset of byte strings somehow violates god's principles and must be made impossible at all costs.

      This is probably the biggest impediment to I18N, and the weird thing is that the people behind it actually think they are helping.

    103. Re:Sure, why not by angel'o'sphere · · Score: 1

      What has "the size" of objects to do with the question if you use a header in C or an interface in Java/C# or simply use proper public/private scoping?
      And why do you care about the size of an object? If you are "reusing" it? You can't change anything about it. So you somehow argument pretty strange ...

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    104. Re:Sure, why not by enharmonix · · Score: 1

      The JAVA/.NET generation is a fucking disaster.

      I've never liked C++ better than C. I liked the object oriented design, but it was even more dangerous than C. When C# came out, I said, "Now this is what C++ should have been." I think .NET would be in better shape had all the C++ programmers moved to C#. Unfortunately, employers are still of the opinion that somebody who learned C# in college last year is going to be a better .NET developer than somebody who's been programming C++ for 15 years. Clueless. Actually, when I considered moving to C#, I remember seeing a job posting in 2001 that demanded 7 years .NET experience in lieu of having learned .NET in college. Again, this was not recently, this was in 2001. I can only imagine how that worked out.

    105. Re:Sure, why not by buddhasystem · · Score: 1

      C++ stopped being a humanly comprehensible language when the majority of humans decided that they can't be bothered to learn this capable tool, became lazy and complacent and otherwise started to suck at programming.

    106. Re:Sure, why not by enharmonix · · Score: 1

      .NET does a great deal for you, and I really think the handicap has prevented me from learning what's really going on.

      Rats. I had a really long reply about how C# was superior to C++ and that the stuff behind the scenes was the stuff you don't want to deal with, but then I realized you're whole point is not that you want to do it but that you want to see how it's done (and even just what's happening). So I concede, you are right. .NET is not great if you are trying to understanding how computing and programming work at a low level. Once you learn all the stuff that has to happen at that level, chances are you'll then appreciate that .NET does these things for you.

    107. Re:Sure, why not by tibit · · Score: 1

      Oh, the header files will be there, except that the compiler won't actually read them, it'll read the unit files instead.

      --
      A successful API design takes a mixture of software design and pedagogy.
    108. Re:Sure, why not by lucien86 · · Score: 1

      Don't blame the programmers, blame the **@"! expletives who control language development and the developer environment. MFC being a prime example - 'hypercomplex', tangled, frequently illogical, often very hard to do things outside the box, very ugly and unreadable code, etc.

      --
      Below the speed of light Special Relativity is one of the most accurate theories in physics - above the speed of light..
    109. Re:Sure, why not by tibit · · Score: 1

      The problem is that template metadata that's actually needed to instantiate them is awfully close to a serialized AST

      And why would that be a problem? Because, you know, actually it isn't a problem!

      --
      A successful API design takes a mixture of software design and pedagogy.
    110. Re:Sure, why not by shutdown+-p+now · · Score: 1

      It's not a problem. It does invite the question of why you need binary serialization in the first place, if it's one for one mapping of the source, anyway.

    111. Re:Sure, why not by jejones · · Score: 1

      C++ has made the same choice over and over again: "When you come to a fork in the road, take it."

      "And [Stroustrup] said “no” to no one. He put every feature in that language that ever existed. It wasn’t cleanly designed—it was just the union of everything that came along." --Ken Thompson

    112. Re:Sure, why not by Nethemas+the+Great · · Score: 1

      Javascript became incomprehensible long ago, back when fools tortured the language into an object-oriented, scripting, assembly language complete with multiple personality and ADHD. You can't build a foundation upon semantic loopholes and expect anything good to come of it.

      --
      Two of my imaginary friends reproduced once ... with negative results.
    113. Re:Sure, why not by beelsebob · · Score: 1

      So what you're saying is that as a good programmer, it's frustrating having to ignore a bunch of stuff that's private, and makes the code harder to read, while for a bad programmer, it makes it easy to rely on things that make them bad.

      The point is that a header file neatly separates this out, making it much easier to read "this is the API, this is what you're allowed to use", without any implementation detail being visible (assuming the library author was competent).

    114. Re:Sure, why not by HiThere · · Score: 1

      There are a large number of misfeatures. Compare the C11 std implementation with Vala, Python, D, hell, even Java. (I don't like Java's implementation because it uses the utf16 unicode, but the design is good.)

      There's no reason that a string should be modifiable, but if you don't allow that, you need to allow arrays of char that can be easily converted into a string. Some languages pick one choice, some another, both are reasonable. (Unmodifiable strings are desireable because it makes compiling/designing for parallel execution easier and safer. How you achieve it is less important.)

      Perhaps some of my distaste with the C++11 std unicode handling relates to my dislike of C++ templates, but when I tried to use the C++11 unicode, I really hated it, unlike that of any other language that implemented it. I'd actually rather use byte strings and the Unicode std. library, which means it's (from my point of view) a really terrible design. I literally moved over to doing the project in C before deciding that I didn't need efficiency enough to fight that battle. So that part is not being done in Python. (I could have done it in D, but I'd need too many unsupported external libraries.)

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    115. Re:Sure, why not by angel'o'sphere · · Score: 1

      A header file does not separate that at all.

      It seems you never have read a header file from top to bottom.

      And you don't grasp how other languages work, hence you believe your limited experience is the only truth.

      Perhaps you should learn more programming languages? (And as Stroustrupp says: more human languages as well)

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    116. Re:Sure, why not by spitzak · · Score: 1

      I think I agree with you. There should not be any templates.

      I think the proper solution is to standardize on UTF-8, and use *ITERATORS* (not array index) to see the characters. This avoids the huge problem that "character" is not actually defined (ie what do you do with combining characters or invisible ones or with composite characters such as ½). Iterators will also allow errors in the UTF-8 to be returned as unique values, rather than using exceptions (which typically destroy the iterator) or lossy conversion to a character that could be valid encoded. This inability to handle errors is *HUGE* and I am really annoyed by all the people who want to pretend that some physical natural law is going to make them non-existent, this is so misguided that I am absolutely floored that anybody believes it, but most UTF-8 decoders act this way!

      The fact that std::string::operator[] returns a non-const reference is another disgusting mistake, pandering to the idiots who think case-conversion is something users want and that it can be done by simply substituting "characters" (whatever a "character" is...). If operator[] returned a const reference we could use reference counting rather than having to copy std::strings.

      Libraries that don't use iterators and thus require pre-conversion to an array of "characters" are broken. Such conversions are wasteful, must be redone depending on what type of "character" the algorithim needs, and are lossy. I am ignoring all the current C++ attempts at "Unicode handling" because of this. But the language itself still needs UTF-8 string constants with the ability to insert arbitrary bytes, even if a fixed library is provided.

    117. Re:Sure, why not by exomondo · · Score: 1

      Huh? The point of difference is that variable-length objects are represented by their pointers in Java, and not necessarily in C++. In specific, if class A has class B as a member, the size of class A doesn't depend on the size of class B in Java (since it's a pointer anyway), but it does in C++.

      Only if it isn't a pointer, so if you care about that then just use pointers, simple, though if you aren't doing things "specifically related to that class" then I'd question why you have it there as a member at all. But regardless, that's beside the point, how does the compiler needing to know the size of a class lead to showing that class's private members & functions to programmers and them subsequently relying on them?

    118. Re:Sure, why not by Xest · · Score: 1

      I should probably elaborate as both your response and the AC's suggest I probably wont clear enough. I do not think being self-taught necessarily precludes a university education also, because I think the best people who go to university also have passion enough for the topic in question to learn about it both before they take on the subject and whilst they are studying it formally. Everyone has some degree of formal education so I simply view someone as self-taught as someone who has learnt the majority of what they know off their own back and that may for example mean that they learnt everything in CS101 before they even went to university - university didn't teach them that, it simply provided useful confirmation, so I'd still define them as self-taught in that area.

      I also did exactly this because I also studied a comp. sci. degree alongside work after I'd started working professionally as a developer, in large part because I wanted academic confirmation of what I had taught myself. I'm not one of those who believes there is no merit in formal education, I fully appreciate the benefits of it, and I think it augments self-teaching very well, but I do not think it by itself guarantees any superiority over self-teaching, on the contrary.

      I do agree with you, my point was more that I believe someone who has only ever done a degree in software development or computer science and never bothered to study anything outside of that will not be as good as someone who is self-taught whether that self-taught person hasn't, or has also done a degree as well as being heavily self-taught.

      Or in other words, my point is that whether formal education is involved or not, self-teaching is the differentiator, someone who is self-taught is better than someone who is merely formally educated with no self-teaching outside of that, whilst, yes, I agree someone who is heavily self-taught but also did a degree as well will be even better again.

      My opinion is of course only formed by my own personal experience, so perhaps it doesn't work universally, but I believe a lot of this because I was helping my friends who went straight into comp. sci. degrees using purely my self-taught knowledge because I was well ahead of them by the time they were doing their degrees and after they'd graduated. I was also doing better in the field professionally than they were before I did my formal degree, but doing that degree has helped me do even better again, I appreciate the fact that it was a good opportunity to open my eyes to topics I might never have properly bothered with but which have become very useful for me, such as AI, specifically genetic algorithms and and neural nets.

      I should also add however that I believe my other degree in maths has been highly important in helping me grasp topics too that my friends struggled with and to find solutions that my colleagues couldn't, so perhaps my original study of that does distort things a little bit.

      Make of it what you will, but I've always found the best hires to be far and away those who spend a lot of time self-teaching, degree as well or not, so until I find a stellar candidate who has only ever done formal education if such a thing exists then I doubt my opinion will ever change.

      So I hope you'll understand at least that I'm not one of those who never bothered with academia and so claims it's useless because they never even tried it and don't want to admit they could be missing out, I do very much think it has value and despite being on a hiatus right now I do plan to do even more postgraduate study in the years to come, but I do think that value is secondary to being a motivated self-learner. After all, let's be honest, what happens when you've studied to the limits of human knowledge and available formal education on a topic? self-learning goes hand in hand with research into new frontiers and is the only way to further knowledge on a topic in the first place - when you reach that height, there is no formal education to further your abilities anyway, discovery through self-learning is the only way forward.

    119. Re:Sure, why not by david_thornley · · Score: 1

      So what's the point, if we're still going to have the header files? Is there any real difference between unit files and precompiled headers?

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    120. Re:Sure, why not by david_thornley · · Score: 1

      The compiler needs some way to determine the size of class B if it's included in class A. The declaration of class A isn't doing anything related to class B (other than laying out space for it in A), although the implementation presumably does.

      The inclusion of private members in the header file means that the compiler needs only the header file to determine the size of an object. Without that, there would have to be another way, and that would be a major redesign of the language.\

      Do you have a suggestion for finding the size of a class layout without knowing all the members?

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    121. Re:Sure, why not by cant_get_a_good_nick · · Score: 1

      Back when Joel could write, he penned this on what he called the Law of Leaky Abstractions. Related, his rant on Java Schools

      Joel's writing was always flawed, never perfect, but usually made you think some.

    122. Re:Sure, why not by david_thornley · · Score: 1

      The size of an object doesn't really matter in Java or C#, because such objects are always instantiated on the heap, so they're represented in all other use as a pointer. In C++, an object can be instantiated on the stack, in the heap, or as part of another object (whether on stack or in heap), and therefore it is necessary to know the size of an object when doing memory layout. It is necessary to have a memory layout for efficiency, so that A.foo can be translated into an offset from the start of object A.

      If, in Java, class A has a member of class B, the length in A's memory layout is known to be the size of a pointer (8 bytes, IIRC). In C++, the length in memory layout is the size of B (plus trailing alignment padding), so to lay out anything in memory past the B member it is necessary to know the size of B.

      The ability to embed an object directly into another object is a feature that comes pretty much from the design goals of C++, and which makes C++ more usable for some applications (like embedded code with tight restrictions) than Java or C#.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    123. Re:Sure, why not by angel'o'sphere · · Score: 1

      So you need to know the size of a struct in C to use it?

      Wow, I always thought allocation on the stack is done by the compiler, I did not know you need to know the size of the struct.

      And, strange, does size_of(struct_X) not work anymore?

      Sorry mate, no idea what point you like to prove.

      Your argument makes no sense at all.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    124. Re:Sure, why not by exomondo · · Score: 1

      Do you have a suggestion for finding the size of a class layout without knowing all the members?

      Use pointers for object members, just like Java does. Ultimately you still can't use those private members and you don't get any private implementation details from just the header anyway so the programmer isn't going to be relying on them at all.

    125. Re:Sure, why not by david_thornley · · Score: 1

      The compiler needs to know, and if the compiler knows you can find out (that's what sizeof is for).

      Good luck using sizeof on a struct when the definition is not available to that translation unit.

      However, to put this into painstaking detail:

      In compiling a class description, the compiler needs to know how to lay the class out in memory, assigning offsets to each member. This is true for most compiled languages that have something like classes and structs. This means the compiler needs to know how much memory to allocate for each member.

      In C++, a class can directly include an instantiation of another embedded in it. Therefore, to compile the including class, it is necessary for the compiler to know the size of the included class.

      It's also common to put objects on the stack, and again the compiler has to know how big the class is if it is to properly increment or decrement the stack pointer.

      Therefore, it is often necessary, in C++, for the compiler to know how big a class is. This does not apply, of course, when there's a pointer to the class and nothing more, since the compiler knows how large a pointer will be (typically 4 or 8 bytes).

      Now, how is the compiler supposed to know the memory requirements of a class? In C++, it's done by giving the compiler the class definition so it can calculate that. Private members need to be in the class instantiation, and that's why they're needed in the class definition, which is usually in the header file. In addition, functions can affect the size of a class, so the compiler has to have information about them. Frankly, I don't know offhand a better way to provide this information, and if you have an actual intelligent suggestion I'd like to know what it is.

      If we actually go back upthread, we find that you asked about headers that include private members. I'm attempting to answer this well. You have persisted in missing the point, as well as making statements that make me think you don't know C++. I'm trying to show you what you're missing.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    126. Re:Sure, why not by angel'o'sphere · · Score: 1

      So, why do you inform us about this?
      We all know that.
      But a few posts back you claimed "you " need to know the size of structs.
      You claimed: all languages should use headers because that is "better".
      You claimed it is easy to separate "public" parts from "private" parts with headers.
      Now you explained far and long that a class definition needs to be in the header so the compiler knows the size. (You see the contradiction? Do you?)
      So: how again do you want to remove the private parts and still have a header? Sure: you refactor your program to move everything private into a different class. Just so that your "header" is free of it ...
      And private methods are "verboten" as the user of a class might "rely" on them? How should he be able to rely on something he can not call?

      If we actually go back upthread, we find that you asked about headers that include private members. I'm attempting to answer this well. You have persisted in missing the point, as well as making statements that make me think you don't know C++. I'm trying to show you what you're missing.
      Then you misunderstood something, I'm pretty aware about C++ (before C++11x, I wrote roughly 650kLOC between 1989 and 1999).

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    127. Re:Sure, why not by david_thornley · · Score: 1

      I have no idea who claimed headers were better, or that it's easy to separate public from private parts with headers. I do know who claimed that private parts didn't affect class size, and who claimed I didn't understand what I was talking about (gold medal on Stack Overflow for C++).

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    128. Re:Sure, why not by angel'o'sphere · · Score: 1

      Well, then you crossed into a discussion with someone else (I'm bad in remembering names).

      I'm not aware that someone claimed that private "data" members don't effect class sizes, I certainly did not.

      However I guess there was talked about "private" methods ... as many people don't realize that the amount of methods a class has does not effect its "objects size".

      So, if I accused you "you don't know what you talk about" then my apologizes and likely I misunderstood one of your posts or you wrote it pretty unclear, sorry for that.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  2. That's unfortunate by PhrostyMcByte · · Score: 2, Interesting

    Cairo is a great library, I've used it and found it very easy, but it's not remotely approaching a standards-quality design. The closest I've seen would be Anti-Grain Geometry, which makes phenomenal use of templates.

    1. Re:That's unfortunate by Dahamma · · Score: 5, Funny

      Cairo is a great library, I've used it and found it very easy, but it's not remotely approaching a standards-quality design.

      Yeah, to make it C++ standards-quality they'll need to make it much less intuitive, add tons of templates to make it unreadable, and change the method names to something that makes much less sense...

    2. Re:That's unfortunate by edxwelch · · Score: 1

      I can't think of any case where templates would be needed in a graphics library. That's just going to make the code more cryptic and harder to understand.

    3. Re:That's unfortunate by Cyberax · · Score: 2

      Unfortunately, Anti-Grain's author had died recently so it's unlikely Antigrain is going to be developed fast enough to be standardized.

    4. Re:That's unfortunate by mraeormg · · Score: 3, Interesting

      While AGG is one of the most cleanest and high quality 2D rendering APIs, it's improbable that AGG will be accepted by the c++ committee, Herb Sutter works for microsoft, and AGG's author is very critical of many graphical features of windows, like the sub par font rendering. An example of this is the the dialog window for enabling high dpi font scaling.
      http://i1.wp.com/www.istartedsomething.com/wp-content/uploads/2006/12/dpi480_3_l.jpg

    5. Re:That's unfortunate by mraeormg · · Score: 1

      Templates are useful when application developers should be able to make low-level, detailed optimizations, like specifying if pixels should be 8, 16, 24-bit. Or even float/double, with/or without alpha.

    6. Re:That's unfortunate by PhrostyMcByte · · Score: 1

      AGG uses templates to select all number of things, from component type, colorspace, blending, renderers, and various other things. It is not cryptic at all.

    7. Re:That's unfortunate by shutdown+-p+now · · Score: 1

      It's not exactly a secret that C++ iostream library is ridiculously badly designed, even among C++ programmers.

    8. Re:That's unfortunate by Anonymous Coward · · Score: 2, Insightful

      Really?

      glVertex2d
      glVertex2f
      glVertex2i
      glVertex2s
      glVertex3d
      glVertex3f
      glVertex3i
      glVertex3s
      glVertex4d
      glVertex4f
      glVertex4i
      glVertex4s
      glVertex2dv
      glVertex2fv
      glVertex2iv
      glVertex2sv
      glVertex3dv
      glVertex3fv
      glVertex3iv
      glVertex3sv
      glVertex4dv
      glVertex4fv
      glVertex4iv
      glVertex4sv

    9. Re:That's unfortunate by ciroknight · · Score: 1

      That's unfortunate. They looked at AGG as literally the example of what *not* to standardize because of it's horrendous usage of templates.

      --
      "Victory means exit strategy, and it's important for the President to explain to us what the exit strategy is." G.W.Bush
    10. Re:That's unfortunate by ameline · · Score: 2

      Why are all the insightful posts in this thread being modded "funny"?

      C++ is *way* too big a language already. It's got the PL/1 problem (yeah, get off my lawn) -- when everyone only understands 0.8 of your language (or some amount under 1.0) it winds up being a different 0.8 for everyone. And this means that virtually any programmer will write code that is unreadable to another. (and if there is one thing that over 25 years of programming has taught me is that code readability trumps almost everything else).

      Interestingly enough, IBM created PL.8 (an 80% subset of PL/1) for internal use. The original XL compiler back-end for RS6000/PPC was written in PL.8

      / Really -- my lawn -- get off of it!

      --
      Ian Ameline
    11. Re:That's unfortunate by Carewolf · · Score: 2

      You're assuming that the math behind those is the same for all those types. It it is, a template may work. If it isn't, a template will not work.

      No, templates will still work in the later case. How do you think hash-tables are implemented? It is possible to do specialization in templates, for instance specialize all integer and floating point versions.

    12. Re:That's unfortunate by edxwelch · · Score: 1

      You don't need templates for that.

    13. Re:That's unfortunate by tibit · · Score: 1

      You must really not have a feel for how modern C++11 code can look like, and what templates are used for. You're stuck in the C-with-objects mentality.

      --
      A successful API design takes a mixture of software design and pedagogy.
    14. Re:That's unfortunate by tibit · · Score: 2

      You seriously need to look at the eigen project to understand that C++ with its templates can actually generate better numerical machine code than C. Yes, all with different math for different things. You demonstrably don't grok idiomatic C++. A whole lot has happened there in the last 13 years. Yes, admittedly it all reads like functional-style workarounds for stuff that was mostly a solved problem with LISP, but hey, at least it's a mainstream language that produces efficient assembly.

      --
      A successful API design takes a mixture of software design and pedagogy.
    15. Re:That's unfortunate by Tailhook · · Score: 1

      If it isn't, a template will not work.

      I'm afraid you've revealed a degree of ignorance here that discredits whatever opinions you may have about C++. C++ provides template specialization, which permits distinct, parallel implementations based on template parameter type. Foo<double> and Foo<int> need not share implemenations.

      C++ templates have been used very successfully in libraries that involve co-variant types and sophisticated algorithms. See OpenCV for a popular and widely used example. Templates are endemic among the fundamental types of that library and the C++ API has displaced the now deprecated C API because the C++ language itself and our contemporary cadre of C++ compilers are handling these use cases just fine.

      So please stop bad-mouthing things you don't understand.

      --
      Maw! Fire up the karma burner!
    16. Re:That's unfortunate by david_thornley · · Score: 1

      We use iostreams for file serialization. It works pretty well there, since (unlike stdio) it's easy to create the operators for any given data type. I wouldn't want to use it for any sort of human-formatted output, because it sucks for that.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    17. Re:That's unfortunate by AuMatar · · Score: 1

      Sure, they don't have to. But if they don't share implementation, all the benefits of using a template are gone. If you have to specialize in a dozen different ways, your only reason for using templates is mental masturbation. Having to write specific specializations for types is the number 1 sign that your solution shouldn't be using a template.

      --
      I still have more fans than freaks. WTF is wrong with you people?
  3. Re:huh? by carld · · Score: 1

    We have stdio.h why not stddraw.h ?? It's not like stdin/stdout are not system/hardware independant.

  4. Bad link in the summary by Anonymous Coward · · Score: 1

    The second link goes to the wrong article.
    Here is the correct link

    1. Re:Bad link in the summary by Rysc · · Score: 1

      I wish I could mod you up. The quality of slashdot stories (and correction speeds) has become rather abysmal!

      --
      I want my Cowboyneal
  5. meh by Anonymous Coward · · Score: 3, Informative

    i sincerely hope cairo itself remains 1. pure c and 2. as a project, entirely unconstrained by complaince to whatever 'standard' these c++/microsofty goons want. if they want to take a snapshot of cairo's api as a model for some c++ api, fine, whatever, couldn't even stop 'em if we tried. though the effort would be better spent finding more active maintainers for cairomm.

    but cairo underlies current versions of major linux gui toolkits. i can't help but view this as some sort of convoluted gambit on microsoft's part to infest it with bureaucracy and c++ architecture astronautism and eventually seize control of the direction or just kill it.

    1. Re:meh by shutdown+-p+now · · Score: 2

      ISO C++ only standardizes APIs, not implementations.

  6. Wrong link. by Anonymous Coward · · Score: 1

    Link 2 is for a different story.

  7. Re:huh? by JDG1980 · · Score: 4, Informative

    This is redundant. High level concepts like drawing graphics are always going to be system dependent, and today's operating systems come with them already. I don't see why having this as part of the C++ base library benefits..

    Blitting to the screen may be OS-dependent, but rendering to a canvas need not be.

  8. But... why? by zander · · Score: 2

    One of the hallmark problems of design-by-committee is that they extend languages for the sake of doing fun things, not because people need it.

    While everyone needs containers (like vector/hashmap), nobody needs a simple graphics library. There is practically no hardware out there that doesn't have some sort of hardware accelerated graphics and simple operations just make no sense there.

    So, my question really is why they are doing this? I'm betting the answer is not one where they have actual usecases in mind.

    1. Re:But... why? by phantomfive · · Score: 1

      The main reason is because it's portable. Java has one too.

      --
      "First they came for the slanderers and i said nothing."
    2. Re:But... why? by Anonymous Coward · · Score: 5, Insightful

      So, my question really is why they are doing this? I'm betting the answer is not one where they have actual usecases in mind.

      Firstly, I take issue with your premise that Cairo is no more than a toy and useless in actual work.

      Secondly, One very important usecase for a simple drawing library in the standard is to provide an easy route for novices to write cool, interactive and meaningful programs, without needing to write several hundred lines of scaffolding code and be well-versed in 6 different layers of abstraction from OSes to frameworks and graphics API.

      I don't know how other people learned programming, but in my case, the most engaging things I wrote all those years back in BASIC and Pascal (under DOS) were graphical programs in nature (extremely simple games, GUI-like apps that didn't really need the GUI, function plotting and other graphical toys, etc.) I'm guessing that I'm not unique in the fact that having access to simple, straightforward, inefficient, well-documented, built-in 2D graphics API led me to all sorts of cool experiences in programming and (majorly) determined my pursuit for the rest of the two decades since.

      Now, it is obvious that there will always be more novice programmers than experienced ones, so, I don't see the problem with the ISO C++ committee to explore standardizing such a library. Do you, really? Who is this going to hurt?! For most of us, this is pretty much out of our way, since we either write more serious graphical applications and need platform-specific, performance-oriented APIs that offer much more control and features, or we haven't written anything that needed a 2D immediate-mode graphics API in years. So, I ask the Slashdot readership again, what's wrong with standardizing a simple, straightforward 2D drawing API to help the novices and the occasional non-performance-sensitive drawing needs of the community?

    3. Re:But... why? by Gavagai80 · · Score: 4, Insightful

      Qt doesn't get out much beyond Win/Lin/Mac.

      Qt isn't available for enough platforms because it only runs on Windows, Mac, Linux, Android, iOS, Blackberry, Kindle, vXWorks, BSD, Solaris, Haiku, WebOS, OS/2, Tizen and AmigaOS? Anything that passes the "does it run on Amiga?" test is good enough for me.

      --
      This space intentionally left blank
    4. Re:But... why? by mytec · · Score: 4, Interesting

      So, my question really is why they are doing this? I'm betting the answer is not one where they have actual usecases in mind.

      There was a keynote done by Herb Sutter this past September and at roughly the 57 minute mark of his presentation Keynote: Herb Sutter - One C++ he shows a 15 LOC example of numbers being input and then output sorted. He then said, "We need to get past the VT100 era." He continued saying that the standard C++ program cannot even exercise the abilities of the VT100 which has underscore and bold, etc. Pure, portable C++ code cannot even drive a 1970s era VT100.

      If you continue watching you'll see the point Herb is trying to make and that point may help explain why they are looking to do this.

    5. Re:But... why? by DoofusOfDeath · · Score: 1

      Qt doesn't get out much beyond Win/Lin/Mac.

      Qt isn't available for enough platforms because it only runs on Windows, Mac, Linux, Android, iOS, Blackberry, Kindle, vXWorks, BSD, Solaris, Haiku, WebOS, OS/2, Tizen and AmigaOS? Anything that passes the "does it run on Amiga?" test is good enough for me.

      But can it run on Emacs?

    6. Re:But... why? by ProzacPatient · · Score: 2, Informative

      Unless things have changed I never paid Qt any attention because it is dually licensed and therefore not truly free software and its ownership keeps changing between commercial companies.
      Last I checked Qt is "free" for open source projects but requires an expensive commercial license for anything else.

      wxWidgets on the other hand is licensed under much more liberal terms and not owned by a commercial enterprise looking to make a buck or subject developers to strange licensing schemes.

    7. Re:But... why? by TheRealMindChild · · Score: 1

      BASIC and Pascal of the DOS era wrote to the very standardized and well documented VGA buffer. We don't have that luxury anymore.

      --

      "When life gives you lemons, don't make lemonade. Make life take the lemons back!" -- Cave Johnson
    8. Re:But... why? by Anonymous Coward · · Score: 1, Informative

      Wrong. Qt went LGPL years ago, it's properly free for any kind of software.

    9. Re:But... why? by maztuhblastah · · Score: 4, Informative

      Unless things have changed I never paid Qt any attention because it is dually licensed and therefore not truly free software and its ownership keeps changing between commercial companies.
      Last I checked Qt is "free" for open source projects but requires an expensive commercial license for anything else.

      You last checked about a decade ago, then.

      Here's how it works now (and has worked for a while now): Qt is Free. Not "free", but Free. It's under the LGPL. And the GPL.

      "But it's owned by a commercial company, and they can just close off the source."

      Nope. Still stays open. Back a few years ago, the KDE group got a special concession from Nokia. They set up the KDE Free Qt Foundation; if the commercial owners of Qt (Digia) stop releasing Qt under the LGPL and GPL3, KDE has the right to make the whole thing BSD. Irrevocably. And the agreement stays, even if Digia is sold, bought, etc. Read the link if you'd like to know more.

      Basically, Qt is Free. If the owners ever stop releasing it for Free, KDE gets to release it under an even more Free license.

      Qt has been Free for a while. Qt is still Free. It will remain Free

    10. Re:But... why? by Mr+Z · · Score: 1

      My DOS machine didn't have a VGA buffer, you insensitive clod! And on the machine I had before that, BASIC on my machine didn't even have bitmapped graphics!

    11. Re:But... why? by egr · · Score: 1

      You can do whatever projects you like with Qt (commercial or open source alike). You need to buy a commercial license only if you want to do static linking to the library.

    12. Re:But... why? by Mr+Z · · Score: 1

      Well, you'd hardly get to VGA quality. You can't even get all the way to CGA resolution. The TMS9918A VDP supported a maximum of 16 colors on a 256 x 192 (sub-CGA) resolution. Furthermore, it had a limitation of no more than 2 colors per 8-pixel wide span (in Graphics II "bitmap" mode). You need a minimum of 24K bytes to support a 4bpp bitmap at 256 x 192, but the TMS9918A VDP could only address 16K bytes. The graphics II mode (with its color limitations) fit into more like ~13K bytes. (6K for the pattern table, 6K for the color table and 768 bytes for the name table.)

      Of course, TI BASIC and TI Extended BASIC didn't offer this mode. For one thing, TI BASIC / TI XB programs got stored in graphics memory, because the console itself only had 256 bytes of CPU addressable memory, and relied over-heavily on the VDP's graphics memory for everything else, including storing BASIC programs, variables, and sprite motion information (on top of the sprite position data that the VDP accessed directly itself).

      From BASIC, you had a subset of the character set that was redefineable. I forget how many characters; I think it was something like 192 in TI BASIC and 168 in TI Extended BASIC, but those numbers are from (faded) memory. So, you could (slowly) simulate bitmapped memory in TI BASIC / TI XB by drawing a small patch of screen (much less than full-screen), and redefining character tiles to simulate bitmaps. It wasn't terribly efficient, because CALL CHAR took character patterns as ASCII strings of hexadecimal digits. Useful for fixed bitmaps, but not for variable bitmaps. If you had a TI MiniMemory cartridge, though, you could use CALL PEEKV andCALL POKEV to do things more efficiently, or write a small assembly routine stored in the cartridge accessed through CALL LINK.

      Not that I'd actually know how to use that old computer.... ;-)

    13. Re:But... why? by serviscope_minor · · Score: 2, Interesting

      "We need to get past the VT100 era." He continued saying that the standard C++ program cannot even exercise the abilities of the VT100 which has underscore and bold, etc. Pure, portable C++ code cannot even drive a 1970s era VT100.

      Not sure I get that, or, Herb is less knowledgable about VT100s than he is about C++. This will work in a VT100 compatible terminal, like just about any common terminal program:

      std::cout << "\e[1mBold \e[0m\e[4munderline\e[0m\e[5m blink \e[0m\e[7minverse\e[0m text\n";

      Works on xterm. I have a CPU monitor written using xterm, C++ and swallowed by FVWM buttons. It has a 5 character number (up to 100.0) changing about once per second and a much more responsive backgroud colour which goes green to yellow to red smoothly as the load changes.

      It's 100% ISO C++. Of course, it only works on xterm-like terminals.

      Pure, portable C++ can certainly drive a VT100 fully but it won't look good on any other terminal.

      --
      SJW n. One who posts facts.
    14. Re:But... why? by AuMatar · · Score: 1

      "Write once, run anywhere? "

      Doesn't exist. Its write once, debug, rewrite, fiddle with, and get it 95% working with 90% of the effort it would have taken to start from scratch everywhere.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    15. Re:But... why? by satuon · · Score: 1

      I use Qt Creator, and never notice MOC. I know it's there and it does its work, but It has never caused any problems for me.

    16. Re:But... why? by KingOfBLASH · · Score: 1

      M-x qt-mode

      duh

    17. Re:But... why? by Anonymous Coward · · Score: 1

      Pure, portable C++ can certainly drive a VT100 fully but it won't look good on any other terminal.

      I think we have different ideas of what portable means.
      To me portable doesn't just mean "compiles for another CPU", it has to be able to communicate with the rest of the system too.
      In the era when home computers were dominated by Amiga/Atari/Mac you could write your code in 68k assembly and it would be portable between all systems as long as you used a graphics library for your output.
      Even when it comes to pure ANSI-C it is barely portable. Sure, you can get the code to run, but if you write a command line tool you will have to decide on a way to handle arguments that won't automatically compile into something that the users of that particular system expects. (For example DOS and Linux uses different standards here. A DOS user will typically type /? to get the help while a Linux user will type --help.)
      There are libraries that makes argument parsing more portable but they aren't standardized.
      So, if you write code that works on any CPU but requires a VT100 terminal I wouldn't call that portable at all.

    18. Re:But... why? by JoeMerchant · · Score: 1

      Can you say "Epic Troll"?

      Mission accomplished.

    19. Re:But... why? by JoeMerchant · · Score: 1

      I made a "hex editor" back in the '90s that worked with terminal commands like that for color, position, etc.

      Worked great.

      Only if you had the right terminal driver running.

      Least portable thing I've ever put that much work into.

    20. Re:But... why? by tibit · · Score: 1

      I think you don't quite get what "hardware accelerated graphics means". It means that you convert normal human-accessible primitives like lines, polygons, splines, gradients, etc. to discretized geometries accompanied by shader programs. Those are then passed to an OpenGL or DirectX implementation that runs them on a GPU. Even for non-accelerated output, there's still geometry and processing bits that get run on a CPU (or even a GPU) to rasterize the output. Sometimes the intermediate form is passed around (say, a PDF). The "hardware accelerated graphics" you speak of are very low-level and pretty much useless without higher level library support.

      --
      A successful API design takes a mixture of software design and pedagogy.
    21. Re:But... why? by tibit · · Score: 1

      So, you're a troglodyte who thinks code generation is for wimps. Why don't you hand-punch machine code on punched cards, then? I mean, why stop code generation at the level of a C++ compiler? Why don't go all the way down?

      Tell you what: if you want to be less productive, it's up to you. People who know their craft have long ago figured out what is well handled by code generators, and you know, they do use them.

      --
      A successful API design takes a mixture of software design and pedagogy.
    22. Re:But... why? by tibit · · Score: 1

      Not even then. LGPL merely mandates that there must be a way to re-link your binaries to modified Qt binaries. All you need to distribute for a commercial closed-source, statically-linked app is the object files. Heck, you can, you know, pack them into a static archive! Who'd have thought!

      --
      A successful API design takes a mixture of software design and pedagogy.
    23. Re:But... why? by tibit · · Score: 1

      On all platforms, the bits still end up on the screen, and you can still pass a binary bitmap to the platform API to put on the screen. Wouldn't you know, that's what Qt in fact does all the time! For non-Qt-Quick-2 code, Qt uses its own rendering backend (called raster) on all platforms by default, and the entirety of interface between Qt 5's gui module and the OS, apart from synchronization primitives, is bitmaps and I/O+timer events. Seriously.

      --
      A successful API design takes a mixture of software design and pedagogy.
    24. Re:But... why? by JohnnyLocust · · Score: 1

      Qt doesn't get out much beyond Win/Lin/Mac.

      Qt isn't available for enough platforms because it only runs on Windows, Mac, Linux, Android, iOS, Blackberry, Kindle, vXWorks, BSD, Solaris, Haiku, WebOS, OS/2, Tizen and AmigaOS? Anything that passes the "does it run on Amiga?" test is good enough for me.

      You forgot qt in a browser: http://vps2.etotheipiplusone.com:30176/redmine/projects/emscripten-qt/wiki/Demos

    25. Re:But... why? by MikeBabcock · · Score: 1

      If you have to specify implementation-specific special codes within your data stream then your language doesn't support the thing, your code is doing it.

      std::cout http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/attrib.html

      C++ doesn't understand Unicode strings (which Python now does for instance) and doesn't understand screen resolutions, emulations or graphics either. Do these belong in the standard library? If they're used as frequently as I think they are, I'd say yes.

      --
      - Michael T. Babcock (Yes, I blog)
  9. Re:huh? by Anonymous Coward · · Score: 1, Informative

    Rasterization is hardly system dependent.

    There's a variety of well defined mathematical algorithms for coordinate space transformation, intersection, and ultimately rasterization of polygonal and parametric/polynomial shapes.

    No one is saying this graphics library is going to draw to the screen, in fact based on the discussions and proposals - it'd raster directly into memory (and it's up to the user to implement system dependent methods to take it from memory and display it on the screen, if that's even what the user wants).

  10. Broken link by BenO'Shea · · Score: 1

    the "sent out a message to the Cairo developers this week" link above points to the knight's landing page from another story...

    1. Re:Broken link by jones_supa · · Score: 2

      Heh, that's correct.

      Here's the proper link to Herb's post. http://lists.cairographics.org/archives/cairo/2013-December/024858.html

      (You have to flip to 2014 archives to see the full thread.)

  11. Re:huh? by epyT-R · · Score: 1

    Actually, it's correct grammar. Benefit is also a verb.

    http://www.merriam-webster.com/dictionary/benefit

    (scroll down)

  12. standard c++ by mevets · · Score: 1, Insightful

    Is there anything it cannot do?
    The old C++ looks better and better as they nail every bit of crap they can find to her wretched offspring.

    1. Re:standard c++ by DoofusOfDeath · · Score: 1

      Is there anything it cannot do?

      Well, not to the extent that it approximates a Turing machine.

    2. Re:standard c++ by StripedCow · · Score: 4, Insightful

      Is there anything it cannot do?

      Garbage collection.

      --
      If Pandora's box is destined to be opened, *I* want to be the one to open it.
    3. Re: standard c++ by NicWilson · · Score: 1

      what a load of cobblers ALL other languages are C++ wanna-bes

    4. Re:standard c++ by phantomfive · · Score: 1

      The old C++ looks better and better as they nail every bit of crap they can find to her wretched offspring.

      Some people were saying that back in the 80s (specifically, Ken Thompson). It's always been the C++ design strategy.

      --
      "First they came for the slanderers and i said nothing."
    5. Re: standard c++ by phantomfive · · Score: 1

      what a load of cobblers ALL other languages are C++ wanna-bes,

      This comment shows the limitations of your own knowledge, not anything about languages.

      Check out APL sometime if you really want to blow your mind. FORTH is something interesting, too.

      --
      "First they came for the slanderers and i said nothing."
    6. Re:standard c++ by suy · · Score: 1

      Is there anything it cannot do?

      Garbage collection.

      C++ does no garbage collection because C++ developers learn how not to produce garbage in the first place. Use proper mutex lockers, smart pointers or file handles, and you won't leak memory, won't miss freeing locks or file descriptors.

      And is not that you need to be a genius to make use of them. Just use, for example, a QFile, or QMutexLocker, and at the end of the scope the resource is freed. Done.

    7. Re: standard c++ by david_thornley · · Score: 1

      Not really, but until 10-15 years ago all other languages were Lisp wannabes.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
  13. Re:huh? by beelsebob · · Score: 1

    It had better be both damn well specified, and super under specified at the same time.

    If it's not well enough specified, different OSes will do different things re (for example) antialiasing, where they decide the centre of a pixel is, etc

    If it's too well specified, no OS will be able to implement it efficiently.

    My suspicion is that it'll end up under-specified, and useless because of it, in the same way as java's drawing libraries are typically an endless source of bugs (common ones being that the developer assumed that no AA would happen, and then breaking on OS X or more recent windows installs, and rendering nasty looking halos around things, because the developer assumed they could just over-draw something and it would disappear).

  14. Re:huh? by beelsebob · · Score: 2

    The problem is, what's efficient, or nice, is not well defined. Should you antialias lines? If so, what type of antialiasing? Is that type of AA efficient on the graphics card in use? If you don't do that, do certain programs break?

    These are all questions that have been answered before by java –yes, everything breaks, because everyone needs to implement graphics subtly differently.

  15. Re:huh? by epyT-R · · Score: 1

    Yes, I know, but it seems to me that those kinds of functions don't belong in the base library as the particulars would be design dependent anyway. For example, we have mpfr for floating point math, which is distinctly separate from the rest of the toolchain, and is an optional piece. Maybe the line is arbitrary, but it seems like feature creep to me.

  16. As usual, fuck the implementation. by VortexCortex · · Score: 2, Interesting

    Hey let's get a standardized vector and 2D drawing library going! Fuck the hardware or implementation details which indicate you'd be better off not limiting the dimensions to 2. Never mind the fact that we'll be filling triangles on a GPU for any sort of efficiency at all. Nope. Fuck starting at the actual primitives present and working up from there, let's do the top-down approach yet again -- When the performance conscious folks include messed up limitations, like the Diamond Inheritance pattern (Which has no reason to exist, variable placement should be virtual too, dimwits).

    Yeah, I'll stick with C. At least it doesn't pretend to do anything but present the Von Neumann architectural constructs to me and let me build my OOP, etc atop them. It's still not optimal because it has the moronic assumption that functions should be on the stack and not the heap -- thus hindering or outright preventing closures, co-routines, and arbitrarily limiting recursion despite the system's available RAM -- but it's miles beyond C++ in terms of idealic design splattering all over the hard brick wall of reality's implementations. I mean really, if you can't use method overloading properly with templates and polymorphism then the language is broken by design, and there are no complete implementations.

    Hey! I got an idea. You know what would be nice in C++? How about a standardized ANSI terminal interface, like VT100 -- Get ncurses into the spec. Oh! And you know what else? How about RMI! Yeah! Oh oh oh!! I got one I got one! INTER-fucking-FACES for IPC! Yeah! So you could query a program's interface and pass data between processes transparently in a language independent way -- and the doc comments could be lexical tokens too, so that if the .dat file was present even a terminal mode program could query a program's usage without needing a manually constructed manpage, and other programs could implement the same interfaces allowing us to assemble programs from sets of features. You know, something smarter than STDIN and STDOUT and a char**? Something actually fucking useful for a damn change?

    1. Re:As usual, fuck the implementation. by Anonymous Coward · · Score: 1

      Why should the C++ committee jump through hoops to give you paragraph 3, when you already said you'd rather roll your own polymorphism etc on top of C (paragraph 2)? Unless paragraph 3 was meant as total sarcasm, which is possible too. I skimmed it twice and couldn't tell if you were joking or not.

    2. Re:As usual, fuck the implementation. by Jeeeb · · Score: 3, Informative

      Okay you don't like C++, that much is clear but...

      Hey let's get a standardized vector and 2D drawing library going! Fuck the hardware or implementation details which indicate you'd be better off not limiting the dimensions to 2. Never mind the fact that we'll be filling triangles on a GPU for any sort of efficiency at all. Nope. Fuck starting at the actual primitives present and working up from there, let's do the top-down approach yet again -- When the performance conscious folks include messed up limitations, like the Diamond Inheritance pattern (Which has no reason to exist, variable placement should be virtual too, dimwits).

      Cairo is not limited to outputing raster graphics. It also supports vector formats such as PostScript, PDF and SVG. You may be doing the work on the GPU, or the GPU may have nothing to do with it at all. Even for raster graphics, it is not guarnateed that a GPU is even present or the fastest option. Seperation of vector 2D graphics and 3D graphics output is a long established tradition and hardly a design descision of the C++ standards commitee.. They are after all only looking to standardise on an existing C library in widespread use.

      Yeah, I'll stick with C. At least it doesn't pretend to do anything but present the Von Neumann architectural constructs to me and let me build my OOP, etc atop them. It's still not optimal because it has the moronic assumption that functions should be on the stack and not the heap -- thus hindering or outright preventing closures, co-routines, and arbitrarily limiting recursion despite the system's available RAM -- but it's miles beyond C++ in terms of idealic design splattering all over the hard brick wall of reality's implementations. I mean really, if you can't use method overloading properly with templates and polymorphism then the language is broken by design, and there are no complete implementations.

      C++ sure has its warts and I am definitely keeping my eye on Rust and D but what exactly would you consider a good way of handling method overloading + templates + polymorphism, and as a C fan why do you want to introduce such complexity to your code? KISS works well in C++ as well. On a side note C++ does handle the combination of features (http://stackoverflow.com/questions/4525984/overloading-c-template-class-method), albeit it is hardly pretty

      Hey! I got an idea. You know what would be nice in C++? How about a standardized ANSI terminal interface, like VT100 -- Get ncurses into the spec. Oh! And you know what else? How about RMI! Yeah! Oh oh oh!! I got one I got one! INTER-fucking-FACES for IPC! Yeah! So you could query a program's interface and pass data between processes transparently in a language independent way -- and the doc comments could be lexical tokens too, so that if the .dat file was present even a terminal mode program could query a program's usage without needing a manually constructed manpage, and other programs could implement the same interfaces allowing us to assemble programs from sets of features. You know, something smarter than STDIN and STDOUT and a char**? Something actually fucking useful for a damn change?

      If you want IPC abstractions use Boost (http://www.boost.org/doc/libs/1_55_0/doc/html/interprocess.html). Maybe one day these abstractions will be added to the standard library as well. You could also look at platform specific IPC solutions such as COM, which seems fairly close to what you describe. However, until there is a commonly accepted base set of features which can be supported on all major platforms, looking to the C++ standards committe to provide guidance seems very odd to me.

    3. Re:As usual, fuck the implementation. by fisted · · Score: 1

      C [...] has the moronic assumption that functions should be on the stack and not the heap

      Dear Mr. experienced C programmer,
      There is no such assumption in C.

    4. Re:As usual, fuck the implementation. by tibit · · Score: 1

      In fact, I use an LLVM-based internal port to a micro controller where the usual calling convention puts parameters and return values in static memory locations. Those are laid out in memory by the linker, based on the call tree to facilitate overlapping data of the functions that don't coexist in any path through the call tree. Recursive functions that aren't tail calls are either forbidden, or, if enabled, they then use stack.

      --
      A successful API design takes a mixture of software design and pedagogy.
  17. Re:huh? by Anonymous Coward · · Score: 1

    Except for the glitz backend, Cairo has nothing to do with the GPU - it's all implemented on the CPU, same implementation on all architectures, all platforms.

    Antialiasing options are defined as flags.

  18. Java, C#, and JavaScript all have graphics libs by jmcbain · · Score: 2, Informative

    Java, C#, and JavaScript all have graphics and canvas component libraries. All these libraries render graphics differently on different systems. In the C++ universe, programmers have had to use 3rd-party libs like Qt, so a C++ standard library for graphics is long overdue.

  19. Seems like a bit of a can of worms... by Jeeeb · · Score: 1

    Obviously this is early stages, and I am not outright opposed to the concept of having a standard vector graphics library. The creation of formatted documents (pdf) and images is a low level and common task. The productivity of many programmers could be increased by having a standard library which can be easily linked against.

    However I do feel like this opens up a can of worms. Will they also include a FreeType interface to support text output? What backends will be included by default?

    A vector graphics library without the ability to handle text seems seriously crippled. On the other hand choices for including text output basically come down to:

    1. 1. Create a standard interface and leave the actual implementation to be platform dependent. In this case rendering results will differ depending on platform.
    2. 2. Choose one library (FreeType) as the standard. In this case rendering results will look natural on platforms that natively use the library (FreeType) but unnatural elsewhere (e.g. OS-X and Windows)
  20. Unredirected stdin/stdout is itself superseded by tepples · · Score: 1

    Graphics libraries and their APIs are Here Today, Gone Tomorrow. The hot thing today will most likely be superseded and irrelevant in 10-15 years time.

    Glass-TTY interfaces, like the implementations of stdin and stdout in C++ compilers targeting PCs when not redirected to a file or pipe, have for the most part been superseded by GUIs. At least Cairo would provide a starting point toward a bare-minimum image manipulation and GUI component that a C++ program can expect, much as Tkinter does for Python.

  21. C coroutines by tepples · · Score: 1

    One can implement coroutines in C.

  22. Re: huh? by michaelmalak · · Score: 1

    Yes benefits is a verb, but in this context it is a transitive verb, meaning a direct object is required.

  23. You see "implementation-defined" a lot in C spec by tepples · · Score: 1

    Create a standard interface and leave the actual implementation to be platform dependent. In this case rendering results will differ depending on platform.

    C and C++ leave even operations on signed integers implementation-defined, so leaving the precise appearance of text implementation-defined shouldn't be too much of a problem.

  24. Freestanding vs. hosted by tepples · · Score: 1

    the STL isn't part of the standard runtime

    I thought apart from <iostream> and friends, the STL was the C++ standard library. Are you by any chance referring to the difference between a "freestanding" implementation and a "hosted" one, where a "freestanding" implementation is permitted to leave out standard libraries?

    1. Re:Freestanding vs. hosted by AuMatar · · Score: 2

      The STL is *part of* the C++ standard library. Its the various container classes, algorithms functions, etc. There's also iostream, the old C header files, and some new stuff like threading in the C++ standard library.

      Also, not all C++ compilers implement all of the C++ spec (in fact, none of the major ones do, see export keyword). Most embedded compilers leave out the STL, because they don't support templates or do so only partially. Many others require you to separately build and link the STL, and don't by default have it in the runtime (for an example of this, the Android NDK). This is due to be fixed 3 years after the heat death of the universe.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    2. Re:Freestanding vs. hosted by satuon · · Score: 1

      The only 2 parts of STL that I use, like 99% of the time, is std::string and std::vector.

    3. Re:Freestanding vs. hosted by david_thornley · · Score: 1

      As of C++11, export was removed from the language. It's still an unused keyword. IIRC, both gcc and clang have recently claimed full C++11 support, although they never did have full C++98 support (export). VC++ is adding C++11 and C++14 support, but is not complete on either.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
    4. Re:Freestanding vs. hosted by AuMatar · · Score: 1

      std::map and std::list get used a lot too (although I do see a lot of lazy C++ programmers using vector where they should use list). Basically everyone uses the container classes, almost nobody uses the rest.

      --
      I still have more fans than freaks. WTF is wrong with you people?
  25. Re: C++ GC by Anonymous Coward · · Score: 1

    Is there anything it cannot do?

    Garbage collection.

    It can, tho. It's not yet in the standard but there are actual garbage collectors for C++.

  26. Watch the video by Anonymous Coward · · Score: 1

    Skip to 1:15:00 and watch Herb Sutter explain why they're doing this stuff.
    http://channel9.msdn.com/Events/GoingNative/GoingNative-2012/C-11-VC-11-and-Beyond

    I hate reading the comments on Slashdot.

    1. Re:Watch the video by Kiwikwi · · Score: 1

      Skip to 1:15:00 and watch Herb Sutter explain why they're doing this stuff. http://channel9.msdn.com/Events/GoingNative/GoingNative-2012/C-11-VC-11-and-Beyond

      I hate reading the comments on Slashdot.

      Mod parent up. Take the 15 minutes needed to understand why this is part of a very interesting and important new development for C++, which can also be seen in the work already slated to go into C++14, namely to improve the C++ standard library to a level where it can compete with newer languages.

      Notably, the goal is not to reinvent the wheel (which is why they're standardizing existing libraries), and portability is a must... which is why you should not expect e.g. a standard GUI library (oh, and people... graphics library != GUI library).

    2. Re:Watch the video by Arkh89 · · Score: 1

      Another big laugh at 1:30:45 : so they want a SMS messaging standardized library but they don't want to make a "niche" library for linear algebra in the standard?
      WTF???

  27. Re: C++ GC by StripedCow · · Score: 1

    Conservative ones, yes.
    But accurate ones? Multithreaded? Without "stopping-the-world"?

    --
    If Pandora's box is destined to be opened, *I* want to be the one to open it.
  28. Re: huh? by behrooz0az · · Score: 1

    ... benefits me.
    Satisfied?

    --
    Moderating "-1, Disagree" is simple censorship. Have the guts to post your opinion. -- Spazmania (174582)
  29. Re:huh? by dreamchaser · · Score: 1

    I'll finish it for him...'anyone.'

  30. Re:huh? by behrooz0az · · Score: 2, Insightful

    Do you develop for windows? I suspect yes, because in linux we've had this library for years and everyone knows it's a freakin' cross-platform library with very good documentation, coding style, naming convensions, specs, ...
    Stop ranting already.

    --
    Moderating "-1, Disagree" is simple censorship. Have the guts to post your opinion. -- Spazmania (174582)
  31. The JAVA/.NET generation is a fucking disaster. by Anonymous Coward · · Score: 1

    As someone who learnt C then C++ as my first languages, I agree. If there's such a thing as too high level, we're reaching it.
    I'm self-taugh but I know how the metal works and made my own toy OS. Then learning other languages was a piece of cake.
    Languages like C#, Python,etc are so easy it almost feels like cheating.

  32. Re:You see "implementation-defined" a lot in C spe by Jeeeb · · Score: 1

    C and C++ leave even operations on signed integers implementation-defined, so leaving the precise appearance of text implementation-defined shouldn't be too much of a problem.

    Right. Except that is complexity exposed to the programmer and easily dealt with via int32_t, uint32_t .etc. This is inconsistency exposed to the user.

  33. Re:huh? by beelsebob · · Score: 1

    You seem to be confusing "this works well on linux" with "this is the perfect solution for all platforms, and it works perfectly across all platforms".

  34. Re:huh? by beelsebob · · Score: 2

    "It's implemented on the CPU" is the first gigantic red flag here. The implication of this is that it's so tightly specified that it's impossible to implement efficiently (i.e. on all vendors different GPUs which do subtly different things re how the exact pixel colours come out).

  35. Floating-point types by tepples · · Score: 1

    The implementation-defined precision of floating-point types (float, double, and long double) is inconsistency that could end up exposed to the user if the last significant figure is displayed or if a rounding difference causes an if statement to go one way or the other.

  36. Re:huh? by shutdown+-p+now · · Score: 1

    No, he isn't. He's saying that people who code for Windows only aren't even aware of the fact that there are great cross-platform libraries available to them which work just fine on Windows. And he is right.

    libxml2 has a similar story, by the way.

  37. Re:huh? by beelsebob · · Score: 1

    No, he's assuming that the existence of one cross platform library for one well specified task means that another task can be well specified in a way that it can be efficiently implemented on all platforms. That's not true of graphics. This isn't even true of different implementations of graphics drivers on one platform, let alone across platforms.

  38. Re:Please don't by shutdown+-p+now · · Score: 1

    just like the STL isn't part of the standard runtime.

    STL is the part of the standard C++ library - has been that way sinco ISO C++98.

  39. Re:Uh what? by shutdown+-p+now · · Score: 1

    Since when do libraries become the "standard"?

    Since ANSI C89 standardized things like fopen()?

  40. Re: C++ GC by shutdown+-p+now · · Score: 2

    There was a paper in committee that would make it possible (authored by Boehm, no less). It didn't live to see C++11, though.

  41. Re:huh? by shutdown+-p+now · · Score: 1

    Why isn't it true for rendering 2D graphics to a memory or a file? What, exactly, is different between Windows and Linux in drawing a line of a given color and thickness from (x1, y1) to (x2, y2)?

    (And don't say "anti-aliasing algorithm" - that should just be a configurable parameter.)

  42. Re:huh? by dryeo · · Score: 1

    A real world complex cross platform program using Cairo is Firefox (most recent might use something different by default on Windows, I haven't kept up). It works pretty good on all platforms including non-main stream with (at least on my platform) options to control things like anti-aliasing.

    --
    https://en.wikipedia.org/wiki/Inverted_totalitarianism
  43. Re: C++ GC by Anonymous Coward · · Score: 2, Interesting

    Most modern GC based languages can be faster and reduce memory fragmentation with heavy allocate and deallocate work loads, compared to C/C++. The trade off is less control and more jitter, but the benefit is potentially higher throughput. Without heavy micro-optimizations and essentially your own GC, C/C++ cannot compete.

    What it comes down to is the GC keeps working memory highly compacted in a very efficient way, such that it allows memory allocations to be nothing more than incrementing a pointer. No searching for free space involved. It can also do background compaction while your program is running, and on different threads. These things are less efficient than micromanaging this stuff yourself in C/C++, but the amount of work involved makes it an expensive optimization, which is virtually free in a GC language.

    I'm not trying to say that GC languages are faster in general, but in many common work loads, the GC compensates enough to make a GC language near C/C++ speeds. If I can write a program 5x faster, have fewer bugs, and have it running 80% the speed, that's a win.

    Most of the time, programs are not CPU or memory limited, just limited by bugs and development speed. The more popular programs are actually heavily IO bound. .Net with ASync and tasks will give most other languages a run for their money, it has better scaling than most others. It heavily focuses on reducing context switching and increasing data locality.

    Many C/C++ programs have negative scaling with lots of IO. Once you've hit peak performance, it actually gets slower instead of maintaining current rates.

  44. GUI toolkit on its way in? by croocan · · Score: 1

    Is there also a GUI toolkit such as GTK on its way into ISO C++?

  45. Re:huh? by JDG1980 · · Score: 1

    You seem to be confusing "this works well on linux" with "this is the perfect solution for all platforms, and it works perfectly across all platforms".

    Cairo works fine on Windows. Firefox used it for quite a few releases, and I believe still has it included as a fallback if their custom "Azure" rendering library is turned off or can't work for some reason. In fact, it was Mozilla that contributed the Direct2D back-end to Cairo. (Cairo is quite flexible - you can make it render its canvas to almost anything: SVG, PDF, Windows GDI, X11, and a couple of others.)

  46. Re:huh? by JDG1980 · · Score: 2

    The problem is, what's efficient, or nice, is not well defined. Should you antialias lines? If so, what type of antialiasing? Is that type of AA efficient on the graphics card in use? If you don't do that, do certain programs break?

    You're making this more complicated than it needs to be.

    First of all, why would you ever want to draw Bresenham-style non-anti-aliased lines? The only reasons I can think of would be if you're emulating some sort of legacy system, or if you are working on an embedded platform with a monochrome LCD display. And these are unusual enough situations that I think it's reasonable to expect you to write your own code or use a library designed specifically for your purposes, rather than demand that a proposed industry standard be modified or eliminated entirely simply because it doesn't fit your particular idiosyncratic need.

    And since when is it important precisely which anti-aliasing algorithm gets used? I checked the SVG standard, and it says nothing about what particular algorithm is used for lines and other primitives. Indeed, as you mention, it would probably be inefficient to do so, since not all GPUs may be optimized for the same method. Yet this is a cross-platform standard, supported by multiple browsers, and works just fine in the real world. If someone is writing vector graphics that rely on undocumented, system-dependent aspects of rendering to display correctly, they're doing it wrong.

  47. Re:You see "implementation-defined" a lot in C spe by windwalkr · · Score: 2

    I think he's referring to signed integer overflow conditions, which don't behave as most people would probably expect and aren't trivial to handle correctly.

  48. Rendering is great by anatoli · · Score: 1

    but how do I interact with the program? Will the new standard include anything like mouse input?

    --
    Industrial space for lease in Flatlandia.
  49. Re: C++ GC by serviscope_minor · · Score: 2

    Most modern GC based languages can be faster and reduce memory fragmentation with heavy allocate and deallocate work loads, compared to C/C++.

    Suspicious sounding statement. Such things are ususally based on writing C++ like java (i.e. new everything). C++ uses stack allocation for very much stuff, and that is free (the pointer increment is already done on function entry) and 100% guaranteed fragmentation free.

    If I can write a program 5x faster, have fewer bugs, and have it running 80% the speed, that's a win.

    Why would C++ be slower to develop? You're confusing garbage collection with "memory management". C++ does memory management very well. I can't recall the last time I had a leak and that's not because I'm super awesome.

    Most mm is just plain invisible in C++, since stuff is deallocated on scope exit. For everything else (nearly) there's reference counting. Reference counting doesn't work if you have general (i.e. cyclic) mutable graphs. I'm not sure I've ever had one of those.

    --
    SJW n. One who posts facts.
  50. Re:Please don't by shutdown+-p+now · · Score: 1

    You mean, std::forward_list?

  51. Ditto on the waste of time by bussdriver · · Score: 1

    Rather than make C++ appeal to people who probably should stay in their high level languages, I think they should be putting their time into productivity. As much as I liked to spend time in C++ not writing any actual code playing with macros, templates, etc. in addition to finding new ways to hang myself; I don't find myself doing C++ anymore - I just don't like fooling around enough (yet I still do perl for fun; does that make sense?)

    I think all the man power needs to be put into technical development not fluffy graphics libraries. I'm not as big on portable compiling as I am for some kind of binary format and linking system that would make it easier for an old program to run on a newer OS without needing all these virtual machines. Not exactly Google's NaCl (or whatever it's called) or a byte code but an attempt to address such issues. Not for java style portability, but something so legacy software can run without easily breaking (which it can do even with Java over time) and yes, it would get into OS turf... just like many other languages do as far as how library code is linked and loaded.

    It's been a long time away for me... I've not looked at C++11 but here is a wishlist:
    Text output needs improvement more than we need graphics. More debugging, logging, dummy functions, test case related standardization - more dynamic binding, runtime introspection features and other things that go against the initial design goals but ONLY in limited contexts, such as debugging and testing; thereby, retaining the intent of C++ but unleashing it for development purposes (such as a console or recompiling running code and replacing it.) This would fit in with their trend to be all things to everybody without changing/breaking the past decisions. It would be difficult to implement in some cases; but it's a debug mode.

    I've always wanted named parameters; which could have been handled completely on the compiler side without run time penalty. ADA style typing was always appealing, for some things. How about something like JSON object literals? Native RegExp literals? A built-in parser generator (grammar definitions that produce parsing code you don't need to mess with.) Easier internationalization.... forget drawing lines, give me a great way to print "hello world" in many languages; or localize time and dates. A Money class to avoid common errors (use of float.) Configuration API. Apache's memory pool system seemed cool to me (APR,) garbage collecting not so much. Parallel processing features (if not already some, work on more-- again thinking of productivity and debugging.) We still don't have a multiple level break yet, correct? (like an exception but more limited in scope and as fast as a goto. Don't freak out, I didn't endorse goto.) I wouldn't mind a way to define a graph literal... I assume we must have a String object that handles unicode issues... we didn't last time I touched C++. Unicode source files... that allowed use of math operators like root... which have unicode characters...
    Just ideas... to help bloat the compiler.

  52. Re: C++ GC by satuon · · Score: 2

    I've noticed that regardless of all claims about how Java can be faster than C++, I've never seen Java desktop applications beat C++ at the most important thing - startup time. I'll give you an example with JDownloader - that application takes 10-15 seconds to start.

    Speed perception from the user's point of view is based on startup time and latency. I still haven't seen a Java desktop application that feels responsive.

  53. Re: C++ GC by gbjbaanb · · Score: 1

    its not the GC that allows you to develop faster, its the surrounding infrstructure that does that. Imagien writing your C# code in notepad - you just wouldn't do it, it'd be painfully slow. That's where the development productivity comes from.

    GC can be a huge burden though, not only does it encourage sloppy 'the GC will take care of that' style attitude that hurts performance badly (as prime example consider why there is a StringBuilder class at all, if the GC is so fantastic and fast at memory management). If you need to manage something that is not memory, whatever that is, you start to have to worry quite alot about how to trap and free the resource correctly.

    I recall an old WCF program I wrote, I implemented IDispose correctly in the handler object, yet if anything thew an exception (which I wanted, to pass to the client as a SOAPFault) it wouldn't clean up the server-side state correctly, and the next call would contain a little bit (of logging state in my case) from the previous call. Bummer. Worse bummer - figuring out how to force the GC to correctly finalise my object when I wanted it done. Ended up having to manage all that object lifecycle manually. Manually! It ended up like coding C again and remembering where to put the delete() call.

    So no, GC in the real world is handy, but doesn't increase developer productivity, or code performance (except for benchmarks or simple stuff that don't use it like the real world). Fewer bugs - hardly, you just shift them elsewhere.

    FYI, take a look at Microsoft's SafeHandle class. That shows exactly the problem with GC systems. If you have to create a low-level reference counting class to work around the GC, but the creators of the entire VM, then you know GC is not a silver bullet.

    C++ is better off without it, stick to RAII and be happy.

  54. Re: C++ GC by Altrag · · Score: 1

    StringBuilder exists because the string data type is immutable. It has nothing to do with GC. String concatenation without StringBuilder is a painter's algorithm as it has to keep re-copying the working version of the string for every piece added.

    As for proper clean up with exceptions -- that's what using() and finally{} are for. If you're using an object that implements IDisposable and not properly disposing of it when it goes out of scope (for any reason) then you're doing it wrong.

    Finalizers are also usually the wrong thing to do in C#. The very definition of the language states that they will be called whenever the hell the GC feels like and you definitely should never rely on them being called in a timely fashion. Generally speaking, you can leave managed objects to take care of themselves and unmanaged objects taken care of in a Dispose() method. 99% of the time, the only thing you should use the finalizer for is forcing a call to Dispose() in case whoever is using your class doesn't bother properly disposing of it.

    Yes, Dispose() smells a lot like C++'s delete. That's the way of life -- if you want a guaranteed cleanup then you're going to have do it yourself. There's only so much guessing the GC is capable of. But most of the time you're dealing with regular managed objects and the GC does its job just fine, leaving you to worry about the logic of your program rather than whether or not its leaking memory.

    And yes, there are of course situations where the GC outright doesn't suffice. And the language designers gave us utilities for dealing with those situations when they occur. But I have yet to run into one that didn't turn out to be me just doing something dumb (I came from a C/C++ background myself.)

    You're right -- GC isn't a silver bullet. But its still a hell of a lot easier to write safe code when you only have to worry about object destruction 10-20% of the time. And if you're really stuck, you can force the GC to collect whenever you feel like (of course you take a performance hit for doing that so its generally not recommended.)

    (I suppose the C# team could implement a class attribute to force finalization when an object goes out of scope but I have no idea if that would be a huge performance hit or they just never thought of it or they thought of it and decided they didn't like it or what. Still only solves one small part of the problem in any case though.)

  55. Dumb idea by loonycyborg · · Score: 1

    What's the point of this? cairo is a C library. I guess you could standardize it as part of C2014 or something but just converting its interface to C++ as they say is just pointless. It would result in as much work as would be to make a proper C++ api from scratch and wouldn't necessarily result in as good C++ api as cairo is for C.

  56. Re:huh? by beelsebob · · Score: 1

    The point is that AA algorithm *can not* be a configurable parameter, because different hardware simply does it in different ways. It's impossible to implement FXAA efficiently on nVidia hardware, and it's impossible to implement CSAA efficiently on AMD hardware. This is the point, efficient implementation of graphics *must* be sufficiently weakly specified that it can be efficiently implemented. The result of that is that it can not be sufficiently strongly specified that all platforms behave the same, and you can get benefit from having a nice abstracted cross platform API.

  57. Yeah, ok, just as long as you can turn it off by RogueWarrior65 · · Score: 1

    My problem with this is how do you build a compiler from sources for a faceless embedded platform. I'm currently seeing this play out in the Qt environment. There are a lot of nice non-GUI features to it but I have yet to be able to cross-compile v5.x of the thing for an embedded ARM platform that has no display, keyboard, or mouse. 4.8.5 works fine but Digia changed a bunch of stuff in 5.x and now I'm SOL.

    IMHO, something like drawing should be compartmentalized into a library.

    1. Re:Yeah, ok, just as long as you can turn it off by tibit · · Score: 1

      I don't know what your problem is, since Qt 5 actually makes it easier than Qt 4! That's my experience, at least. Heck, I've been able to get Qt 5 core to run on Zilog's ZNEO. It even performs OK for a proof of concept, and that's practically a platform that runs at 10MIPS and has a 24 bit address space. I use a custom LLVM port to compile it. I need to do more work on cross-module constant propagation to get it to be where I want it to be, but it runs and is usable. And it all runs on bare metal, no OS.

      --
      A successful API design takes a mixture of software design and pedagogy.
    2. Re:Yeah, ok, just as long as you can turn it off by RogueWarrior65 · · Score: 1

      I was trying to build it with a GNU OABI compiler for an ARM SBC. Sadly, that SBC uses a crappy Cavium processor which doesn't support thumb instructions so I'm stuck with OABI. That said, I've been able to cross-compile Qt 4.8.5 but I couldn't get 5.1 to build. Lots of make/compile/link errors.

  58. Re: C++ GC by angel'o'sphere · · Score: 1

    When I start a Java application it usually runs for weeks if not months (until a system update requires a reboot).
    I don't really care if it takes 5, 10 or 120 seconds to start up.

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  59. Popcorn please by genocitizen · · Score: 1

    I kinda' missed these flame wars..

    1. Re:Popcorn please by captjc · · Score: 1

      Only in slashdot could adding a graphics library to the c++ standard be derided as one of the greatest tragedies to befall mankind.

      Just like the good ol' days, eh?

      --
      Slow Down Cowboy! It's been 1 hour, 47 minutes since you last successfully posted a comment
  60. Re:huh? by tibit · · Score: 1

    Such high-level concepts wouldn't be high level concepts if they were system dependent. Cairo offers a device-agnostic interface, just as C++ iostreams does, or C's file I/O. Many of Cairo's devices are completely system independent - pretty much any device that is not tied to the API of an operating system. So, if you use Cairo to draw into platform-specific handle on Windows or OS X then yes, your application is system dependent. But those are the only examples I think. Everything else is agnostic. With Cairo, you write to raster or vector files the same no matter what OS you're on, and the output is supposed to be the same; unless floating point implementation details interfere with that. Even output via Xlib will work the same for a given X server - you could be accessing that server from OS X, Windows, Linux, BSD, or even an OS-less embedded device that uses xlib with a stand-alone TCP/IP stack.

    --
    A successful API design takes a mixture of software design and pedagogy.
  61. Re:huh? by tibit · · Score: 1

    That's just silly. All of what you mention is still system-independent. Whether you antialias or not is just a choice of algorithms you use to draw lines. It produces identical output no matter where you run it. If you use Cairo to generate a PDF file or a JPEG file, the only differences in output will be due to floating point implementation differences. The operating system has nothing to do with anything here.

    --
    A successful API design takes a mixture of software design and pedagogy.
  62. Re:huh? by tibit · · Score: 1

    Nobody in their fucking sane mind uses an OS-provided library/API for antialiasing or for actually rasterizing anything! It hasn't been done for ages if you care about portability at all. Anything that is portable out there will positively not use any platform APIs since they are usually a hell to deal with and are quirky (read: bugs that became "features" by default, not by design). Both Cairo and Qt do basic rasterization using their own code. If you use a cross-platform web browser, it doesn't use any platform APIs for drawing other than for copying the final bitmap to the screen. We're talking anything webkit-based, anything gecko-based, etc. If you use any recent Qt-based application, it does the same.

    --
    A successful API design takes a mixture of software design and pedagogy.
  63. Re:huh? by tibit · · Score: 1

    Cairo works better at rendering stuff on Windows than winapi-style libraries are. Seriously.

    --
    A successful API design takes a mixture of software design and pedagogy.
  64. Re:huh? by tibit · · Score: 1

    Drawing a line using hardware acceleration ends up in a bunch of geometry generated and sent to DirectX or OpenGL. That's how it's currently done, and even Cairo has a glitz backend that does just that. Qt supports this model widely. Legacy QPainter API using the OpenGL backend is available for QWidget and QWindow-based apps, and for Qt Quick 1. Qt Quick 2 has a way better performing scene graph implementation that renders using OpenGL as well.

    --
    A successful API design takes a mixture of software design and pedagogy.
  65. Re:huh? by david_thornley · · Score: 1

    Your arguments don't seem to work well together. A few posts ago, you argued that the existence of a good cross-platform Linux solution didn't mean a good Windows solution, but now you're arguing about efficiency on different hardware. Any good general Linux solution is going to work on a very wide range of hardware, and in fact if there couldn't be a good solution across a range of hardware there couldn't be a good Windows solution either.

    If it's possible to produce a general Windows graphics library, or a general Linux one, it's possible to have a general graphics library that works fine on either.

    --
    "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
  66. Re:You see "implementation-defined" a lot in C spe by tibit · · Score: 1

    Undefined behavior doesn't mean implementation-defined behavior!! Don't use them interchangeably!

    --
    A successful API design takes a mixture of software design and pedagogy.
  67. Re:huh? by shutdown+-p+now · · Score: 1

    The point is that AA algorithm *can not* be a configurable parameter, because different hardware simply does it in different ways. It's impossible to implement FXAA efficiently on nVidia hardware, and it's impossible to implement CSAA efficiently on AMD hardware. This is the point, efficient implementation of graphics *must* be sufficiently weakly specified that it can be efficiently implemented.

    We are talking about 2D graphics here. FXAA and CSAA are not used to antialias 2D lines. Unlike 3D scenes, where you can't AA as you draw because of Z-order, in 2D, it's entirely viable, and is how things have always been done.

    Also, accelerating basic 2D primitives is rarely even worth it, and few libraries have done it historically - yet no-one has complained about it even ten years ago, when desktops were several times slower than our phones today. The only thing that normally needs acceleration is blitting images, but that one is easy to specify in such a way that it can be efficiently done everywhere.

    The result of that is that it can not be sufficiently strongly specified that all platforms behave the same, and you can get benefit from having a nice abstracted cross platform API.

    This also presupposes that all platforms behaving the same is a desirable outcome, which is not necessarily true. E.g. as far as rendering on screen goes, I would strongly prefer the app to use text rendering appropriate to the platform - which would result in different output on Windows vs OS X, but said output would then be consistent with all the other apps that I may be running at the time.

  68. Re:huh? by turgid · · Score: 1

    Someone already did that a while back.

  69. Re:Yeah well by Greyfox · · Score: 1
    it's probably because you can still easily revert back to plain old C in your C++ code. And it's easier to find people who can read C than people who can read Ada. As I recall, Ada's objects are limited compared to C++'s (It's been a couple decades since I looked at the language.) The old C standard library gives you full control of the system, at least on a UNIX system. For me at least this is a big selling point. Between boost and the C++11 update to the standard (Which more or less copied a lot of things I use regularly from boost into the language,) it's become a really nice language to use. The level of control it gives you over object lifetimes alone makes it well worth another look.

    The only thing I really miss in it right now is C++ integration of some of the old language constructs. Most notably, I'd like to be able to create a stream from a file descriptor or a FILE pointer. That's pretty much how I do all my IPC. Currently I work around it with an object that contains GNU-specific code for that purpose, but it really seems like something that's missing from the language.

    --

    I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

  70. Re:huh? by Xest · · Score: 1

    Exactly. Any software house that does cross platform graphics work most likely already has a library that does this already. Graphics abstraction layers are insanely common way of masking the underlying hardware or operating system differences whilst providing a common way of drawing to screen.

    I've not looked into the details but I'm guessing all this does is standardise that, so that rather than everyone rolling their own, there can now be one that's standard for everyone. You can hop between companies and still know exactly how to draw to screen in C++ without having to learn their own custom internal abstraction layer for doing exactly that.

  71. Re:huh? by Nethemas+the+Great · · Score: 1

    Graphics have be a part of C/C++ from nearly the beginning. They've been nearly worthless since the beginning (and probably still will be), but they've always been in there. This I suppose is just a refresh of "graphics.h" but instead of wrapping BIOS calls it's wrapping OS API. Perhaps this will serve as a good foundation for high-quality cross-platform GUI libraries but I'm leaning pessimistic.

    --
    Two of my imaginary friends reproduced once ... with negative results.
  72. Re: C++ GC by satuon · · Score: 1

    Well, that's not what I do. I never keep an application open after I'm done with it - mostly because it clutters my taskbar. Btw, are you talking about desktop applications, or server applications?

  73. Re: C++ GC by angel'o'sphere · · Score: 1

    Desktop in this case ...
    I have only a Jenkins as "server" on my laptop.
    I keep most apps pinned to the taskbar anyway, so it looks very similar regardless if the applications are running or not.

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  74. Re: C++ GC by satuon · · Score: 1

    This is the link that inspired my comment btw - http://programmers.stackexchange.com/a/409/31462

  75. Re: C++ GC by angel'o'sphere · · Score: 1

    Yes, Java programs often have a slow start up.
    But often there is a reason, which is not Javas fault but the programmers.
    E.g. Eclipse, a wildly used Java IDE.
    The first thing eclipse does when started is opening a workspace, a directory holding lots of projects, opening those projects and figuring if "they are up to date".
    Other IDEs simply show the GUI and then use a background thread to "investigate" the projects.
    It is not Javas fault that reading gazilion of megabytes of source code slows down the start up of Eclipse.
    It is the braindead philosophy how Eclipse works. It would be similar slow in any other language.
    Imagine Microsoft Developer Studio would not start showing its GUI until it has compiled/built all projects. That would be nonsense, too.
    Hence, I rarely close my Eclipse. I just keep it running, after it started it is a well behaving citizen eating zero CPU.

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  76. Re: C++ GC by satuon · · Score: 1

    Yes, I've wondered if part of the problem is that the Java community is taught that productivity trumps performance. I mean the language advertises that its goal is to make it easier to write code by not thinking about speed.

  77. Really competent programmers ... by krischik · · Score: 1

    ... will appreciate readable programming languages. Only pseudo competent programmes too full of them self to see there own weaknesses want to use unreadable languages. And those pseudo competent programmes are an even bigger disaster then then JAVA/.NET generation because they brought us all the buffer overruns malware uses to attack our computers.

    BTW: Java is not all that readable either.

  78. PL/1 by krischik · · Score: 1

    Has there even been a full featured PL/1 with all optional features in place? I don't think so. And most C / C++ are not full featured either.

  79. Re: C++ GC by angel'o'sphere · · Score: 1

    This is not something that is taught to "the Java community", it is in general taught to every CS student.
    The reason is simple:
    a) you can always optimize a finished solution, but if there is nothing finished you have nothing to work with
    b) development time is expensive
    c) hardware is cheap

    All this are no reasons to actively build inferior solutions.

    However:
    in the time a Java programmer has done his first window and its first menu a SmallTalk programmer already has a visual prototype and the C programmer is still fixing typos after his second "make run", Yeah, I'm exaggerating, but you get the idea :D

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.