archived
stringclasses
2 values
author
stringlengths
3
20
author_fullname
stringlengths
4
12
body
stringlengths
0
22.5k
comment_type
stringclasses
1 value
controversiality
stringclasses
2 values
created_utc
stringlengths
10
10
edited
stringlengths
4
12
gilded
stringclasses
7 values
id
stringlengths
1
7
link_id
stringlengths
7
10
locked
stringclasses
2 values
name
stringlengths
4
10
parent_id
stringlengths
5
10
permalink
stringlengths
41
91
retrieved_on
stringlengths
10
10
score
stringlengths
1
4
subreddit_id
stringclasses
1 value
subreddit_name_prefixed
stringclasses
1 value
subreddit_type
stringclasses
1 value
total_awards_received
stringclasses
19 values
True
ba-cawk
null
Nice article, but a couple things that should be mentioned (also known as, "things that get me in trouble a lot"): virtualbox cannot allocate more than 4GB of ram per VM; vagrant fails to care about this and it'll be an endless source of confusion. gem update --system updates rubygems. unrelated and likely unnecessary. If there is a reason, state it. you use chef-solo and knife, but don't really explain that creating a cookbook template is the only place they intersect. knife is a tool for working with chef servers, and chef-solo doesn't use a server. spell check. a lot of misspellings in there. *recursive true* in directory resources uses the system umask for the parent directories, not the actual mask you supplied. this will become a headache if you assume otherwise sooner or later.
null
0
1316424553
False
0
c2ky44t
t3_kjtsp
null
t1_c2ky44t
t3_kjtsp
null
1427618696
3
t5_2fwo
null
null
null
True
afiefh
null
I'm not sure I understand. If I have the table [id, name, password_hash] I would create an index on id and another on name. Are you saying that by making an index on [id, name] I can execute the query "select id,name from t where id=%d" faster?
null
0
1316424954
False
0
c2ky4q5
t3_ki83r
null
t1_c2ky4q5
t1_c2kjvjw
null
1427618706
1
t5_2fwo
null
null
null
True
donkey_lz
null
> And that's enough? I had courses in specification, verification, coalgebras, advanced logics, category theory, graph theory, relational algebras, model checking, process calculi, deduction systems... and still find it hard to write a concise and sound specification in some cases. Yes, it's enough. > Yes, there was no big difference in the basic stuff. This is a major exception :-).
null
0
1316425061
False
0
c2ky4vx
t3_khkyd
null
t1_c2ky4vx
t1_c2ky1l7
null
1427618707
1
t5_2fwo
null
null
null
True
Gotebe
null
;-) I am normally the guy to put in a good word for COM 'round 'ere. However, there's no good word I'll utter for C&COM combination. People should have a life, which is not possible with C&COM. Do it, and your wife will leave, and your kids will die of an unknown disease. It already happened to many-a-good-men.
null
0
1316425562
False
0
c2ky5n2
t3_kk7c6
null
t1_c2ky5n2
t3_kk7c6
null
1427618715
15
t5_2fwo
null
null
null
True
ISvengali
null
All of that, but additionally it felt sticky and slow. If it was fast an responsive, I think I could have forgiven the look.
null
0
1316425634
False
0
c2ky5rc
t3_kjf91
null
t1_c2ky5rc
t1_c2kxudu
null
1427618717
2
t5_2fwo
null
null
null
True
bboomslang
null
well, pissing on people who are on fire could be called "adding insult to injury" and wouldn't be a nice thing anyway.
null
0
1316425707
False
0
c2ky5vk
t3_kk1hp
null
t1_c2ky5vk
t1_c2kwzwv
null
1427618718
3
t5_2fwo
null
null
null
True
chronoBG
null
The heron is pure your programming is so bad go die in a fire
null
0
1316425746
False
0
c2ky5xn
t3_kjw0j
null
t1_c2ky5xn
t1_c2kvw87
null
1427618718
36
t5_2fwo
null
null
null
True
chronoBG
null
I find it hard to express just how much is wrong with that text. But I will try. **1.Video elements** Yeah, those are pretty cool. But it's still gonna be years before an HTML5-only site is even remotely viable. **2.Application cache** This does not do what you think it does. Pretty much all it is good for is saving single-page apps that use no external resources to iPhones. Which is...none of them. 99% of web apps (surprise) need to connect to the web. This just potentially makes caching a few milliseconds faster. But there's already caching mechanisms for that. **3.Canvas for Images** Oh yeah, using canvas. A non-fully supported feature that does not work on pretty much every IE version. That doesn't offer a decent API for image manipulation and *needs* a layer on top of it in order to do anything more complex than drawing a line. Oh, and it uses up your processor like a boss. Canvas is awesome and I myself have written some stuff in it (shameless plug: http://sketchwith.me). But it's not there yet. And it's not a "key feature". And it's most certainly NOT a reason to abandon jQuery. **4.Geolocation** This is *not* a killer feature that websites desperately need. And it is not a really new thing, just a new standartized way to do it. **5.Web workers** Oh, wow, now someone can use up 100% of my CPU in a single tab! Websites are NOT made to be processor intensive. JS was NOT created to be a fast language. Just call the server and do stuff there. Or, if you so desperately need the user's processor, just build a goddamn desktop app already. This is solving a non-existing problem. ---- Here are some actually awesome HTML5 elements: **CSS3**. Yes, it's technically not "HTML5", but at this point it's an umbrella term for all of it. Shadows, corners and whatever, without endless images, kludgy designs, super slow sites etc. It's. just. better. **Drag & Drop** - it solves a real problem that saves my time(i.e. the user's time). Look at Gmail and Imgur for examples. **File API & File Writer**: Oh god, please someone other than (kind of) Chrome begin supporting this; This is the greatest thing since sliced bread in hot water. It's gonna bring single-page sites / browser extensions to a whole new level.
null
0
1316426169
True
0
c2ky6km
t3_kkbyj
null
t1_c2ky6km
t3_kkbyj
null
1427618726
19
t5_2fwo
null
null
null
True
snoyberg
null
Maybe it's because to accomplish the same thing as that huge Java code base, you only need a small functional code base.
null
0
1316426367
False
0
c2ky6uw
t3_kjkxj
null
t1_c2ky6uw
t1_c2kxxoh
null
1427618730
3
t5_2fwo
null
null
null
True
julesjacobs
null
> half of the comments are complaining about the fact that it "requires" Silverlight, despite there being **download links right there**?
null
0
1316426480
False
0
c2ky713
t3_kii9z
null
t1_c2ky713
t1_c2kpc03
null
1427618732
1
t5_2fwo
null
null
null
True
[deleted]
null
Why, there's no difference worth mentioning except for some syntactic quirks, that's a part of the point. That when we look at how some "conventional" programming language is evaluated, we can treat the process as having several distinctive more and more fundamental stages. If we stop at the AST level, we get a dialect of Lisp, if we stop below that, we get a dialect of Forth. So we can say that Lisp is "more powerful" than Basic because Basic semantics can be naturally implemented in Lisp as a DSL and that in a sense Basic _is_ a Lisp DSL which however doesn't give programmers access to the Lisp level itself. Similarly, we should then say that Forth is "more powerful" than Lisp for the same reason. Which, for most people who tried writing anything in Forth, gives a nice counterpoint to the notion that "more powerful" == "better".
null
0
1316426491
False
0
c2ky71q
t3_kjw0j
null
t1_c2ky71q
t1_c2kxij6
null
1427618732
3
t5_2fwo
null
null
null
True
[deleted]
null
[deleted]
null
0
1316426557
False
0
c2ky75a
t3_kjdt6
null
t1_c2ky75a
t3_kjdt6
null
1427618734
1
t5_2fwo
null
null
null
True
[deleted]
null
My experience of strict ownership rules in a large company is completely different. What ends up happening is that managers end up fighting about who has to own what bug. Also, some areas end up with no owner and absolutely miserable code quality. It's great when some developer steps up to own a piece of code and help users of that code. But it's completely different when ownership is shuffled around by senior managers.
null
0
1316426615
False
0
c2ky786
t3_kk5f4
null
t1_c2ky786
t3_kk5f4
null
1427618735
8
t5_2fwo
null
null
null
True
[deleted]
null
Effective C++ by Scott Meyers is a pretty great "intermediate" book: http://www.amazon.com/Effective-Specific-Improve-Programs-Designs/dp/0321334876
null
0
1316426999
False
0
c2ky7tw
t3_kjja4
null
t1_c2ky7tw
t1_c2kuxwg
null
1427618742
2
t5_2fwo
null
null
null
True
[deleted]
null
Shebang doesn't give you any tools for writing those arbitrary programs though. It's kind of hard to define "power", for instance because you could write a Forth system in a couple of hundred lines of Basic and store the rest of your program as a huge string. So I can only use vague intuitions, such as that thing is unnatural, while implementing Basic in Forth is the most natural thing in the world, \**giggle*\*.
null
0
1316427126
False
0
c2ky80i
t3_kjw0j
null
t1_c2ky80i
t1_c2kv6sb
null
1427618745
1
t5_2fwo
null
null
null
True
nombre_usuario
null
awesome read, also read the article referenced about the secret life of primitives. Thanks so much for sharing
null
0
1316427323
False
0
c2ky8c5
t3_kkbpe
null
t1_c2ky8c5
t3_kkbpe
null
1427618749
1
t5_2fwo
null
null
null
True
[deleted]
null
I recommend [Dive Into HTML5](http://diveintohtml5.org/) for further/alternative reading.
null
0
1316427404
False
0
c2ky8gk
t3_kkbyj
null
t1_c2ky8gk
t3_kkbyj
null
1427618751
3
t5_2fwo
null
null
null
True
forcedtoregister
null
Why do people using these already ugly APIs insist on checking for errors everywhere? If you can't create a string then I doubt your application is even capable of displaying an error message. And someone explain why they thought the "Hungarian notation" was a good idea. Really, I'd love to know. I'm about to hack some MFC code.
null
0
1316427404
False
0
c2ky8gl
t3_kk7c6
null
t1_c2ky8gl
t3_kk7c6
null
1427618751
1
t5_2fwo
null
null
null
True
chronoBG
null
1. What? I will insert the obligatory Yo Dawg and refuse to comment further. 2. JS is perfect for games. In fact, all current-gen games use a scripting language(sometimes even JS itself) to run the game. C++ is only used for the engine. Which cannot be made to run in a browser, because it still does not support OpenGL/DirectX fully and universally. So, yeah, that's not the issue. 3. We do? Do we? Wow, that's new. How long was I away?
null
0
1316427542
False
0
c2ky8oe
t3_kitgf
null
t1_c2ky8oe
t1_c2kpa1t
null
1427618753
0
t5_2fwo
null
null
null
True
[deleted]
null
MIPS is what I learned in school, actually. That being said, Z80 + Gameboy is definitely the most fun IMO: http://cratel.wichita.edu/cratel/ECE238Spr08/ And you can run your code natively with a $20 Gameboy and $45 flash cart.
null
0
1316427593
False
0
c2ky8r0
t3_khxzd
null
t1_c2ky8r0
t1_c2kl1am
null
1427618754
1
t5_2fwo
null
null
null
True
wilsonp
null
AOP has not become the thing of the past. Its still widely used, but more by framework and library developers rather than application developers, although it still has its place in application development too. (Apostrophe key broken, sorry).
null
0
1316428245
False
0
c2ky9r6
t3_kjiii
null
t1_c2ky9r6
t1_c2kt6pd
null
1427618767
1
t5_2fwo
null
null
null
True
jpt1201
null
Thanks for the feedback, I've updated the post accordingly. Still have a lot to learn with Chef and Vagrant, but really enjoying it so far.
null
0
1316428285
False
0
c2ky9t3
t3_kjtsp
null
t1_c2ky9t3
t1_c2ky44t
null
1427618768
1
t5_2fwo
null
null
null
True
syntax
null
There's a (rather important) difference between _number_ of symbols, and short ness of those symbols. Perl has lots of single character, (or two character) operators. That's a different sort of thing from having _powerful_ operators. The difficulty of comprehension of code is more closely matched to the _number_ of symbols, and weakly matched to total characters. This tends to favour fewer yet longer symbols over more yet shorter symbols. (Although it's always a tricky thing to quantify, not least because the more familiar the reader is with the idioms used, the more likely they are to read a cluster of symbols as a single thing).
null
0
1316428307
False
0
c2ky9u6
t3_kjw0j
null
t1_c2ky9u6
t1_c2kw2qx
null
1427618768
3
t5_2fwo
null
null
null
True
Peaker
null
Curious about the shortcut?
null
0
1316428512
False
0
c2kya5k
t3_kk1hp
null
t1_c2kya5k
t1_c2kwzwv
null
1427618773
8
t5_2fwo
null
null
null
True
ceiimq
null
The reason this vision of the future hurts me is because many of the awesome things people do with Haskell seem to only be feasible - and *a fortiori* learnable - because the language they're built on is relatively simple and consistent. Sure these ideas can be ported to a hybrid abomination like Scala afterwards, but I'm pretty sure there's no way they could have been *invented* there. Maybe what I'm saying is simply reiterating the fact that Smalltalk remains one of the best languages for *teaching* OOP. But the reason we can still teach OOP and invent new ways of using it in more complicated languages like Java or C# is because these more-or-less retain a simple, consistent Smalltalk-ish subset that can express the "essence" of the OO paradigm. This isn't at all what's happening with the adoption of "functional features" in languages like C#; C# contains nothing close to a "simple Haskell/ML-ish subset" (Scala doesn't either - or if it does, I've never seen an example of it). For this reason, we can deliver C# programmers pre-packaged "functional solutions" to particular problems, but "functional programming", the actual awesomeness that gave birth to these solutions, currently remains in the hands of the users of *real* FP languages.
null
0
1316428928
True
0
c2kyau3
t3_kjkxj
null
t1_c2kyau3
t1_c2kuaf1
null
1427618781
3
t5_2fwo
null
null
null
True
ggtsu00
null
It might just be me but I'm an avid c++ user but I really don't use a lot of the features C++ has because they add more syntax confusion and require more programming language specific knowledge in order to read and understand the code. The addition of 3 different types of pointers, and even the presents of 4 different types of type casting just makes the programming language more complex. I like C because it is simple. I use C++ because it allows me to structure C code in more design oriented fashion. These programming language features are engineered for making large projects more manageable. My solution to making programming projects more manageable is to make them smaller and simpler - at the design level. If you are concerned about 10 different software engineers managing pointers to objects that are shared between different objects being managed by other programmers, then maybe the design is just too complex.
null
0
1316428935
False
0
c2kyaui
t3_kjja4
null
t1_c2kyaui
t3_kjja4
null
1427618782
2
t5_2fwo
null
null
null
True
[deleted]
null
[deleted]
null
0
1316429511
False
0
c2kybrd
t3_kkbpe
null
t1_c2kybrd
t3_kkbpe
null
1427618794
-1
t5_2fwo
null
null
null
True
kyz
null
So, why is it that Haskell always seems to be the language cropping up in "you should learn this <entirely different from mainstream programming> language! It's wicked cool!" conversations *right now*? I mean, not that long ago, Ruby on Rails occupied that slot. Don't get me wrong, Ruby on Rails is beautiful, but it's not the go-to language for web development. People are still mostly programming in C/C++/C#/Java/Perl/PHP, but thanks to Ruby on Rails showing the way, their programming frameworks have gotten more sensible. Then before Ruby on Rails, it was Python. Python was going to change the world, starting with the brace character. It doesn't appear to have done that. Before even that, Paul Graham was telling us how he became a millionaire by selling his Lispy web framework to Yahoo! Beautiful, wonderful Lisp. Now, I admire that many of the features of mainstream programming languages *came* from Lisps (when they didn't come from ALGOL and Simula), but Lisp has waned in popularity since the 1980s. It's an also-ran, beaten by mongrel languages. Is there a balancing point for languages, where tipping too much to the conceptual side makes it "the language with that paradigm/feature", while going too far to the getting-shit-done side makes it a scarred whore of a language like PHP? In any case, what do Haskell advocates hope that their advocacy will bring? Do they think Haskell will reach people beyond its core audience of mathematicians? Do they hope to influence the direction of more popular languages? Will they be sad one day when Haskell is no longer in the news, and is only referred to as "the language that influenced the java.pure package"?
null
0
1316430126
False
0
c2kycpk
t3_kjw0j
null
t1_c2kycpk
t3_kjw0j
null
1427618814
7
t5_2fwo
null
null
null
True
cogman10
null
[I thought so too](http://www.reddit.com/r/programming/comments/i19vu/microsoft_demos_c_amp_heterogeneous_computing_at/) This subreddit, however, hates microsoft. This is seriously frontpage stuff.
null
0
1316430491
False
0
c2kyd95
t3_ki4ib
null
t1_c2kyd95
t1_c2kmoyo
null
1427618815
1
t5_2fwo
null
null
null
True
sltkr
null
They are boxed as soon as you convert them to *interface{}* which is necessary to add them to a generic container class. This is precisely the reason IntVector exists: to provide a Vector class that stores unboxed integers. You can't do that generically in Go.
null
0
1316430718
False
0
c2kydmh
t3_kikut
null
t1_c2kydmh
t1_c2kxgmn
null
1427618820
5
t5_2fwo
null
null
null
True
maximinus-thrax
null
I've done a lot of Python in the past, and a fair bit of Java recently (Android development), and I would say that my experience is the opposite - mainly that it 'just seems to work' in Python but seems a load more verbose and complex in Java. I'm sure it's mainly related to what you are used to using, to be honest.
null
0
1316430729
False
0
c2kydn5
t3_kjw0j
null
t1_c2kydn5
t1_c2kvynm
null
1427618820
1
t5_2fwo
null
null
null
True
axilmar
null
It's no different than if (x != null) ... After the above 'if', you know 'x' is not not null, much like option types.
null
0
1316430911
False
0
c2kydzr
t3_kfvm7
null
t1_c2kydzr
t1_c2kdvda
null
1427618824
0
t5_2fwo
null
null
null
True
axilmar
null
**The other fucking comments say nothing about this!!!** **C++ WITH COMPONENT EXTENSIONS IS NOT C++!!!** **C++ WITH CLI-STYLE SYNTAX IS NOT C++!!!** Sometimes I think I am the only sane person on this planet.
null
0
1316431044
False
0
c2kye8e
t3_kgl4f
null
t1_c2kye8e
t1_c2kcnjs
null
1427618828
-1
t5_2fwo
null
null
null
True
axilmar
null
What you posted is the standard way COM works in standard C and C++. Indeed, it is standard language. But, it is totally not practical! who is going to write all this boilerplate code? not me, for certain.
null
0
1316431176
False
0
c2kyege
t3_kewaq
null
t1_c2kyege
t1_c2kchhk
null
1427618831
1
t5_2fwo
null
null
null
True
howfun
null
I t has a helluva name.
null
0
1316431199
False
0
c2kyehz
t3_kjj9n
null
t1_c2kyehz
t3_kjj9n
null
1427618831
1
t5_2fwo
null
null
null
True
skilldrick
null
Are you kidding me? This isn't advanced JS - it's 101. It's vital to know the difference between `typeof` and `instanceof` if you're going to do anything useful in JavaScript.
null
0
1316431256
False
0
c2kyelh
t3_kkbpe
null
t1_c2kyelh
t1_c2kybrd
null
1427618832
16
t5_2fwo
null
null
null
True
astrobe
null
Because, as the author says, "it is very (very) difficult". All this looks like yet another instance of the "worse is better" dichotomy.
null
0
1316431391
False
0
c2kyeu5
t3_kjkxj
null
t1_c2kyeu5
t1_c2kxxoh
null
1427618835
3
t5_2fwo
null
null
null
True
tragomaskhalos
null
Amen. Old-style COM from C++ was painful enough (which flavour of string would you like to use today?), but at least you had (stupid variety of) string classes, _com_ptr_t and the like, plus the ability to hide HRESULT checks and map them to exceptions, to at least allow *some* of your business logic to poke through the cruft. Doing COM from C would be like skiing down the Alps on your bare arse.
null
0
1316431563
False
0
c2kyf4c
t3_kk7c6
null
t1_c2kyf4c
t1_c2ky5n2
null
1427618839
11
t5_2fwo
null
null
null
True
axilmar
null
Microsoft does the same shit again: making it difficult to use the standard language, and very easy to use its proprietary extensions, in order to lock developers into its tools. Shame on you Microsoft, for not using the standard features of the languages.
null
0
1316431617
False
0
c2kyf7r
t3_kk7c6
null
t1_c2kyf7r
t3_kk7c6
null
1427618840
-8
t5_2fwo
null
null
null
True
iLiekCaeks
null
But COM was always meant to be used from any language, including C. That's why COM was made.
null
0
1316431714
False
0
c2kyfdy
t3_kk7c6
null
t1_c2kyfdy
t1_c2ky5n2
null
1427618842
2
t5_2fwo
null
null
null
True
iLiekCaeks
null
The fun starts when Windows developers use these extensions for their own code. Using ^ sure seems nicer than all those fugly smart pointers (or does anyone actually like how smart pointers change the appearance of the code?)
null
0
1316431822
False
0
c2kyfkq
t3_kk7c6
null
t1_c2kyfkq
t1_c2kyf7r
null
1427618845
1
t5_2fwo
null
null
null
True
codewarrior0
null
This thread is now about the expressiveness of language.
null
0
1316431964
False
0
c2kyfu3
t3_kjw0j
null
t1_c2kyfu3
t1_c2kvw87
null
1427618848
3
t5_2fwo
null
null
null
True
axilmar
null
Sure T^ looks better than CComPtr<T>, but for professional software, using standard features of a language buys you a great deal of safety and saves cost. By not using standard features, for example, I cannot use Mingw32 to write WinRT applications, I have to buy Visual Studio.
null
0
1316432077
False
0
c2kyg1b
t3_kk7c6
null
t1_c2kyg1b
t1_c2kyfkq
null
1427618850
2
t5_2fwo
null
null
null
True
tragomaskhalos
null
As someone who does a lot of Ruby, I love not having to type-annotate everything while I'm writing the code, but miss it *mightily* when I'm revisiting that code later (remember write once, read many). This isn't an issue for quick and dirty prototypes of course, but is a big problem for anything else. And now most of the C# code I see is riddled with *var*s, which presents exactly the same problem to the poor sap having to grok what's going on. I hope C++ programmers use more restraint with *auto*. Edit: there are obviously sensible uses: noone is going to miss *ComplicatedWidget w = new ComplicatedWidget ();*, I'm talking about *var w = CanYouGuessWhatIReturnHmmm();*
null
0
1316432135
True
0
c2kyg5g
t3_kjja4
null
t1_c2kyg5g
t1_c2ktz0l
null
1427618852
4
t5_2fwo
null
null
null
True
day_cq
null
I'm not sure why you want to test if foo is instanceof Something or if foo's constructor is Something. What's the usecase for such test?
null
0
1316432552
False
0
c2kygw2
t3_kkbpe
null
t1_c2kygw2
t3_kkbpe
null
1427618862
1
t5_2fwo
null
null
null
True
skilldrick
null
Well, if you've got a function that could take objects created from multiple different constructors, and you wanted to take a different action based on which constructor built the object, then you'd need to check its constructor. Tbh, I don't use constructors in JS very often, preferring to use closures to create objects, but if you're working with JavaScript that does use constructors you'll sometimes need to know which constructor was used to create an object.
null
0
1316432731
False
0
c2kyh8o
t3_kkbpe
null
t1_c2kyh8o
t1_c2kygw2
null
1427618867
2
t5_2fwo
null
null
null
True
day_cq
null
what's wrong with foo.f() instead of if (foo instanceof F) { //F version of f() } else if (foo instanceof G) { //G version of f() } ....
null
0
1316432924
False
0
c2kyhm7
t3_kkbpe
null
t1_c2kyhm7
t1_c2kyh8o
null
1427618871
1
t5_2fwo
null
null
null
True
gnuvince
null
I recall that Rich Hickey said he wrote Java and C# as a bunch of static methods. Is that how you code as well?
null
0
1316432996
False
0
c2kyhr6
t3_kjkxj
null
t1_c2kyhr6
t1_c2kv6c3
null
1427618873
3
t5_2fwo
null
null
null
True
[deleted]
null
I'm not quite sure what's meant with ownership in this post, but isn't there a risk for [territorialism](http://producingoss.com/en/managing-volunteers.html#territoriality) if a subset of the product becomes the perceived domain of a specific member of the project?
null
0
1316433120
False
0
c2kyhz3
t3_kk5f4
null
t1_c2kyhz3
t3_kk5f4
null
1427618876
8
t5_2fwo
null
null
null
True
kdeforche
null
If you are an occasional photographer, then it doesn't make sense to learn about exposure, aperture, ISO levels, etc... If you are a professional photographer, then the time learning these things is well spent, and you cannot imagine why anyone would argue that they are not useful. I believe this is a similar discussion: the additional complexity is only useful if the time spent learning is vastly smaller than the time saved by using these features. If you are developing C++ day-in-day-out, then it is hard to imagine that the time you are spending thinking about C++ features is more than a fraction of the time (with the other big part being spent on designing your application, working out features, and simply typing into your editor and working through compiler errors).
null
0
1316433198
False
0
c2kyi4d
t3_kjja4
null
t1_c2kyi4d
t1_c2kyaui
null
1427618879
8
t5_2fwo
null
null
null
True
Drfuzzykins
null
Yeah but when do you need prototypes to add snow to your homepage?
null
0
1316433215
False
0
c2kyi5w
t3_kkbpe
null
t1_c2kyi5w
t1_c2kyelh
null
1427618879
6
t5_2fwo
null
null
null
True
skilldrick
null
I agree, duck typing is the way forward most of the time. But it would be foolish to think that you'll *never* need to know whether an object is an instance of a constructor.
null
0
1316433254
False
0
c2kyi87
t3_kkbpe
null
t1_c2kyi87
t1_c2kyhm7
null
1427618879
4
t5_2fwo
null
null
null
True
elmuerte
null
> But nobody wants an inconsistent, ass-looking UI That would explain why Microsoft Office never looked like a standard MS Windows application. (Same thing with most Apple software, Media players, Chrome, etc.)
null
0
1316433327
False
0
c2kyid5
t3_kjf91
null
t1_c2kyid5
t1_c2kxudu
null
1427618881
2
t5_2fwo
null
null
null
True
skilldrick
null
Good point. For a moment there I was thinking that JavaScript was a real programming language. Silly me.
null
0
1316433331
False
0
c2kyidl
t3_kkbpe
null
t1_c2kyidl
t1_c2kyi5w
null
1427618881
11
t5_2fwo
null
null
null
True
EnderMB
null
C# has moved on quite a bit from the old "looks like Java" days. Admittedly, it's still so similar that a Java programmer could pick it up and become somewhat proficient quickly (as I had), but with LINQ and lambda expressions being only two of the large changes it almost feels like an entirely different, but more complete language to work in.
null
0
1316433495
False
0
c2kyipp
t3_kjkxj
null
t1_c2kyipp
t1_c2ks7dt
null
1427618887
3
t5_2fwo
null
null
null
True
le_kommie
null
I don't think this is quite true. If memory serves me right, the main purpose of COM was C++ component reuse on binary level. This is what Don Box said in his "Essential COM" and it is solely based on one obscure C++ spec hack: > if all superclasses in the inheritance chain have all their methods pure virtual and have no data members, then the spec guarantees that all compilers will produce exactly same layout of the virtual function table (VTable) of the implementing classes OK, that might be not exactly verbatim and not quite true (especially about the guaranteed VTable layout), I don't have the C++ standard nor the book with me right now, but I think this was what was meant. In any case, it explains why COM interfaces can't have data members for example. And in any case, it was base on a hack. And certainly not for C, although it *is* possible to use COM interfaces from C, just look at some COM headers in Microsoft SDK (MAPI comes to mind).
null
0
1316433613
False
0
c2kyiyw
t3_kk7c6
null
t1_c2kyiyw
t1_c2kyfdy
null
1427618889
5
t5_2fwo
null
null
null
True
EnderMB
null
Well, either way it's good to see an actual programming post on /r/programming for a change...
null
0
1316433619
False
0
c2kyiz7
t3_kjkxj
null
t1_c2kyiz7
t1_c2kxa19
null
1427618889
2
t5_2fwo
null
null
null
True
[deleted]
null
[deleted]
null
0
1316433842
False
0
c2kyjfd
t3_kkegr
null
t1_c2kyjfd
t3_kkegr
null
1427618895
1
t5_2fwo
null
null
null
True
le_kommie
null
hmmm, because even in C things like that: int *ptr = (int *) malloc(10 * sizeof (int)); can return NULL and you must check for this condition. So checking for HRESULT is not much worse from this perspective, except in C++ you can use wrappers or overloaded operators to generate/catch exceptions, if you are using exceptions of course.
null
0
1316433963
False
0
c2kyjns
t3_kk7c6
null
t1_c2kyjns
t1_c2ky8gl
null
1427618899
7
t5_2fwo
null
null
null
True
cooper6
null
The F/J framework in Java 7 cannot run on a server, is only good for one call at a time, has no logging/alerting/notifying or any other attribute for enterprise usage and many other problems that make it a calamity: http://coopsoft.com/ar/CalamityArticle.html
null
0
1316434022
False
0
c2kyjs0
t3_kjdt6
null
t1_c2kyjs0
t3_kjdt6
null
1427618899
1
t5_2fwo
null
null
null
True
iLiekCaeks
null
> if you so desperately need the user's processor, just build a goddamn desktop app already Dude, you're living in the past! Google is doing nothing else all day than trying to replace existing desktop software with the web. If your app doesn't appear in an app store, it will fade into obscurity.
null
0
1316434043
False
0
c2kyjtv
t3_kkbyj
null
t1_c2kyjtv
t1_c2ky6km
null
1427618900
3
t5_2fwo
null
null
null
True
attekojo
null
Just random 2 cents here: When talking about statically typed languages the article author refers to languages like Haskell and the various ML dialects. Java is not actually a proper statically typed language, since some of the type checking must be done at runtime. Consider this atrocity, for example: public String boom(Object o) { return (String)o; } and later... RandomObject r = new RandomObject(); boom(r); The compiler doesn't generate an error for the call above since it doesn't know that boom() actually requires its argument to be a string. Thus the code happily compiles and throws a ClassCastException at run time. Another example of the lack of typing rigor in Java is that any method returning an object may also return null. Also in this case the compiler has no way of checking whether a) the method actually returns a null or b) the code using the resulting object checks that the object is, in fact, non-null before calling methods on it. In Haskell and ML neither of these conditions can happen because the typing system (enforced by the compiler) forbids such code to be written. In the first case an explicit conversion function is required to "cast" a type into another. In the second case a special type is used for functions that may not return a meaningful value. PS. I'm not trying to argue about the expressivity of one paradigm or the other, just pointing out Java is usually quite a lousy example when talking about statically typed languages :)
null
0
1316434461
False
0
c2kykqb
t3_kjw0j
null
t1_c2kykqb
t1_c2kvynm
null
1427618912
5
t5_2fwo
null
null
null
True
Andrey_Karpov_N
null
Discussion at ReactOS site: http://www.reactos.org/forum/viewtopic.php?f=14&t=9563
null
0
1316434573
False
0
c2kykz0
t3_k5kxq
null
t1_c2kykz0
t3_k5kxq
null
1427618915
1
t5_2fwo
null
null
null
True
sevenalive
null
You really shouldn't because that is just poor design. If your class needs to do different things based on constructor than maybe these functions should be in separate classes. It would be better to check if a variable was set than what constructor was used.
null
0
1316434649
False
0
c2kyl5e
t3_kkbpe
null
t1_c2kyl5e
t1_c2kyi87
null
1427618917
-5
t5_2fwo
null
null
null
True
[deleted]
null
What a fuckin' prick.
null
0
1316435208
False
0
c2kymej
t3_kk1hp
null
t1_c2kymej
t1_c2kwzwv
null
1427618933
-2
t5_2fwo
null
null
null
True
rush22
null
"Enterprise development". For example, if you need something that calculates how much a ticket would cost, "enterprise developers" would write a widget in Javascript to attach to their FORTRAN application, and then wrap that in Java. It only takes 5 minutes to load and is only about 68 Mb so it's not that bad. -sees the look on your face, nods sadly-
null
0
1316435271
True
0
c2kymjh
t3_kkbpe
null
t1_c2kymjh
t1_c2kybrd
null
1427618936
-2
t5_2fwo
null
null
null
True
elperroborrachotoo
null
To achieve deterministic behavior, and catch errors early. Depending on the API definition and whether you initialized the [out] HSTRING parameter, the resulting HSTRING string is either NULL or uninitialized. In the first case, the strign is valid. This might mean a warning isn't displayed, or all the valueable credit card information you enter into your database is an extensive collection of empty strings. The latter may crash when the string is accessed, or result in random garbage, or randomly reference another string. Which you blindly delete. And then, some other, unrelated code crashes. Good luck. --- The point is: When an error is returned, you have to check carefully which assumptions hold true. Introducing invalid state is a recipe for disaster - precicely because the symptoms may only occur later, when data is already corrupted. --- We "ugly API" guys still have a message box that does not require an additional allocation and is explicitely meant to be used in low memory conditions. We build the ugly machinery for your funky "cool" API's. Don't mess with us. --- In C++, you can convert the assignment to an exception easily: struct ThrowingHR { HRESULT hr; operator HRESULT() const { return hr; } // useful for success codes ThrowingHR & operator=(HRESULT hr_) { if (FAILED(hr_)) throw "Boom!"; hr = hr_; return *this; } // ... more ugly API }
null
0
1316435321
False
0
c2kymng
t3_kk7c6
null
t1_c2kymng
t1_c2ky8gl
null
1427618938
12
t5_2fwo
null
null
null
True
elperroborrachotoo
null
Huh? Are you referring to C++/CLI? This is not Standard C++. It's mostly C++ and a compatibility layer for .NET. Now, tell me: How do you make C++ interop smoothly with the .NET framework *without* adding extensions?
null
0
1316435459
False
0
c2kyn0z
t3_kk7c6
null
t1_c2kyn0z
t1_c2kyf7r
null
1427618944
1
t5_2fwo
null
null
null
True
axilmar
null
You don't. If you want to advertise a C++ API, then write a C++ API. You can't advertise a C++ API, which is not a C++ API. That's a lame trick by Microsoft. We now have the same situation as in Java, which lead to J++. Stroustrup should sue Microsoft for advertising, all over the web, the last few weaks, that the new APIs will be C++. They are not.
null
0
1316435692
False
0
c2kynka
t3_kk7c6
null
t1_c2kynka
t1_c2kyn0z
null
1427618949
-1
t5_2fwo
null
null
null
True
redditnoob
null
If you work in a project large enough and old enough in any language, sooner or later you _will_ need to come to familiarity with all of its warts and special cases. This is unfortunate, and can be avoided by only working on small projects with small teams or by yourself, but otherwise it's true.
null
0
1316435781
False
0
c2kyns0
t3_kkbpe
null
t1_c2kyns0
t1_c2kybrd
null
1427618952
1
t5_2fwo
null
null
null
True
flippant
null
Thanks. senj's comment clarified that for me a couple of days ago.
null
0
1316436035
False
0
c2kyoev
t3_khvyw
null
t1_c2kyoev
t1_c2kt32f
null
1427618959
1
t5_2fwo
null
null
null
True
stonefarfalle
null
Java is a perfectly fine statically typed language. It has a type system that is checked by the compiler at compile time. That type system is even sound. I am not really sure what your example is supposed to show, it certainly doesn't show a type error.
null
0
1316436152
False
0
c2kyopr
t3_kjw0j
null
t1_c2kyopr
t1_c2kykqb
null
1427618963
0
t5_2fwo
null
null
null
True
TheWix
null
Found this problem also with NHibernate. Doing things like creating protected constructors for proxies, making everything virtual, etc. I had to create a layer of "DTOs" like you. Pain to maintain since I would always forget to add and remove properties from them when I changed to domain objects. Then the SOBs go and change method names like .ToList() to just List(). So much for going to the next version.
null
0
1316436370
False
0
c2kyp9i
t3_ki83r
null
t1_c2kyp9i
t1_c2ktpc7
null
1427618971
3
t5_2fwo
null
null
null
True
Aninhumer
null
I think the disagreement about meaning is, expressive to whom? Terse languages like J are expressive to the computer, in that they express a lot of information in less code, but often to humans they are unintelligible. Haskell is very expressive to a programmer fluent in it, resulting in often in shorter programs than equivalent in other languages, but to a less familiar programmer, it is again difficult to read.
null
0
1316436405
False
0
c2kypd0
t3_kjw0j
null
t1_c2kypd0
t1_c2kv724
null
1427618973
1
t5_2fwo
null
null
null
True
mzcr
null
Yeah, that was stupid of me. Thanks for the tip. Doesn't seem to be a way to change it at this point though.
null
0
1316436410
False
0
c2kypdh
t3_kk5f4
null
t1_c2kypdh
t1_c2kwwsl
null
1427618973
1
t5_2fwo
null
null
null
True
nemtrif
null
Here you are: http://stackoverflow.com/questions/7436144/using-winrt-from-c/7437006#7437006
null
0
1316436451
False
0
c2kyph9
t3_kjja4
null
t1_c2kyph9
t1_c2kv4ij
null
1427618974
1
t5_2fwo
null
null
null
True
voxoxo
null
The recent MS office versions don't look like ass. And the microsoft bundled media players have always been shit.
null
0
1316436491
False
0
c2kypkm
t3_kjf91
null
t1_c2kypkm
t1_c2kyid5
null
1427618976
1
t5_2fwo
null
null
null
True
uriel
null
GOTO is very useful, and is a shame most "modern" languages lack it.
null
0
1316436529
False
0
c2kypoi
t3_kfvm7
null
t1_c2kypoi
t1_c2k1qd7
null
1427618977
3
t5_2fwo
null
null
null
True
[deleted]
null
Go wrapped it in a form that's easily understandable and usable. Very pop-like, you see?
null
0
1316436542
False
0
c2kyppl
t3_kikut
null
t1_c2kyppl
t1_c2kjngm
null
1427618977
1
t5_2fwo
null
null
null
True
elperroborrachotoo
null
> You don't. Oh, how useful. > Stroustrup should sue Microsoft for advertising, all over the web, the last few weaks, that the new APIs will be C++. They are not. WinRT is COM-callable, thus does not require C++/CLI. Pavel Minaev merely uses C++/CLI as an example for the respective .NET call.
null
0
1316436746
False
0
c2kyq9t
t3_kk7c6
null
t1_c2kyq9t
t1_c2kynka
null
1427618985
6
t5_2fwo
null
null
null
True
ethraax
null
Hold on there - isn't the VC++ compiler free, just as the F# and C# compilers? You could probably use the VC++ compiler with whatever IDE you're using to develop for Mingw32 anyways.
null
0
1316436813
False
0
c2kyqgy
t3_kk7c6
null
t1_c2kyqgy
t1_c2kyg1b
null
1427618988
4
t5_2fwo
null
null
null
True
Gotebe
null
True, and TBH, MS has done a very good job of making C->COM calls as easy as possible. However, one really needs to be... strange, to actually do it. It's just way too baroque, and without any advantage to simply using C++ (at least).
null
0
1316436869
False
0
c2kyqmp
t3_kk7c6
null
t1_c2kyqmp
t1_c2kyfdy
null
1427618989
3
t5_2fwo
null
null
null
True
shimei
null
> Instead of continuing in the tradition of a small, powerful language suitable as a workbench for experimentation and research How many people are doing research work on RNRS Scheme? Most of the papers that get published are on larger languages or *models* of languages. What's the point in having "beautiful" tiny languages that nobody uses when you can just make a model or implement your own separate thing?
null
0
1316436876
True
0
c2kyqnb
t3_kk1hp
null
t1_c2kyqnb
t1_c2kxpdk
null
1427618989
4
t5_2fwo
null
null
null
True
nemtrif
null
> I suspect it will end up in Service Pack 1 I would be very surprised if it does. New language features are never shipped in service packs - at least that has been the practice so far.
null
0
1316437050
False
0
c2kyr5a
t3_kjja4
null
t1_c2kyr5a
t1_c2kxuln
null
1427619004
2
t5_2fwo
null
null
null
True
shimei
null
Go didn't even do that first. Dynamically typed languages did. Structural subtyping is just a way to regain the flexibility you already get from, say, Javascript. Except you can't get "message not understood" errors.
null
0
1316437079
False
0
c2kyr86
t3_kikut
null
t1_c2kyr86
t1_c2kyppl
null
1427618998
1
t5_2fwo
null
null
null
True
chronoBG
null
Upvoted for what I presume is sarcasm :)
null
0
1316437083
False
0
c2kyr8k
t3_kkbyj
null
t1_c2kyr8k
t1_c2kyjtv
null
1427618998
2
t5_2fwo
null
null
null
True
mzcr
null
Re: the CSV. Seems like that's a bit much. You didn't say what your role in the company was or how many customers there were, etc. But in the consumer market (as opposed to military with fewer customers) I imagine there's the potential for that to generate way too many support emails... It's similar I suppose to having your name and email as the author of an RPM in Linux (my company's OS of choice). I've always wondered if anyone actually pays attention to those fields. Also, reddit's "you are doing that too much. try again in 7 minutes." is crippling to my ability to respond to everyone's comments. Sigh. Karma-whoring to commence in 3... 2... 1...
null
0
1316437083
True
0
c2kyr8l
t3_kk5f4
null
t1_c2kyr8l
t1_c2kwwsl
null
1427618998
1
t5_2fwo
null
null
null
True
yellowjacketcoder
null
I think the key to this is to promote team ownership rather than individual developer ownership. Harder to do, but more reward in case of the bus/lotto factor.
null
0
1316437136
False
0
c2kyre3
t3_kk5f4
null
t1_c2kyre3
t1_c2kxmv6
null
1427619009
2
t5_2fwo
null
null
null
True
Eirenarch
null
However if MS does not use SL video half of the comments are complains about MS abandoning Silverlight and Silverlight being dead.
null
0
1316437254
False
0
c2kyrq5
t3_kii9z
null
t1_c2kyrq5
t1_c2kkovc
null
1427619011
1
t5_2fwo
null
null
null
True
TheWix
null
It would be nice if .NET had some immutability built in. Being able to do something like: public immutable class Date{...} or how Scala does it by using val instead of var. Even maybe reusing readonly.
null
0
1316437295
False
0
c2kyrtn
t3_kjw0j
null
t1_c2kyrtn
t1_c2kwnhg
null
1427619012
2
t5_2fwo
null
null
null
True
wwosik
null
I wonder if a useful GUI could be ever programmed like that...
null
0
1316437373
False
0
c2kys1w
t3_kjkxj
null
t1_c2kys1w
t1_c2kv6c3
null
1427619014
2
t5_2fwo
null
null
null
True
Gotebe
null
Yes, that's kinda the idea. However, nothing in C++ spec says anything about vtable or anything like that. That's 100% implementation-specific. Just like C, C++ has no ABI whatsoever. It looks MS went for "that's how it's done anyhow". (Indeed, 3 implementations I looked at do the same).
null
0
1316437423
False
0
c2kys7o
t3_kk7c6
null
t1_c2kys7o
t1_c2kyiyw
null
1427619017
3
t5_2fwo
null
null
null
True
dand
null
One specific use case for explicitly checking an object's class: writing an equality method. (Of course, even better would be multimethods but we don't have those in JS.)
null
0
1316437462
True
0
c2kysbk
t3_kkbpe
null
t1_c2kysbk
t1_c2kyl5e
null
1427619017
2
t5_2fwo
null
null
null
True
[deleted]
null
I can think of one reason to resent this: GCC produces much better warnings than VC++ Express (i.e. with /analyze option unavailable). For instance, it catches invalid printf format specifiers, attempts to pass C++ objects as varargs and so on.
null
0
1316437733
False
0
c2kyt53
t3_kk7c6
null
t1_c2kyt53
t1_c2kyqgy
null
1427619024
4
t5_2fwo
null
null
null
True
sevenalive
null
I'm not talking class, I'm saying if you need to check which constructor is called to do a completely different action than rethink the design. If I have 2 constructors Button() and Button(string text) the latter should do the same thing as button except add text. Then instead of checking which constructor was called, just see if the text var is set.
null
0
1316437739
False
0
c2kyt60
t3_kkbpe
null
t1_c2kyt60
t1_c2kysbk
null
1427619024
-2
t5_2fwo
null
null
null
True
skilldrick
null
I think you're confusing JavaScript with Java. JavaScript doesn't have overloading. In JavaScript, the constructor is *roughly* analogous to a Java class.
null
0
1316437856
False
0
c2kytip
t3_kkbpe
null
t1_c2kytip
t1_c2kyt60
null
1427619028
3
t5_2fwo
null
null
null
True
joesb
null
> CLR also runs native code. But when it does so, is the native code bounded by sand box model?
null
0
1316437961
False
0
c2kytuc
t3_kitgf
null
t1_c2kytuc
t1_c2kxt6b
null
1427619032
1
t5_2fwo
null
null
null
True
mnp
null
Sounds a lot like Aerofs. I think they can claim it's unlimited because participants are donating a little disk space for cloud purposes. Most personal machines have scads of free space, so as long as people donate a fair amount to the cloud, and that trend continues, with reasonable use the cloud won't run out of space.
null
0
1316438093
False
0
c2kyu8h
t3_kk8o3
null
t1_c2kyu8h
t3_kk8o3
null
1427619037
3
t5_2fwo
null
null
null
True
illvm
null
Because 'use strict'; typeof [] === 'object'; //true [] instanceof Array; //true [].constructor === Array; //true
null
0
1316438399
False
0
c2kyv64
t3_kkbpe
null
t1_c2kyv64
t1_c2kygw2
null
1427619059
1
t5_2fwo
null
null
null
True
axilmar
null
The Visual Studio Express is free, indeed. And that comes with the VC++ compiler. I doubt Eclipse or CodeBlocks can use the compiler without a hitch though. For example, do those support the debug symbols Microsoft puts in the code?
null
0
1316438410
False
0
c2kyv79
t3_kk7c6
null
t1_c2kyv79
t1_c2kyqgy
null
1427619059
3
t5_2fwo
null
null
null