HN user

neukoelln

25 karma
Posts0
Comments21
View on HN
No posts found.

Do-notation is Haskell is purely syntactic sugar over function calls. You can remove do-notation from Haskell and still write the exact same programs (with monads and all). Also, monads are not about state anymore than classes in Java are about Toasters.

Monads exist because because haskell people want to pretend that there is this ideal mathematical world where things dont change

Monads exist independently from Haskell and are not about "things that change".

Wow, I'm on my second battery for my T430s and about to replace it soon. Battery life is < 1 hour, even with a new one I usually wouldn't get more than three hours. :-(

It's also very overpriced. I just moved into a new apartment and I am paying 9€/sqm cold in a very central location. This is very cheap. 11-14€ is more realistic, but even with utilities included you would never have to pay 24€/sqm.

What about all the potentially very talented programmers that have a non-math background?

If they don't know what something means, they can educate themselves. I learned about monoids in my first course in linear algebra at the university in the first month. My math background at that point was "finished highschool". Just because it has a name that does not appear in everyday language (unlike enumerable) it does not mean the concept is difficult to grasp.

I admit that I am not an expert on Scala, but I am confused about your "Person" example. I thought that this was exactly the common use case that wouldn't cost you an allocation. According to http://docs.scala-lang.org/overviews/core/value-classes.html:

    A value class is actually instantiated when:

        a value class is treated as another type.
        a value class is assigned to an array.
        doing runtime type tests, such as pattern matching.
none of which is the case in the example.

Can you tell me what's the problem with multiple inheritance if your superclasses only consist of pure virtual functions?

From [1]:

"Bjarne Stroustrup: I had a lot of problems explaining that to people and never quite understood why it was hard to understand. From the first days of C++, there were classes with data and classes without data. The emphasis in the old days was building up from a root with stuff in it, but there were always abstract base classes. In the mid to late eighties, they were commonly called ABCs (Abstract Base Classes): classes that consisted only of virtual functions. In 1987, I supported pure interfaces directly in C++ by saying a class is abstract if it has a pure virtual function, which is a function that must be overridden. Since then I have consistently pointed out that one of the major ways of writing classes in C++ is without any state, that is, just an interface.

From a C++ view there's no difference between an abstract class and an interface. Sometimes we use the phrase "pure abstract class," meaning a class that exclusively has pure virtual functions (and no data). It is the most common kind of abstract class. When I tried to explain this I found I couldn't effectively get the idea across until I introduced direct language support in the form of pure virtual functions. Since people could put data in the base classes, they sort of felt obliged to do so. People built the classic brittle base classes and got the classic brittle base class problems, and I couldn't understand why people were doing it. When I tried to teach the idea with abstract base classes directly supported in C++, I had more luck, but many people still didn't get it. I think it was a major failure in education on my part. I didn't imagine the problem well. That actually matches some of the early failures of the Simula community to get crucial new ideas across. Some new ideas are hard to get across, and part of the problem is a lot of people don't want to learn something genuinly new. They think they know the answer. And once we think we know the answer, it's very hard to learn something new. Abstract classes were described, with several examples, in The C++ Programming Language, Second Edition, in 1991, but unfortunately not used systematically throughout the book. "

[1] http://www.artima.com/intv/modern.html

C++ doesn't have the interface keyword, but that does not mean you cannot have a class that is a pure interface (all methods abstract).

I don't know where you have those numbers from, but they are very inaccurate. The average household income in Berlin in 2012 was 1650€ net per month [1], so that would be about 20k per year. According to what you wrote, Berlin streets should be essentially free from cars, but I can assure you that this is not the case. Let me give you some real numbers. I am married and have a small child. I earn 55k gross, which is ~38k after taxes. My wife earns significantly less, providing another 7k per year. I don't know right now how much she earns before taxes, but our gross income combined is well below 80k. So we have about 45k per year and we easily get by. We have a nice flat, eat out several times a week, take ~3 vacations a year, are paying into a private pension plan, and are still saving money. Granted, we don't own a car, but we could if we wanted. I have no idea if the reported 80k are accurate, but I would be very surprised, as it would be far above the average income for software developers in Berlin (and I think most of their employees are devs).

[1] bit.ly/1Tb8tMz, best I could find right now

We also thought this way. We had our daily standup at half past ten, which was right in the middle between coming in and going to lunch.

Now we moved it to quarter to two, which for most of us means a bit after lunch. Now we have no interruption throughout the morning, and the hour before the standup we're not working anyway.