Earlier quoted context omitted.
> designing a GUI Not really. HTML/CSS/JavaScript combination is not really OO, but works really really well. In general, I think that any "programming language" for GUI is a fail - we need to develop a declarative approach to GUI (like HTML/CSS, but with more features (e.g. effects) and more emphasis on Application Development (e.g. it's still really hard to create a photoshop-like interface in HTML), less on text p…
Who told you that JavaScript was "not really OO"?
Go at SoundCloud
81–90 of 112 posts
Re: Go at SoundCloud
#82Earlier quoted context omitted.
A well known and tested approach, sum types (tagged unions), would have been way better, but it was cast aside because the designers were apparently unaware of the improvements to union types made since C's inception: http://www.reddit.com/r/programming/comments/w1ig0/things_i_...
There is no reason for any new language to lack tagged union types. It disturbs me that Brian Cox rejects a simple, proven language feature that he does not even understand , even though it would take all of 2 minutes of searching/reading to understand. I'm sure he spent at least that long composing the replies in that thread, never moving past the ego-threat of "will Go ever have X?" to honestly evaluate the questio…
Re: Go at SoundCloud
#83Earlier quoted context omitted.
Is it really helpful to judge a language by its version number? Go is a very conservative language, in that it only uses well known and studied language features, and has been in production at many companies, including Google, Canonical, CloudFlare, etc. Certainly it deserves more faith than any random language designed for the exploration of new paradigms and features and which is only used by its maker?
Version numbers are pretty useless these days. I would certainly put a lot more stock in a 1.0 from the Go team than, say, my company. We use version numbers more for marketing than anything else. Personally, I'm not as worried about reliability as I am roadblocks. Say, for instance, we spend a month moving our framework over to Go. Then we find a problem that is yet unsolved. Either we solve it ourselves at an unkno…
> spend a month moving our framework over to Go
Seems a little extreme. Just use it for small, discrete projects. No need to bet the farm.Re: Go at SoundCloud
#84I'm still a bit of a novice, could someone elaborate on what he means by operator overloading being "problem creating?" I thought that was one of the main, 'core' concepts of OOP. Inheritance, and polymorphism. How would you make something like a GUI without being able to specialize classes by overriding certain methods? Have I misunderstood his point?
His point is that, if you aren't familiar with the code, operator overloading can be difficult to read. It gives objects the appearance of being native types, and it is sometimes not entirely clear what the result of the overload might be. What does "dog + cat" equal? In an extreme example, if you are crazy enough, it might make sense to have animal + animal = baby animal. You need to temper that example down to some…
However, operator overloading is very much needed for when creating user defined types that have arithmetic properties, such as bigint, or matrix.
As for the confusion about whether + means "add" or "concatenate", that is unresolvable. The D programming language deals with it by introducing the ~ binary operator to mean "concatenate". No more problems.
Although in D one can overload operators to mean any crazy thing one wants to, the consensus in the community is to eschew non-arithmetic use in the same manner that the C community has condemned:
#define BEGIN {
#define END }Re: Go at SoundCloud
#85I'm still a bit of a novice, could someone elaborate on what he means by operator overloading being "problem creating?" I thought that was one of the main, 'core' concepts of OOP. Inheritance, and polymorphism. How would you make something like a GUI without being able to specialize classes by overriding certain methods? Have I misunderstood his point?
Yes, I think you misunderstood. You are thinking of overriding methods, which is very important. Operator overloading is where you redefine the behavior of a "+" symbol, for example.
Re: Go at SoundCloud
#86I'm still a bit of a novice, could someone elaborate on what he means by operator overloading being "problem creating?" I thought that was one of the main, 'core' concepts of OOP. Inheritance, and polymorphism. How would you make something like a GUI without being able to specialize classes by overriding certain methods? Have I misunderstood his point?
Opertor overloading is really horrible. By reading the code "foo + bar" you can't know what is really doing internally. He is talking about operator (+-*=[]&) overloading. Not method overloading.
Re: Go at SoundCloud
#87Earlier quoted context omitted.
Interesting that sublime text comes up. I have been looking for a "bells and whistles" sort of IDE for python for a few days now, I am traditionally a unix person so I have moved along nicely with both vim and emacs as needed, but at this point I need to work with a full featured IDE. I am using the evaluation version of pycharm and I must say it is quite impressive, although paying for an editor does seem odd after…
Sublime Text will never be a bells-and-whistles IDE like PyCharm or PyDev on Eclipse, it just won't work that way. The question is whether the extra niceities offered by those IDEs offer enough productivity gains over their heavyweight design which leads to them being clock-time slow to get things done (launching, navigating around files etc. etc.) I think for experienced devs, a text editor is quicker for dynamic la…
It hits the sweet spot between emacs and pycharm quite nicely and I am at this point inclined to buy a license, I think an IDE is more useful for languages like java or scala but for python sublime text will do for me.
Re. the use cases for an IDE, my point was that as my side projects keep growing in size, I need something which is smart about things like refactoring, comprehensive autocomplete, support for debugging etc.
Re: Go at SoundCloud
#88Earlier quoted context omitted.
And how do you know what add(foo, bar) does internally?
add(foo, bar) isn't any clearer than foo + bar, but usually an overloaded operator doesn't correspond to "add". For example, in Javascript: "Hello" + " " + "World!". What the operator there is doing is concatenating the strings, so if you had a method to do it you wouldn't call it add - you'd call it concat.
In ruby you can implement certain numerical methods including +
In smalltalk + is a binary method, you can give your methods all sort of symbol names. Same with Scala I think.
Re: Go at SoundCloud
#89Earlier quoted context omitted.
Who told you that JavaScript was "not really OO"?
It doesn't have classes or inheritance.
function Parent() {
// somestuff
}
function Child() {
Parent.call(this);
}
Child.prototype = new Parent();
Child.prototype.constructor = ChildRe: Go at SoundCloud
#90Earlier quoted context omitted.
The problem is it's no better than C Multiple return values are pretty clearly better than C. The comma-OK or comma-err idiom is verbose, but powerful and unambiguous.
A well known and tested approach, sum types (tagged unions), would have been way better, but it was cast aside because the designers were apparently unaware of the improvements to union types made since C's inception: http://www.reddit.com/r/programming/comments/w1ig0/things_i_...