Mark Chu-Carroll on Go (programming language)
-
Jim Crafton wrote:
But I can't inherit behavior, right? Isn't that one of the compelling things about OOP
Not in my book, except in very specific cases such as GUI libraries. Implementation inheritance is one of the worst ways to reuse code.
Why? Seriously, I don't understand what your issue with it is. I'm not trying to be argumentative, I'd genuinely be curious as to what the issue with it is.
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow
-
I'm still trying to figure out what this is in response to. :~
The very old elitist argument against managed development outright regardless of circumstances because performance can be slower in some circumstances than for unmanaged apps.
"Creating your own blog is about as easy as creating your own urine, and you're about as likely to find someone else interested in it." -- Lore Sjöberg
-
Nemanja Trifunovic wrote:
Implementation inheritance is one of the worst ways to reuse code.
That's gotta be one of the craziest things I've heard (today at least). How are you re-using your code?
- S 50 cups of coffee and you know it's on! Code, follow, or get out of the way.
Steve Echols wrote:
That's gotta be one of the craziest things I've heard
Prefer composition to inheritance[^] Implementation Inheritance Is Evil[^] Abuse of Inheritance[^]
-
I work for an animation company in their research team. We write software components for 3d rendering, we have a home grown high performance graphics library, our own multicasting library, etc., I'm currently working on a high performance server (MFC for UI and C++ otherwise), and on a thread pool in C. Most of our code works extensively with other applications (other application API) like Maya, Quicktime, etc., Performance is very important here and C#, Java and other things stay outside the gate.
“Follow your bliss.” – Joseph Campbell
No argument here. :) Though I bet the folks in accounting would be just as happy with their stuff being .net based (actually I *know* they could care less if they're like accounting and business people the world over) ;)
"Creating your own blog is about as easy as creating your own urine, and you're about as likely to find someone else interested in it." -- Lore Sjöberg
-
Why? Seriously, I don't understand what your issue with it is. I'm not trying to be argumentative, I'd genuinely be curious as to what the issue with it is.
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow
-
Steve Echols wrote:
That's gotta be one of the craziest things I've heard
Prefer composition to inheritance[^] Implementation Inheritance Is Evil[^] Abuse of Inheritance[^]
So because people have abused it, that makes it evil? In my mind, it's just another tool to get a job done. If something "is-a" I use inheritance. If something "has-a", I use composition. Then there's that huge gray area in between....
- S 50 cups of coffee and you know it's on! Code, follow, or get out of the way.
-
Steve Echols wrote:
That's gotta be one of the craziest things I've heard
Prefer composition to inheritance[^] Implementation Inheritance Is Evil[^] Abuse of Inheritance[^]
Not very compelling arguments except for Herb's, which allow for a lot more leeway. Like anything, you have to learn how to use the tool. I would agree that MI is a PITA, and a language which ditches MI wouldn't bother me in the least. But to *completely* ditch inheritance still seems foolish. It's a tool. It's a good tool in a number of situations. Not all situations, but certainly more than enough to make it useful. The second's links reasoning is a little strange: "It encourages clients to tweak the behavior of base classes in ways that the original developer may not have envisioned. This often requires an intimate knowledge of the base class implementation and means that changes to the base class can easily break the subclass (FragileBaseClassProblem). This is an especially serious problem for component oriented development. " How does inheritance do this? If you don't have the source code to a library's base object, how can you "tweak" it? If the problem is with the design (which is what this really sounds like) then that's not an issue with inheritance per se, but an issue with the fact that whoever developer the library didn't know what they were doing. Two completely different problems.
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow
-
The very old elitist argument against managed development outright regardless of circumstances because performance can be slower in some circumstances than for unmanaged apps.
"Creating your own blog is about as easy as creating your own urine, and you're about as likely to find someone else interested in it." -- Lore Sjöberg
Yeah. It really depends on the developer. And as long as performance is "good enough", I'll take maintainability and readability over theoretical top performance.
-
That's a very good point you're making. However, I think that you're completely misunderstood here (at least on this thread). I did get you right to some extent though, and the fact with my workplace is that we need to milk out the best performance. I'm not against .NET either (I'm against Java though, such ugly shit should not exist).
“Follow your bliss.” – Joseph Campbell
Rajesh R Subramanian wrote:
I think that you're completely misunderstood
:-D Story of my life I'm afraid. Oh well there's always posthumous understanding I guess. Some day they'll say "remember old man JohnC, man was he ever right about so much stuff". ;)
"Creating your own blog is about as easy as creating your own urine, and you're about as likely to find someone else interested in it." -- Lore Sjöberg
-
Interesting. So basically the same boat as me: the only areas where performance matters are areas where the end users actually notice a slowness.
"Creating your own blog is about as easy as creating your own urine, and you're about as likely to find someone else interested in it." -- Lore Sjöberg
John C wrote:
So basically the same boat as me: the only areas where performance matters are areas where the end users actually notice a slowness.
Not sure what your boat is, but the app I work on stays in the background most of the time and needs to be as unintrusive as possible while synchronizing the content over the network. That means - minimal use of CPU, memory and power (for laptops).
-
John C wrote:
So basically the same boat as me: the only areas where performance matters are areas where the end users actually notice a slowness.
Not sure what your boat is, but the app I work on stays in the background most of the time and needs to be as unintrusive as possible while synchronizing the content over the network. That means - minimal use of CPU, memory and power (for laptops).
-
I work for an animation company in their research team. We write software components for 3d rendering, we have a home grown high performance graphics library, our own multicasting library, etc., I'm currently working on a high performance server (MFC for UI and C++ otherwise), and on a thread pool in C. Most of our code works extensively with other applications (other application API) like Maya, Quicktime, etc., Performance is very important here and C#, Java and other things stay outside the gate.
“Follow your bliss.” – Joseph Campbell
Not to kick a dead horse, but if you're just starting this the VCF might be of help for the UI and other parts, as it has both threaded functions, and thread pooling (as well as run loops, and various other thread stuff in it, all completely independent from the UI junk).
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow
-
Rajesh R Subramanian wrote:
I think that you're completely misunderstood
:-D Story of my life I'm afraid. Oh well there's always posthumous understanding I guess. Some day they'll say "remember old man JohnC, man was he ever right about so much stuff". ;)
"Creating your own blog is about as easy as creating your own urine, and you're about as likely to find someone else interested in it." -- Lore Sjöberg
I think they are already saying the first three words, so you're well on your way! :)
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow
-
Rajesh R Subramanian wrote:
I think that you're completely misunderstood
:-D Story of my life I'm afraid. Oh well there's always posthumous understanding I guess. Some day they'll say "remember old man JohnC, man was he ever right about so much stuff". ;)
"Creating your own blog is about as easy as creating your own urine, and you're about as likely to find someone else interested in it." -- Lore Sjöberg
John C wrote:
Story of my life I'm afraid. Oh well there's always posthumous understanding I guess. Some day they'll say "remember old man JohnC, man was he ever right about so much stuff"
:) My only issue with your posts is that you tend to generalize your specific situation to "99%" of developers. Otherwise, I fully agree that for most real-world software, watching for every single CPU cycle is a waste of time. In fact, when I was developing some accounting sowtware in late 1990s I proudly used VB6 and everybody was happy with it.
-
I think they are already saying the first three words, so you're well on your way! :)
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow
-
John C wrote:
Story of my life I'm afraid. Oh well there's always posthumous understanding I guess. Some day they'll say "remember old man JohnC, man was he ever right about so much stuff"
:) My only issue with your posts is that you tend to generalize your specific situation to "99%" of developers. Otherwise, I fully agree that for most real-world software, watching for every single CPU cycle is a waste of time. In fact, when I was developing some accounting sowtware in late 1990s I proudly used VB6 and everybody was happy with it.
Nemanja Trifunovic wrote:
My only issue with your posts is that you tend to generalize your specific situation to "99%" of developers.
Yeah I know, it just gets tedious qualifying everything over and over sometimes like I'm writing a license agreement or something. There seem to be a vocal minority in the lounge that are into unusual areas of work and I try to balance that against what I know to be the vast majority that are grinding out bog standard business apps (which you can see from the questions in the forums) and don't post here but lurk a lot.
"Creating your own blog is about as easy as creating your own urine, and you're about as likely to find someone else interested in it." -- Lore Sjöberg
-
Normally I'd ignore this, and bitch to myself, but I'm going to try and take the time to respond to this, so I suppose this will end up being a mini-rant. First this smells suspiciously of unix-like laziness. When I start to hear things like "minimalism" and "simple as possible", my bullshit meter starts to go off. Why? Because this is frequently bandied about in regards to *nix type systems as being a feature. In practice what it means (in my experience) is that the developers of said system (or library) want to do as little work as possible in implementing the system, so they make things simple for themselves, which is convenient for them, but usually makes it a total pain in the ass to use or develop with. X-Winblows is a great example of this. It's a lowest common denominator approach that's a total pain to program under and has held back unix GUI's for *decades* (at this point). Other things like this are unix's approach to data (everything's a file!), security, etc. Writing software is hard. Writing *good* software is harder. Implementing details that help the user and/or developer and ensure a certain clarity in the system is a lot of work. But when done properly you end up with great results and powerful tool. Unfortunately people don't like to hear this. Just looking at one of the first examples:
func fib(n) (val int, pos int) {
if n == 0 {
val = 1;
pos = 0;
} else if n == 1 {
val = 1;
pos = 1;
} else {
v1, _ := fib(n-1);
v2,_ := fib(n-2);
val = v1 + v2;
pos = n;
}
return;
}Huh? I've got "=", "==", *AND* ":="? WTF? First of all "==" is the bane of peoples existence. How many bugs have been caused by the accidental use of this? It's stupid and should be gotten rid of. That leaves us with, apparently (I haven't read the language spec yet, so I'm going on this guys article and one other one I glanced at) two ways to assign values? Grody. Seriously grody. No OO. None whatsoever, despite the "basic object-oriented features" claim. This seems ridiculous. OO is an incredibly useful tool when used correctly. Just because there are a large number of clueless dolts out there who can't be bothered to learn their craft properly and screw things up, doesn't mean you need to drop it from the language. Make it optional. You don't need to force it down peoples throats (like Java does), but you don't need to take it away either. "There's an allocation operator, "new" - but it doesn't initialize values. You can't p
Jim Crafton wrote:
but you don't bother to initialize variables, even stuff like ints, etc to 0?
From the spec: " The zero value When memory is allocated to store a value, either through a declaration or make() or new() call, and no explicit initialization is provided, the memory is given a default initialization. Each element of such a value is set to the zero value for its type: false for booleans, 0 for integers, 0.0 for floats, "" for strings, and nil for pointers, functions, interfaces, slices, channels, and maps. This initialization is done recursively, so for instance each element of an array of structs will have its fields zeroed if no value is specified. "
-
Jim Crafton wrote:
but you don't bother to initialize variables, even stuff like ints, etc to 0?
From the spec: " The zero value When memory is allocated to store a value, either through a declaration or make() or new() call, and no explicit initialization is provided, the memory is given a default initialization. Each element of such a value is set to the zero value for its type: false for booleans, 0 for integers, 0.0 for floats, "" for strings, and nil for pointers, functions, interfaces, slices, channels, and maps. This initialization is done recursively, so for instance each element of an array of structs will have its fields zeroed if no value is specified. "
Good. That's a relief to see. What I read in the guys article and the previous one hadn't mentioned that.
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow
-
PIEBALDconsult wrote:
I also don't want to forget how to in C
Because sometime you need code that actually, you know, performs well.
Ennis Ray Lynch, Jr. wrote:
Unpaid overtime is slavery.
Trollslayer wrote:
Meetings - where minutes are taken and hours are lost.
Shelby Robetson wrote:
PIEBALDconsult wrote: I also don't want to forget how to in C Because sometime you need code that actually, you know, performs well.
FFY.
Shelby Robetson wrote:
PIEBALDconsult wrote: I also don't want to forget how to in C Because sometime you need code that actually, you know, performs well.
FFY (reprise). :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
I like Mark Chu-Carroll's[^] writing style. A very balanced and knowledgable guy, IMHO. Anyway, here's his opinion on Go[^]
Good article, thank you for posting the link. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]