Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror

Comment Re:What could possibly go wrong? (Score 1) 199

Well,
in University we once learned/heard about LoC's and such and different kinds of software like: Applications, Tools, and System Programming.

The first Aha! effect was when the daily LoC productivity for those different types was shown:
Application Programming: 25 - 100 LoC per day
Tools Programming: 1 - 25 LoC per day
System Programming: < 1 LoC per day

The second effect was a combined wow and oops: the numbers stay more or less the same, regardless what programming language you use. That is why we had booms in Lisp and Smalltalk in the 1970s and later C, Python, C++ etc.

One line of Ada in System programming can simply be so much more than a single line of assembly. An 100 lines of Pascal in an Application is so much much more than 100 lines assembly.

Comment Re:What could possibly go wrong? (Score 1, Flamebait) 199

Why don't you agree not to talk about stuff you have no clue about?

a) inheritance is not an antipattern
Using it wrong might be an antipattern in the moment where it is used

b) multiple inheritance is not an antipattern either
For example the infamous "diamond pattern" only happens if you actually program it: intentionally. And there are plenty of use cases where MI is useful. Perhaps you should read some books about C++ before talking BS?

c) strictly speaking: JavaScript has no inheritance art all!
JS has syntactic sugar, that looks like inheritance in many cases, but is, oh oh, you hate it: a linked list of prototypes. The moment when you "inherit" in JS, you are actually referencing to another _object_, not a class!

The main problem is that people use languages in the same way as they used to do in another language. E.g. many C++ guys came from Smalltalk. So they use inheritance similar. Of course the main difference is static versus dynamic typing. Hence early class libraries for C++ looked over engineered. In Smalltalk you can beam methods into classes via meta classes. So you do not need MI. And also: two classes implementing the same method signature: do not need to have a common super class ... as dispatch is dynamic anyway.

For examples: Dart, Java and C# Generics are not the same thing. All work slightly different. And only C++ and some esoteric languages have real templates, you understand what that means, when you once did template meta programming.

The power of C++ is for example shines when you combine templates and MI. Before I give an example, most SI languages cheat anyway, and offer an alternative in one way or the other: with mixins or traits. And some do it really badly, for example Java with interfaces that have default implementations.

So, when do you use inheritance, oh, in C++ for example, you can inherit "privately" then you only get the implementation of the base(s), and your public inheritance chain looks clean. When I write a GUI framework however, why the fark would I _not_ use inheritance? Not using it would be completely braindead.

Now imagine a linked list class - called Link - with one template parameter, which is an enum, and one to mix in a base class.
enum { up, down } UpDown;
enum { next, previous } NextPrevious;

class CADPoint {
float x, y, z;
}

class MentorCADPoint : public ThreeDCADPoint, public Link[UpDown, MentorCADPoint], public Link[NextPrevious, MEntorCADPoint] {}

Instead of keeping your CADPoints in external lists of what ever kind, they have their list structure embedded, flat, in the MentorCADPoint class.

Yes, you inherit two times from the same template, but it has different template arguments. In reality you most likely would use protected inheritance ... or make the algorithms traversing your points, friends.

The only problem with inheritance is that most books explaining it: explain it wrong.

Neither a seaplane nor a water plane is crafted by inheriting from a boat and a plane ...

Your main problem is: you never were in a team with good developers. So your conclusion about the big world of developers: is simply plain wrong. Unfortunately you live in a world of hire cheap, and fire if necessary. I live in a world where we hire excellence and try to make them never leave. And: we do code reviews. The guys not grasping the code get educated. Unless the code is in fact to complex and gets refactored.

For example: I do not know a single bad C++ developer. They are all top notch, not only in C++ but in basically everything regarding "code". However: we all shifted away from C++. Well, with the new fresh wind, see "circle C++" https://www.circle-lang.org/si... and https://github.com/seanbaxter/... it is perhaps time to take a look again :P Does Qt compile with circle c++? Oh oh ... potential potential ...

Comment Re:No thank you. (Score 1) 56

Nio - and many others - made it pretty simple:
The battery is considered fuel. It is not part of the car.
Just like in your torch light.
Or just like 20gallons of gasoline are not part of the car, but fuel in a compartment.

The Nio cars (and others) is made to have its battery simply swapped in a minute or such. Just like refueling.

A random e-vehicle where the battery is an integral part of the car, can not simply be retrofitted for battery swapping.

Comment Re: 50.0 exactly (Score 1) 48

Shares with no voting rights, do not control anything.

If you and I make a company, you have 90% of the share and I have 10% and your shares have no voting rights: you have nothing to control. Simple. The only thing you can do is is "ask questions" to put a burden on the administration of the company.

I suggest do read the relevant laws about stock companies.

No idea about your lists, queues and deques. Lists of what? Shares?

What is next? When I own 5% of Apples shares, I can go to a random bank and can demand access to Apple's bank accounts?

Comment Re:Is this still capitalism? (Score 1) 48

They don't exist anyway.

My ticktock app works the same here in Europe as it did in Thailand last years.

The only difference is: I surprisingly get German adevertizing while I never got any advertizing before.

No idea why people who never used ticktock hate it. It is a video platform. People post videos about themself.
What the fuck is wrong with that? Randomly sprinkling adverts are completely obviously adverts, you scroll over them. Just like on any other "web site".

My ticktock stuff are videos about me traveling in Thailand: if you do not explicitly follow ME, you never see them, unless: you follow one of my followers/friends and they "share"/"repost" it, and it pops up in your stream, or you explicitly SEARCH for me - or search for content like: "farang in a Thai temple, making stupid comments".

Comment Re:Good (Score 1) 83

Yeah, the stupid Chinese haters do not realize that.
Just as if a company is rich enough to run two production lines: one for cheap crap and one for expensive top notch stuff. And two supply lines and there are gabs out there that only produce trash for the cheap trash above ...

Look at those myths that Chines cars would not meet European safety standards.
Well, I really wonder how they can be here in Frankfurt all over the place.

I guess they are only rebranded Teslas or something ... Makes sense, right?

Slashdot Top Deals

The shortest distance between two points is under construction. -- Noelie Alito

Working...